dsh-session-superagent 0.9.281 → 0.9.282
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 +27 -0
- package/README.md +3 -3
- package/client.js +54 -27
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
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.282] - 2026-11-06 —— CollapsibleList 与首载/校验修复
|
|
6
|
+
|
|
7
|
+
### 折叠列表
|
|
8
|
+
|
|
9
|
+
CollapsibleList 有官方 DisclosureRow 时使用 `expandable=true + expandOnRowClick=true`,缺导出完整回退。
|
|
10
|
+
标题计数、摘要、ul/li、点击/Enter/Space 与焦点保留;高级区 aria-controls 不受影响。
|
|
11
|
+
|
|
12
|
+
### 首次加载与 Orbit
|
|
13
|
+
|
|
14
|
+
- 主面板仅在 snap.body 存在时渲染业务 tabpanel,首次 loading/失败不再显示零统计和 Onboarding。
|
|
15
|
+
- Orbit 区分读取中、读取失败和真实空列表;首败不写成“还没有主理鱼”,成功读取清除读取失败。
|
|
16
|
+
- 已有成功快照时保留旧数据并显示错误。
|
|
17
|
+
|
|
18
|
+
### 表单校验
|
|
19
|
+
|
|
20
|
+
原生保存点击在 checkValidity=false 时调用 reportValidity 并聚焦 :invalid,不发送 POST;有效路径不变。
|
|
21
|
+
|
|
22
|
+
### 验证
|
|
23
|
+
|
|
24
|
+
- CollapsibleList 定向 133/133、主线+专项 Chromium 51/51。
|
|
25
|
+
- 首载/校验定向 137/137,合并全量 630/630。
|
|
26
|
+
- 主线真实 Chromium 47/47;Orbit/Modal 契约 26/26。
|
|
27
|
+
- UI 体检 11/11=100。
|
|
28
|
+
|
|
29
|
+
严格审查报告同时入库:必须修 11、值得改 18,后续按批处理。
|
|
30
|
+
未验真实 DSH Web GUI 与真实 watcher 写操作。按 Git 工作流保留本地候选。
|
|
31
|
+
|
|
5
32
|
## [0.9.281] - 2026-11-06 —— Pill、Tag 与 StateDot 官方化
|
|
6
33
|
|
|
7
34
|
### 筛选 Pill
|
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 # 630 项单测(带离线开关;裸 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 # 630 项单测(带离线开关,约 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
|
@@ -359,6 +359,7 @@ window.__ModuleLoader__.load({
|
|
|
359
359
|
let hostTag = null
|
|
360
360
|
let hostStateDot = null
|
|
361
361
|
let hostPill = null
|
|
362
|
+
let hostCollapsibleRow = null
|
|
362
363
|
let hostTooltip = null
|
|
363
364
|
let hostOrbit = null
|
|
364
365
|
let hostOrbitRow = null
|
|
@@ -377,6 +378,8 @@ window.__ModuleLoader__.load({
|
|
|
377
378
|
hostStateDot = primitives.StateDot || null
|
|
378
379
|
// Pill 同样独立探测:缺导出时完整保留下方本地胶囊,不影响其它原语。
|
|
379
380
|
hostPill = primitives.Pill || null
|
|
381
|
+
// 仅供 CollapsibleList:WatcherForm 高级区需要 bodyId/aria-controls,必须继续走本地 DisclosureRow。
|
|
382
|
+
hostCollapsibleRow = primitives.DisclosureRow || null
|
|
380
383
|
if (primitives && primitives.Modal && primitives.Toast && primitives.IconWarningOutlineMedium) {
|
|
381
384
|
hostUi = createHostUi({ React, primitives })
|
|
382
385
|
// Tooltip 独立探测:缺少它只回退 InfoTip,不把已接入的 Modal/Toast 一起降级。
|
|
@@ -391,6 +394,7 @@ window.__ModuleLoader__.load({
|
|
|
391
394
|
hostTag = null
|
|
392
395
|
hostStateDot = null
|
|
393
396
|
hostPill = null
|
|
397
|
+
hostCollapsibleRow = null
|
|
394
398
|
hostTooltip = null
|
|
395
399
|
}
|
|
396
400
|
|
|
@@ -414,7 +418,7 @@ window.__ModuleLoader__.load({
|
|
|
414
418
|
}
|
|
415
419
|
|
|
416
420
|
// 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
|
|
417
|
-
const CLIENT_VERSION = '0.9.
|
|
421
|
+
const CLIENT_VERSION = '0.9.282'
|
|
418
422
|
// SEMVER_COMPARATOR_SOURCE_START
|
|
419
423
|
// This block is duplicated verbatim in client.js because the browser UMD cannot import ESM.
|
|
420
424
|
// test/update-semver.test.mjs audits both copies and exercises their behavior.
|
|
@@ -883,15 +887,17 @@ window.__ModuleLoader__.load({
|
|
|
883
887
|
h(Hint, null, '想先看看效果?在「触发」页勾上「仅观察」:它只记录本会唤醒哪几条,不会真打扰你。'))
|
|
884
888
|
}
|
|
885
889
|
|
|
886
|
-
/** 官方 DisclosureRow
|
|
890
|
+
/** 官方 DisclosureRow 承载过滤清单;缺导出时完整保留本地键盘与焦点行为。 */
|
|
887
891
|
function CollapsibleList({ title, items }) {
|
|
888
892
|
const [open, setOpen] = useState(false)
|
|
889
|
-
|
|
893
|
+
const rowProps = {
|
|
890
894
|
title: title + '(' + items.length + ')',
|
|
891
|
-
open, onToggle: () => setOpen(!
|
|
895
|
+
open, onToggle: () => setOpen((current) => !current),
|
|
892
896
|
icon: h(Icon, { name: 'question', size: 14 }),
|
|
893
897
|
collapsedContent: h('span', { className: 'dt-hint' }, items[0] ? String(items[0]).slice(0, 40) : ''),
|
|
894
|
-
}
|
|
898
|
+
}
|
|
899
|
+
return h(hostCollapsibleRow || DisclosureRow,
|
|
900
|
+
hostCollapsibleRow ? { ...rowProps, expandable: true, expandOnRowClick: true } : rowProps,
|
|
895
901
|
h('ul', { className: 'dt-plain-list' },
|
|
896
902
|
items.map((text, index) => h('li', { key: index }, text))))
|
|
897
903
|
}
|
|
@@ -1141,7 +1147,12 @@ window.__ModuleLoader__.load({
|
|
|
1141
1147
|
if (event && typeof event.preventDefault === 'function') event.preventDefault()
|
|
1142
1148
|
// 原生点击保存时仍执行 constraints;测试桩没有 form,直接走同一提交函数。
|
|
1143
1149
|
const form = event && event.currentTarget && event.currentTarget.form
|
|
1144
|
-
if (form && typeof form.checkValidity === 'function' && !form.checkValidity())
|
|
1150
|
+
if (form && typeof form.checkValidity === 'function' && !form.checkValidity()) {
|
|
1151
|
+
if (typeof form.reportValidity === 'function') form.reportValidity()
|
|
1152
|
+
const invalid = typeof form.querySelector === 'function' ? form.querySelector(':invalid') : null
|
|
1153
|
+
if (invalid && typeof invalid.focus === 'function') invalid.focus()
|
|
1154
|
+
return false
|
|
1155
|
+
}
|
|
1145
1156
|
if (busyRef.current || disabled || (mode === 'edit' && !dirty)) return false
|
|
1146
1157
|
if (mode === 'create' && (!sessionId || !String(values.repo || '').trim())) return false
|
|
1147
1158
|
busyRef.current = true
|
|
@@ -1577,9 +1588,13 @@ window.__ModuleLoader__.load({
|
|
|
1577
1588
|
const load = async () => {
|
|
1578
1589
|
try {
|
|
1579
1590
|
const body = await call('/state')
|
|
1580
|
-
if (alive)
|
|
1581
|
-
|
|
1582
|
-
|
|
1591
|
+
if (alive) {
|
|
1592
|
+
setWatchers(Array.isArray(body && body.watchers) ? body.watchers : [])
|
|
1593
|
+
setOrbitError((current) => typeof current === 'string' && current.startsWith('读取失败:') ? null : current)
|
|
1594
|
+
}
|
|
1595
|
+
} catch (error) {
|
|
1596
|
+
// null=尚未读到,[]=成功读到空列表;首次失败不能伪造成“还没有主理鱼”。
|
|
1597
|
+
if (alive) setOrbitError('读取失败:' + String((error && error.message) || error).slice(0, 160))
|
|
1583
1598
|
}
|
|
1584
1599
|
}
|
|
1585
1600
|
load()
|
|
@@ -1619,15 +1634,18 @@ window.__ModuleLoader__.load({
|
|
|
1619
1634
|
}, [open])
|
|
1620
1635
|
|
|
1621
1636
|
const list = watchers || []
|
|
1637
|
+
const readError = typeof orbitError === 'string' && orbitError.startsWith('读取失败:') ? orbitError : null
|
|
1622
1638
|
// Never hide the entry: with nothing being watched it stays as a grey
|
|
1623
1639
|
// ring, so the affordance is always findable in the dock row.
|
|
1624
1640
|
const running = list.filter((w) => orbitStateOf(w) === 'active').length
|
|
1625
1641
|
const broken = list.filter((w) => orbitStateOf(w) === 'error').length
|
|
1626
|
-
const summary =
|
|
1627
|
-
? '
|
|
1628
|
-
:
|
|
1629
|
-
|
|
1630
|
-
|
|
1642
|
+
const summary = readError && watchers === null
|
|
1643
|
+
? '读不到主理鱼状态'
|
|
1644
|
+
: list.length === 0
|
|
1645
|
+
? '还没有主理鱼'
|
|
1646
|
+
: '会话级 superagent:' + running + ' 运行中'
|
|
1647
|
+
+ (broken ? ',' + broken + ' 异常' : '')
|
|
1648
|
+
+ '(共 ' + list.length + ' 条)'
|
|
1631
1649
|
|
|
1632
1650
|
const toggle = () => {
|
|
1633
1651
|
if (!hostOrbit) {
|
|
@@ -1643,9 +1661,11 @@ window.__ModuleLoader__.load({
|
|
|
1643
1661
|
const button = h('button', {
|
|
1644
1662
|
ref: btnRef,
|
|
1645
1663
|
type: 'button',
|
|
1646
|
-
title:
|
|
1647
|
-
?
|
|
1648
|
-
:
|
|
1664
|
+
title: readError && watchers === null
|
|
1665
|
+
? readError
|
|
1666
|
+
: list.length
|
|
1667
|
+
? list.map((w) => (w.repo + ' · ' + (w.title || '未命名会话') + ' · ' + sessionTag(w.sessionId) + ' · ' + STATE_TEXT[orbitStateOf(w)])).join('\n')
|
|
1668
|
+
: '还没有主理鱼 —— 在「主理鱼」页加一条',
|
|
1649
1669
|
'aria-label': summary,
|
|
1650
1670
|
'aria-expanded': open ? 'true' : 'false',
|
|
1651
1671
|
className: cx('dt-btn', 'dt-btn-ghost', 'sa-orbit-trigger', watchers === null && 'is-loading'),
|
|
@@ -1791,13 +1811,20 @@ window.__ModuleLoader__.load({
|
|
|
1791
1811
|
h('div', { className: 'sa-dock-head' },
|
|
1792
1812
|
h('span', { className: 'sa-dock-title' }, '主理鱼'),
|
|
1793
1813
|
// 和面板统计条同一套官方素材:dt-stat(数值强 + 单位弱),不再自己发明 sa-dock-metric-*
|
|
1794
|
-
h(Stat, {
|
|
1814
|
+
h(Stat, {
|
|
1815
|
+
className: 'sa-dock-metric',
|
|
1816
|
+
value: watchers === null ? '—' : running + ' / ' + list.length,
|
|
1817
|
+
unit: watchers === null ? (readError ? '读取失败' : '读取中') : '主理中',
|
|
1818
|
+
})),
|
|
1795
1819
|
bar,
|
|
1796
|
-
|
|
1797
|
-
? h('div', { className: 'sa-dock-empty' }, '
|
|
1798
|
-
:
|
|
1799
|
-
|
|
1800
|
-
|
|
1820
|
+
watchers === null
|
|
1821
|
+
? (!readError ? h('div', { className: 'sa-dock-empty' }, '正在读取…') : null)
|
|
1822
|
+
: list.length === 0
|
|
1823
|
+
? h('div', { className: 'sa-dock-empty' }, '还没有。在「主理鱼」标签页填 owner/name 加一条。')
|
|
1824
|
+
: h(hostOrbitRow ? 'ul' : 'div', { className: 'sa-dock-rows' }, rows),
|
|
1825
|
+
// 读失败与写操作失败分开说;旧列表仍可保留在错误上方。
|
|
1826
|
+
readError ? h('div', { className: 'sa-dock-err', role: 'alert' }, readError) : null,
|
|
1827
|
+
!readError && orbitError ? h('div', { className: 'sa-dock-err', role: 'alert' }, '操作失败:' + orbitError) : null,
|
|
1801
1828
|
list.length > 0
|
|
1802
1829
|
? h('div', { className: 'sa-dock-foot' }, '详细状态与凭证在「主理鱼」标签页')
|
|
1803
1830
|
: null)
|
|
@@ -3276,16 +3303,16 @@ window.__ModuleLoader__.load({
|
|
|
3276
3303
|
h('div', { className: 'dt-actions' }, h(Btn, { size: 'sm', variant: 'primary', onClick: () => load() }, '重试')))
|
|
3277
3304
|
: null,
|
|
3278
3305
|
snap.loading && !snap.body ? h(Hint, null, '正在读取…') : null,
|
|
3279
|
-
tab === 'overview' ? h('div', {
|
|
3306
|
+
snap.body && tab === 'overview' ? h('div', {
|
|
3280
3307
|
id: 'sa-main-panel-overview', role: 'tabpanel', 'aria-labelledby': 'sa-main-tab-overview', className: 'dt-tabpanel',
|
|
3281
3308
|
}, overview, repoSummary) : null,
|
|
3282
|
-
tab === 'judge' ? h('div', {
|
|
3309
|
+
snap.body && tab === 'judge' ? h('div', {
|
|
3283
3310
|
id: 'sa-main-panel-judge', role: 'tabpanel', 'aria-labelledby': 'sa-main-tab-judge', className: 'dt-tabpanel',
|
|
3284
3311
|
}, judge, timeline) : null,
|
|
3285
|
-
tab === 'trigger' ? h('div', {
|
|
3312
|
+
snap.body && tab === 'trigger' ? h('div', {
|
|
3286
3313
|
id: 'sa-main-panel-trigger', role: 'tabpanel', 'aria-labelledby': 'sa-main-tab-trigger', className: 'dt-tabpanel',
|
|
3287
3314
|
}, trigger) : null,
|
|
3288
|
-
tab === 'settings' ? h('div', {
|
|
3315
|
+
snap.body && tab === 'settings' ? h('div', {
|
|
3289
3316
|
id: 'sa-main-panel-settings', role: 'tabpanel', 'aria-labelledby': 'sa-main-tab-settings', className: 'dt-tabpanel',
|
|
3290
3317
|
}, settings) : null,
|
|
3291
3318
|
typeof glossary === 'string' ? h(PanelModal, {
|
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.282'
|
|
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.282",
|
|
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",
|