dsh-session-superagent 0.9.280 → 0.9.281
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 +23 -0
- package/README.md +3 -3
- package/client.js +35 -8
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
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.281] - 2026-11-06 —— Pill、Tag 与 StateDot 官方化
|
|
6
|
+
|
|
7
|
+
### 筛选 Pill
|
|
8
|
+
|
|
9
|
+
共享 `Pill()` 迁移到官方组件,9 个过滤/清除调用点不变。
|
|
10
|
+
active/className/children/onClick/rest 全透传,交互形态补 `aria-pressed`;无 onClick 时使用官方静态 span,不伪造按钮。
|
|
11
|
+
缺导出时交互回退 `button.dt-pill`,静态回退 `span.dt-pill`。
|
|
12
|
+
|
|
13
|
+
### 只读 Tag 与状态点
|
|
14
|
+
|
|
15
|
+
- `Tag()` 委托官方 `tone/className/children`,官方不收 title 时用无样式 span 保留。
|
|
16
|
+
- `StateDot()` 原样传递 done/warning/ongoing/error/idle、size 与 className。
|
|
17
|
+
- 两个组件独立探测、独立回退;ongoing 回退也保留调用方 className。
|
|
18
|
+
|
|
19
|
+
### 验证
|
|
20
|
+
|
|
21
|
+
- Pill 定向 **124/124**;Tag/StateDot 定向 **125/125**。
|
|
22
|
+
- 合并后定向 **129/129**,全量 **622/622**。
|
|
23
|
+
- 真实 Chromium **47/47**:筛选、Orbit/Modal、深层表单与防写 403 全部通过。
|
|
24
|
+
- UI 体检 **11/11=100**。
|
|
25
|
+
|
|
26
|
+
未验真实 DSH Web GUI 与真实 watcher 写操作。按 Git 工作流保留本地候选。
|
|
27
|
+
|
|
5
28
|
## [0.9.280] - 2026-11-06 —— 深层 UI 验收与高级区可访问性
|
|
6
29
|
|
|
7
30
|
### 高级区 aria 关联
|
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 # 622 项单测(带离线开关;裸 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 # 622 项单测(带离线开关,约 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
|
@@ -356,6 +356,9 @@ window.__ModuleLoader__.load({
|
|
|
356
356
|
let hostInput = null
|
|
357
357
|
let hostSwitch = null
|
|
358
358
|
let hostSegmentedTabs = null
|
|
359
|
+
let hostTag = null
|
|
360
|
+
let hostStateDot = null
|
|
361
|
+
let hostPill = null
|
|
359
362
|
let hostTooltip = null
|
|
360
363
|
let hostOrbit = null
|
|
361
364
|
let hostOrbitRow = null
|
|
@@ -369,6 +372,11 @@ window.__ModuleLoader__.load({
|
|
|
369
372
|
hostSwitch = primitives.Switch || null
|
|
370
373
|
// SegmentedTabs 同样独立探测:缺导出时完整保留下方 SegTabs,不影响其它原语。
|
|
371
374
|
hostSegmentedTabs = primitives.SegmentedTabs || null
|
|
375
|
+
// Tag 与 StateDot 各自独立探测:任何一个缺导出都只回退自己,不影响另一个或其它原语。
|
|
376
|
+
hostTag = primitives.Tag || null
|
|
377
|
+
hostStateDot = primitives.StateDot || null
|
|
378
|
+
// Pill 同样独立探测:缺导出时完整保留下方本地胶囊,不影响其它原语。
|
|
379
|
+
hostPill = primitives.Pill || null
|
|
372
380
|
if (primitives && primitives.Modal && primitives.Toast && primitives.IconWarningOutlineMedium) {
|
|
373
381
|
hostUi = createHostUi({ React, primitives })
|
|
374
382
|
// Tooltip 独立探测:缺少它只回退 InfoTip,不把已接入的 Modal/Toast 一起降级。
|
|
@@ -380,6 +388,9 @@ window.__ModuleLoader__.load({
|
|
|
380
388
|
hostInput = null
|
|
381
389
|
hostSwitch = null
|
|
382
390
|
hostSegmentedTabs = null
|
|
391
|
+
hostTag = null
|
|
392
|
+
hostStateDot = null
|
|
393
|
+
hostPill = null
|
|
383
394
|
hostTooltip = null
|
|
384
395
|
}
|
|
385
396
|
|
|
@@ -403,7 +414,7 @@ window.__ModuleLoader__.load({
|
|
|
403
414
|
}
|
|
404
415
|
|
|
405
416
|
// 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
|
|
406
|
-
const CLIENT_VERSION = '0.9.
|
|
417
|
+
const CLIENT_VERSION = '0.9.281'
|
|
407
418
|
// SEMVER_COMPARATOR_SOURCE_START
|
|
408
419
|
// This block is duplicated verbatim in client.js because the browser UMD cannot import ESM.
|
|
409
420
|
// test/update-semver.test.mjs audits both copies and exercises their behavior.
|
|
@@ -730,8 +741,13 @@ window.__ModuleLoader__.load({
|
|
|
730
741
|
// 保留安装动作现有调用面;其它受支持 variant 也统一由 Btn 内的宿主分支委托,老宿主完整回退。
|
|
731
742
|
const UpdateButton = hostButton || Btn
|
|
732
743
|
|
|
733
|
-
function Tag({ tone = 'outline', title, children }) {
|
|
734
|
-
|
|
744
|
+
function Tag({ tone = 'outline', title, className, children }) {
|
|
745
|
+
if (hostTag) {
|
|
746
|
+
const tag = h(hostTag, { tone, className }, children)
|
|
747
|
+
// 官方 Tag 是静态只读组件,不收 title;只在确有提示时加无样式 wrapper,不丢原有悬停语义。
|
|
748
|
+
return title === undefined ? tag : h('span', { title }, tag)
|
|
749
|
+
}
|
|
750
|
+
return h('span', { className: cx('dt-tag', className), 'data-tone': tone, title }, children)
|
|
735
751
|
}
|
|
736
752
|
|
|
737
753
|
/** 页级 tab 条:点当前页会再发一次 onChange(回调里可重置到根部)。 */
|
|
@@ -792,9 +808,10 @@ window.__ModuleLoader__.load({
|
|
|
792
808
|
}, h('span', { className: 'dt-switch-thumb' }))
|
|
793
809
|
}
|
|
794
810
|
|
|
795
|
-
function StateDot({ state, className }) {
|
|
811
|
+
function StateDot({ state, size, className }) {
|
|
812
|
+
if (hostStateDot) return h(hostStateDot, { state, size, className })
|
|
796
813
|
if (state === 'ongoing') {
|
|
797
|
-
return h('svg', { className: 'dt-spinner', 'data-state': 'ongoing', width: 14, height: 14, viewBox: '0 0 24 24', 'aria-hidden': 'true' },
|
|
814
|
+
return h('svg', { className: cx('dt-spinner', className), 'data-state': 'ongoing', width: size ?? 14, height: size ?? 14, viewBox: '0 0 24 24', 'aria-hidden': 'true' },
|
|
798
815
|
h('g', null,
|
|
799
816
|
h('circle', { cx: 12, cy: 12, r: 9.5 }),
|
|
800
817
|
h('animateTransform', { attributeName: 'transform', type: 'rotate', from: '0 12 12', to: '360 12 12', dur: '1.6s', repeatCount: 'indefinite' })))
|
|
@@ -879,10 +896,20 @@ window.__ModuleLoader__.load({
|
|
|
879
896
|
items.map((text, index) => h('li', { key: index }, text))))
|
|
880
897
|
}
|
|
881
898
|
|
|
882
|
-
/**
|
|
883
|
-
function Pill({ active, onClick, children }) {
|
|
899
|
+
/** DSH Pill:有 onClick 时是可切换按钮,否则是静态只读胶囊。 */
|
|
900
|
+
function Pill({ active = false, className, onClick, children, ...rest }) {
|
|
901
|
+
if (hostPill) {
|
|
902
|
+
// 官方没有 aria-pressed;只在交互形态最小补齐,不把只读 badge 变成按钮。
|
|
903
|
+
return h(hostPill, {
|
|
904
|
+
...rest, active, className, onClick,
|
|
905
|
+
'aria-pressed': onClick ? !!active : undefined,
|
|
906
|
+
}, children)
|
|
907
|
+
}
|
|
908
|
+
if (!onClick) {
|
|
909
|
+
return h('span', { className: cx('dt-pill', active && 'dt-pill-active', className) }, children)
|
|
910
|
+
}
|
|
884
911
|
return h('button', {
|
|
885
|
-
type: 'button', className: cx('dt-pill', active && 'dt-pill-active'),
|
|
912
|
+
type: 'button', ...rest, className: cx('dt-pill', active && 'dt-pill-active', className),
|
|
886
913
|
'aria-pressed': !!active, onClick,
|
|
887
914
|
}, children)
|
|
888
915
|
}
|
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.281'
|
|
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.281",
|
|
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",
|