dsh-session-superagent 0.9.35 → 0.9.36

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,24 @@
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.36] - 2026-11-02 —— 信息密度体检:首屏区块数 ≤ 6 且写进判据
6
+
7
+ ### 学到的(知识库第 84 条)
8
+ 把"信息密度"从感觉变成**可执行的数字**:默认展开的区块数 ≤ 6。
9
+
10
+ ### 体检脚本
11
+ `scripts/audit-density.mjs` 静态解析 `client.js`,数每个 tab 里 `h(Section, …)` 的个数。
12
+
13
+ ### 抓到的两处并修掉
14
+ 1. **judge 页有两个都叫「追溯一条」的区块**(上一轮为"有编号/无编号"写了两个分支,各返回一个 Section)
15
+ → 合并成一个,内部按是否有编号分岔;
16
+ 2. **trigger 页 7 个区块**超过上限 → 把「诊断」并进「版本与更新」(同属排查/维护)。
17
+
18
+ 修完:**最密集一页 6 个区块**,正好压在上限内。
19
+
20
+ ### 门禁
21
+ `preflight --fast` 第 **16** 项:`PASS 信息密度 最密集一页 6 个区块(上限 6)`。
22
+
5
23
  ## [0.9.35] - 2026-11-02 —— 「今天明显比平时忙」:阈值故意定高
6
24
 
7
25
  ### 学到的(知识库第 83 条)
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.35-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.9.36-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.9.35'
17
+ const CLIENT_VERSION = '0.9.36'
18
18
  let BASE = '/session-superagent'
19
19
  /**
20
20
  * 挑「最新的那个服务端实例」。
@@ -1231,27 +1231,25 @@ window.__ModuleLoader__.load({
1231
1231
  (() => {
1232
1232
  const needle = search.trim()
1233
1233
  const asNumber = /^#?[0-9]+$/.test(needle) ? needle.replace('#', '') : ''
1234
- if (!asNumber) {
1235
- return h(Section, { key: 'trace', title: '追溯一条', hint: '在右上角搜索框输入编号(如 42),这里就能查它经历了什么' },
1236
- h(Hint, null, '追溯会告诉你:它被过滤了、已经唤醒过、还是根本没轮到。'))
1237
- }
1238
1234
  const onlyRepo = watchers.length === 1 ? watchers[0].repo : ''
1239
- return h(Section, { key: 'trace', title: '追溯一条' },
1240
- h('div', { className: 'dt-row-meta' },
1241
- h('button', {
1242
- className: 'dt-textlink',
1243
- type: 'button',
1244
- onClick: async () => {
1245
- try {
1246
- const query = '/trace?number=' + encodeURIComponent(asNumber) + (onlyRepo ? '&repo=' + encodeURIComponent(onlyRepo) : '')
1247
- const payload = await call(query)
1248
- notify(String((payload && payload.text) || '没有结果').split(String.fromCharCode(10)).join(' · '), 'info')
1249
- } catch (error) {
1250
- notify('追溯失败:' + String((error && error.message) || error), 'error')
1251
- }
1252
- },
1253
- }, '追溯 #' + asNumber),
1254
- h('span', { className: 'dt-row-meta' }, onlyRepo ? '(在 ' + onlyRepo + ' 里查)' : '(在所有守里查)')))
1235
+ return h(Section, { key: 'trace', title: '追溯一条', hint: '在右上角搜索框输入编号(如 42),这里就能查它经历了什么' },
1236
+ asNumber
1237
+ ? h('div', { className: 'dt-row-meta' },
1238
+ h('button', {
1239
+ className: 'dt-textlink',
1240
+ type: 'button',
1241
+ onClick: async () => {
1242
+ try {
1243
+ const query = '/trace?number=' + encodeURIComponent(asNumber) + (onlyRepo ? '&repo=' + encodeURIComponent(onlyRepo) : '')
1244
+ const payload = await call(query)
1245
+ notify(String((payload && payload.text) || '没有结果').split(String.fromCharCode(10)).join(' · '), 'info')
1246
+ } catch (error) {
1247
+ notify('追溯失败:' + String((error && error.message) || error), 'error')
1248
+ }
1249
+ },
1250
+ }, '追溯 #' + asNumber),
1251
+ h('span', { className: 'dt-row-meta' }, onlyRepo ? '(在 ' + onlyRepo + ' 里查)' : '(在所有守里查)'))
1252
+ : h(Hint, null, '追溯会告诉你:它被过滤了、已经唤醒过、还是根本没轮到。'))
1255
1253
  })(),
1256
1254
  (() => {
1257
1255
  const counts = new Map()
@@ -1431,22 +1429,12 @@ window.__ModuleLoader__.load({
1431
1429
  : null,
1432
1430
  h('div', { className: 'dt-actions' },
1433
1431
  h(Btn, { size: 'sm', variant: 'ghost', onClick: () => checkUpdate(true), disabled: checking }, checking ? '检查中…' : '重新检查')),
1434
- h(Hint, null, '升级要改 profile,装完需要重载一次宿主才会用上新版本 —— 所以这里只给命令,不替你执行。')),
1435
- h(Section, { key: 'diagnose', title: '分诊信号与取舍' },
1436
- h(Hint, null, '一次只处理 N 条时,这些信号的加权决定先后。事实默认展示,判断默认关闭。'),
1437
- h('div', { className: 'dt-rows' }, (body.triageSignals || []).map((sig) => h('div', { key: sig.key, className: 'dt-row' },
1438
- h('div', { className: 'dt-row-main' },
1439
- h('div', { className: 'dt-row-title' },
1440
- h('span', { className: 'dt-row-name' }, sig.label),
1441
- h(Tag, { tone: sig.kind === 'fact' ? 'success' : 'warning' }, sig.kind === 'fact' ? '事实' : '判断'),
1442
- h(Tag, { tone: sig.default ? 'outline' : 'quiet' }, sig.default ? '默认开' : '默认关'),
1443
- h('span', { className: 'dt-row-meta' }, '+' + sig.weight + ' 分')),
1444
- h('div', { className: 'dt-hint' }, sig.why)))))),
1445
- h(Section, { key: 'diagnose', title: '诊断' },
1446
- h(Hint, null, '反馈问题时把这段贴给对方:里面有版本、挂载状态和每条值守的最近错误(凭证已脱敏)。'),
1432
+ h(Hint, null, '升级要改 profile,装完需要重载一次宿主才会用上新版本 —— 所以这里只给命令,不替你执行。'),
1433
+ h(Hint, null, '反馈问题时把下面这份诊断贴给对方:里面有版本、挂载状态和每条守的最近错误(凭证已脱敏)。'),
1447
1434
  h('div', { className: 'dt-actions' },
1448
1435
  h(Btn, {
1449
- size: 'sm', variant: 'outline',
1436
+ size: 'sm',
1437
+ variant: 'outline',
1450
1438
  onClick: async () => {
1451
1439
  try {
1452
1440
  const payload = await call('/diagnose')
@@ -1458,6 +1446,17 @@ window.__ModuleLoader__.load({
1458
1446
  }
1459
1447
  },
1460
1448
  }, '复制诊断信息'))),
1449
+ h(Section, { key: 'diagnose', title: '分诊信号与取舍' },
1450
+ h(Hint, null, '一次只处理 N 条时,这些信号的加权决定先后。事实默认展示,判断默认关闭。'),
1451
+ h('div', { className: 'dt-rows' }, (body.triageSignals || []).map((sig) => h('div', { key: sig.key, className: 'dt-row' },
1452
+ h('div', { className: 'dt-row-main' },
1453
+ h('div', { className: 'dt-row-title' },
1454
+ h('span', { className: 'dt-row-name' }, sig.label),
1455
+ h(Tag, { tone: sig.kind === 'fact' ? 'success' : 'warning' }, sig.kind === 'fact' ? '事实' : '判断'),
1456
+ h(Tag, { tone: sig.default ? 'outline' : 'quiet' }, sig.default ? '默认开' : '默认关'),
1457
+ h('span', { className: 'dt-row-meta' }, '+' + sig.weight + ' 分')),
1458
+ h('div', { className: 'dt-hint' }, sig.why)))))),
1459
+
1461
1460
  h(Section, { key: 'goal', title: '会话 goal' },
1462
1461
  h('textarea', {
1463
1462
  className: 'dt-textarea', rows: 3, value: goalDraft,
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.35'
42
+ export const SERVER_VERSION = '0.9.36'
43
43
  export const inject = ['tools', 'agents', 'webServer']
44
44
  /** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
45
45
  const DEFAULT_SESSION_WAKES = 12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-session-superagent",
3
- "version": "0.9.35",
3
+ "version": "0.9.36",
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",