dsh-session-superagent 0.9.276 → 0.9.277

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,36 @@
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.277] - 2026-11-06 —— 全部按钮原生化 + 完整 Orbit/Modal 验收
6
+
7
+ ### 全部按钮接入官方 Button
8
+
9
+ `Btn` 现对官方支持的 `primary / ghost / outline / toolbar` 全部委托 DSH Button,默认 `ghost/md`。
10
+ 业务 `link` 没有官方同物,保留旧 `button.dt-btn-link`,未自造映射。
11
+ 业务 className、onClick、disabled、icon、size、aria、type、ref 全透传;缺 Button 或整个 primitives 时完整回退旧 DOM。
12
+
13
+ 真实 Chromium 全按钮对比度 **23/23,16/16 非禁用测量通过**:
14
+ primary 深色 18.0823、浅色 18.8965;ghost/outline 对照也全部达标。
15
+
16
+ ### 完整 Orbit/Modal 验收
17
+
18
+ 真实 client.js UMD 双 root 分别挂载 desk 与 `StatusOrbit()`(无 props,fixture `/state` 提供两条守)。
19
+ 覆盖 Orbit 打开/关闭、初始焦点、Escape 回焦、进入设置/行内编辑、删除确认 Modal、Tab 焦点圈、取消回圆环。
20
+ 功能走查 mutation=0,独立防写探针真实返回 403。最终 **34/34**,主线复跑全 PASS。
21
+ 截图通道问题单列 SKIP,不阻断 DOM/焦点验收。
22
+
23
+ ### 证据
24
+
25
+ ```
26
+ 更新 UI 15/15;按钮联合 121/121
27
+ 完整 Orbit/Modal Chromium → 34/34
28
+ 全按钮对比度 → 23/23
29
+ npm test → 602/602
30
+ UI 体检 → 11/11(100 分)
31
+ ```
32
+
33
+ 未进入真实 DSH Web GUI;未执行真实保存、删除、更新或 watcher 轮询。按 Git 工作流保留本地候选。
34
+
5
35
  ## [0.9.276] - 2026-11-06 —— DSH 0.2.2-rc.1 显式兼容范围
6
36
 
7
37
  - `engines.dsh` 改为 `>=0.2.1-rc.5 <0.2.2-0 || >=0.2.2-rc.1 <0.3.0-0`:保留旧宿主支持,默认 semver 也覆盖 `0.2.2-rc.1`,并在 `includePrerelease: true` 下排除未验证的 `0.3.0` 预发布。
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.276-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.9.277-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
  [![awesome](https://img.shields.io/badge/awesome-dsh--plugin-%E2%9C%93-success.svg)](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
@@ -148,7 +148,7 @@ Gitee 私有仓库要在「设置 → 凭证」填私人令牌;公开仓库不
148
148
  ## 开发
149
149
 
150
150
  ```sh
151
- npm test # 601 项单测(带离线开关;裸 node --test 会真去 spawn gh,两分半)
151
+ npm test # 602 项单测(带离线开关;裸 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 # 601 项单测(带离线开关,约 1.6 秒)
211
+ npm test # 602 项单测(带离线开关,约 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
@@ -350,7 +350,7 @@ window.__ModuleLoader__.load({
350
350
  let hostOrbit = null
351
351
  try {
352
352
  const primitives = require('@deepseek-ai/dsh-client-ui-primitives')
353
- // Button 独立探测:老宿主缺 Modal/Toast 时仍可复用官方按钮;缺 Button 时所有 primary 完整回退旧 Btn。
353
+ // Button 独立探测:老宿主缺 Modal/Toast 时仍可复用官方按钮;缺 Button 时所有 variant 完整回退旧 Btn。
354
354
  hostButton = primitives.Button || null
355
355
  if (primitives && primitives.Modal && primitives.Toast && primitives.IconWarningOutlineMedium) {
356
356
  hostUi = createHostUi({ React, primitives })
@@ -379,7 +379,7 @@ window.__ModuleLoader__.load({
379
379
  }
380
380
 
381
381
  // 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
382
- const CLIENT_VERSION = '0.9.276'
382
+ const CLIENT_VERSION = '0.9.277'
383
383
  // SEMVER_COMPARATOR_SOURCE_START
384
384
  // This block is duplicated verbatim in client.js because the browser UMD cannot import ESM.
385
385
  // test/update-semver.test.mjs audits both copies and exercises their behavior.
@@ -682,9 +682,13 @@ window.__ModuleLoader__.load({
682
682
 
683
683
  const cx = (...names) => names.filter(Boolean).join(' ')
684
684
 
685
+ // 安装版 Button 的真实 variant 映射:primary/ghost/outline/toolbar × md/sm,默认 ghost/md。
686
+ // 业务的 link 没有官方同物:保留旧 dt-btn-link,不借 toolbar/ghost 自造映射。
687
+ const HOST_BUTTON_VARIANTS = new Set(['primary', 'ghost', 'outline', 'toolbar'])
688
+
685
689
  function Btn({ variant = 'ghost', size = 'md', icon, children, className, ...rest }) {
686
- if (variant === 'primary' && hostButton) {
687
- // 只转发业务 className:旧 dt-btn-primary 会覆盖宿主主题,造成深色白底浅字。
690
+ if (hostButton && HOST_BUTTON_VARIANTS.has(variant)) {
691
+ // 只转发业务 className:旧 dt-btn + variant/size 会覆盖宿主主题,不能回填到官方路径。
688
692
  // type 默认 button,但显式 submit 等原生 props(含 ref)必须原样交给 DSH Button;key 仍由 React 管理。
689
693
  return h(hostButton, { type: 'button', ...rest, variant, size, icon, className }, children)
690
694
  }
@@ -694,7 +698,7 @@ window.__ModuleLoader__.load({
694
698
  children)
695
699
  }
696
700
 
697
- // 保留安装动作现有调用面;其它 primary 也统一由 Btn 内的宿主分支委托,老宿主完整回退。
701
+ // 保留安装动作现有调用面;其它受支持 variant 也统一由 Btn 内的宿主分支委托,老宿主完整回退。
698
702
  const UpdateButton = hostButton || Btn
699
703
 
700
704
  function Tag({ tone = 'outline', title, children }) {
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.276'
52
+ export const SERVER_VERSION = '0.9.277'
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.276",
3
+ "version": "0.9.277",
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",