dsh-session-superagent 0.9.40 → 0.9.41
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 +24 -0
- package/README.md +1 -1
- package/client.js +1 -1
- package/lib/index.js +9 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
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.41] - 2026-11-02 —— `watch_start` 补齐面板已有的三项参数
|
|
6
|
+
|
|
7
|
+
### 学到的(知识库第 89 条)
|
|
8
|
+
工具能做的要和面板能做的对齐,否则用户会以为其中一个是残的。
|
|
9
|
+
|
|
10
|
+
### 具体缺口
|
|
11
|
+
| 配置 | 面板 | watch_start(改前) |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| 整条会话每小时上限 | ✅ | ❌ |
|
|
14
|
+
| 隔离区保留天数 | ✅ | ❌ |
|
|
15
|
+
| 最多留几个隔离区 | ✅ | ❌ |
|
|
16
|
+
|
|
17
|
+
客户说"把隔离区最多留 3 个",agent 只能答"你去面板点一下" —— 一句话能完成的事变成了手动操作。
|
|
18
|
+
|
|
19
|
+
### 改法
|
|
20
|
+
补三个参数,**夹紧范围与面板完全一致**(1-60 / 1-30 / 1-50),描述里写清默认值。
|
|
21
|
+
|
|
22
|
+
### 一个实现细节
|
|
23
|
+
工具参数在 `tool.parameters.properties`(JSON Schema),不是 `tool.parameters[key]` ——
|
|
24
|
+
第一条断言写错路径导致"缺参数"假警报。
|
|
25
|
+
|
|
26
|
+
### 测试
|
|
27
|
+
- 新增 1 例(参数存在 + 真的写入状态 24/7/3)。合计 **177 例**。
|
|
28
|
+
|
|
5
29
|
## [0.9.40] - 2026-11-02 —— 规则对照表:同一条规则不能只在一边
|
|
6
30
|
|
|
7
31
|
### 学到的(知识库第 88 条)
|
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.41'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
package/lib/index.js
CHANGED
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
|
|
40
40
|
export const name = 'dsh-session-superagent'
|
|
41
41
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
42
|
-
export const SERVER_VERSION = '0.9.
|
|
42
|
+
export const SERVER_VERSION = '0.9.41'
|
|
43
43
|
export const inject = ['tools', 'agents', 'webServer']
|
|
44
44
|
/** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
|
|
45
45
|
const DEFAULT_SESSION_WAKES = 12
|
|
@@ -1911,7 +1911,10 @@ export function apply(ctx) {
|
|
|
1911
1911
|
workdir: { type: 'string', description: 'Repository used for isolation worktrees (absolute path).' },
|
|
1912
1912
|
activeHours: { type: 'string', description: 'Wake only inside this window, e.g. "09:00-23:00" (supports overnight).' },
|
|
1913
1913
|
batchLimit: { type: 'number', description: 'Max items listed per wake (1-20, default 5).' },
|
|
1914
|
-
maxWakesPerHour: { type: 'number', description: 'Max wakes per hour (1-60, default 6).' },
|
|
1914
|
+
maxWakesPerHour: { type: 'number', description: 'Max wakes per hour per watcher (1-60, default 6).' },
|
|
1915
|
+
sessionMaxWakes: { type: 'number', description: 'Max wakes per hour for the whole session, summed across watchers (1-60, default 12).' },
|
|
1916
|
+
isolateKeepDays: { type: 'number', description: 'With isolated: remove isolation worktrees older than this many days (1-30, default 3).' },
|
|
1917
|
+
maxIsolated: { type: 'number', description: 'With isolated: keep at most this many worktrees, oldest removed first (1-50, default 5).' },
|
|
1915
1918
|
goal: { type: 'string', description: 'Optional per-watcher goal appended to the wake message.' },
|
|
1916
1919
|
},
|
|
1917
1920
|
async execute(args) {
|
|
@@ -1961,6 +1964,10 @@ export function apply(ctx) {
|
|
|
1961
1964
|
if (typeof args.activeHours === 'string') entry.activeHours = args.activeHours.trim() || null
|
|
1962
1965
|
if (typeof args.batchLimit === 'number') entry.batchLimit = Math.max(1, Math.min(20, Math.round(args.batchLimit)))
|
|
1963
1966
|
if (typeof args.maxWakesPerHour === 'number') entry.maxWakesPerHour = Math.max(1, Math.min(60, Math.round(args.maxWakesPerHour)))
|
|
1967
|
+
// 面板能改的三项,工具也要能改 —— 否则被问"把隔离区最多留 3 个"时 agent 无从下手
|
|
1968
|
+
if (typeof args.sessionMaxWakes === 'number') entry.sessionMaxWakes = Math.max(1, Math.min(60, Math.round(args.sessionMaxWakes)))
|
|
1969
|
+
if (typeof args.isolateKeepDays === 'number') entry.isolateKeepDays = Math.max(1, Math.min(30, Math.round(args.isolateKeepDays)))
|
|
1970
|
+
if (typeof args.maxIsolated === 'number') entry.maxIsolated = Math.max(1, Math.min(50, Math.round(args.maxIsolated)))
|
|
1964
1971
|
entry.enabled = true
|
|
1965
1972
|
state.watchers = state.watchers || {}
|
|
1966
1973
|
state.watchers[id] = entry
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.41",
|
|
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",
|