dsh-session-superagent 0.8.44 → 0.8.45

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,32 @@
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.8.45] - 2026-11-02 —— 表单字段补齐官方 Field,状态色全部 token 化
6
+
7
+ ### ① 表单字段用官方 `Field`(带 hint / note)
8
+ 官方 `settings-kit.tsx` 的 `Field` 是 `label + hint(InfoTip) + 控件 + note(small)`。
9
+ 我们之前只有 `label`,说明只能塞进 placeholder。现在字段名旁有 `?` 图标,点开看人话:
10
+
11
+ - 「间隔(秒)」→ 多长时间检查一次这个仓库,最小 30 秒
12
+ - 「活跃时段」→ 只在这个时间段内唤醒;窗口外只攒条目,不打扰
13
+
14
+ ### ② 状态色不再写死
15
+ 轨道环的四个状态色之前是 `#3fb950 / #d29922 / #f85149 / #8b949e`(写死 hex,深色主题里就是错的),
16
+ toast 的错误左边条同样写死了 `#f85149`。现在全部改成 `--dsw-alias-state-*` / `--dsw-alias-label-caption`。
17
+
18
+ ### ③ UI 体检加第 10 项:写死颜色(含 inline style 与 JS 常量)
19
+ 之前只扫样式块,所以漏掉了上面这些。现在扫整个 client.js(排除搬来的 `PORTED_CSS`),
20
+ 要求 0 处 —— 否则「换主题就有一条颜色是错的」这类问题永远发现不了。
21
+
22
+ ### 指标
23
+ ```
24
+ 10/10 通过(100 分)
25
+ 写死颜色(样式块)0 · 写死颜色(inline/JS)0 · 官方结构 8/8 · 弹层键盘 3/3
26
+ ```
27
+
28
+ ### 测试
29
+ - 合计 **102 例**。
30
+
5
31
  ## [0.8.44] - 2026-11-02 —— 判定页换官方时间线 + 补齐四个原语
6
32
 
7
33
  按 `docs/ui-inventory.md` 第 3、4 项。
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.8.44-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.8.45-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
 
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.8.44'
17
+ const CLIENT_VERSION = '0.8.45'
18
18
  let BASE = '/session-superagent'
19
19
  /**
20
20
  * 挑「最新的那个服务端实例」。
@@ -438,7 +438,13 @@ window.__ModuleLoader__.load({
438
438
  return 'active'
439
439
  }
440
440
 
441
- const SAT_COLOR = { active: '#3fb950', paused: '#d29922', error: '#f85149', dormant: '#8b949e' }
441
+ // 状态色一律走 token(写死 hex 在深色/浅色两套主题里会有一个是错的)
442
+ const SAT_COLOR = {
443
+ active: 'var(--dsw-alias-state-success-primary)',
444
+ paused: 'var(--dsw-alias-state-warn-primary)',
445
+ error: 'var(--dsw-alias-state-error-primary)',
446
+ dormant: 'var(--dsw-alias-label-caption)',
447
+ }
442
448
  const STATE_TEXT = { active: '主理中', paused: '已暂停', error: '异常', dormant: '时段外' }
443
449
 
444
450
  /** 尊重系统的「减少动态效果」设置。 */
@@ -788,7 +794,7 @@ window.__ModuleLoader__.load({
788
794
  'aria-live': 'polite',
789
795
  // 官方 toast 是深底白字;错误态不要改成浅红底(白字会看不清),改用左侧红条标记
790
796
  style: item.tone === 'error'
791
- ? { '--dt-toast-hold': '3600ms', borderLeft: '3px solid #f85149' }
797
+ ? { '--dt-toast-hold': '3600ms', borderLeft: '3px solid var(--dsw-alias-state-error-primary)' }
792
798
  : { '--dt-toast-hold': '3600ms' },
793
799
  }, item.text)
794
800
  return [view, notify]
@@ -993,9 +999,9 @@ window.__ModuleLoader__.load({
993
999
  })))
994
1000
  const editor = editing === key
995
1001
  ? h('div', { className: 'dt-fieldset' },
996
- field('间隔(秒)', h(Input, { value: draft.intervalSec, onChange: (e) => setDraft({ ...draft, intervalSec: e.target.value }) })),
1002
+ field('间隔(秒)', h(Input, { value: draft.intervalSec, onChange: (e) => setDraft({ ...draft, intervalSec: e.target.value }) }), '多长时间检查一次这个仓库,最小 30 秒'),
997
1003
  field('只处理这些标签', h(Input, { value: draft.labels, placeholder: '逗号分隔,留空 = 全部', onChange: (e) => setDraft({ ...draft, labels: e.target.value }) })),
998
- field('活跃时段', h(Input, { value: draft.activeHours, placeholder: '09:00-23:00,留空 = 全天', onChange: (e) => setDraft({ ...draft, activeHours: e.target.value }) })),
1004
+ field('活跃时段', h(Input, { value: draft.activeHours, placeholder: '09:00-23:00,留空 = 全天', onChange: (e) => setDraft({ ...draft, activeHours: e.target.value }) }), '只在这个时间段内唤醒;窗口外只攒条目,不打扰'),
999
1005
  field('目标/规则', h(Input, { value: draft.goal || '', placeholder: '可选,会附在唤醒消息里', onChange: (e) => setDraft({ ...draft, goal: e.target.value }) })),
1000
1006
  h('label', { className: 'dt-switch-row' }, h(Toggle, { checked: !!draft.onlyAssigned, onChange: (v) => setDraft({ ...draft, onlyAssigned: v }), label: '只看已指派' }), '只处理已指派给人的条目'),
1001
1007
  field('单次最多唤醒条数', h(Input, { value: draft.batchLimit || '', placeholder: '5(1-20)', onChange: (e) => setDraft({ ...draft, batchLimit: e.target.value }) })),
@@ -1185,8 +1191,13 @@ window.__ModuleLoader__.load({
1185
1191
  return () => { alive = false }
1186
1192
  }, [])
1187
1193
 
1188
- function field(label, control) {
1189
- return h('label', { className: 'dt-field', key: label }, h('span', { className: 'dt-field-head' }, label), control)
1194
+ // 官方 settings-kit.tsx 的 Field:label + hint(InfoTip) + 控件 + note(small)。
1195
+ // 我们之前只有 label,说明只能塞进 placeholder —— 用户看不到「这个字段到底什么意思」。
1196
+ function field(label, control, hint, note) {
1197
+ return h('label', { className: 'dt-field', key: label },
1198
+ h('span', { className: 'dt-field-head' }, label, hint ? h(InfoTip, { text: hint }) : null),
1199
+ control,
1200
+ note ? h('small', null, note) : null)
1190
1201
  }
1191
1202
 
1192
1203
  return h('div', { className: 'dt-page' },
package/lib/index.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
 
31
31
  export const name = 'dsh-session-superagent'
32
32
  /** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
33
- export const SERVER_VERSION = '0.8.44'
33
+ export const SERVER_VERSION = '0.8.45'
34
34
  export const inject = ['tools', 'agents', 'webServer']
35
35
 
36
36
  /** 仅供测试:读写状态文件(生产代码不要用)。 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-session-superagent",
3
- "version": "0.8.44",
3
+ "version": "0.8.45",
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",