dsh-sticky-user-bubble 0.1.6 → 0.2.0

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,30 @@
2
2
 
3
3
  本文件记录本项目的所有重要变更。
4
4
 
5
+ ## [0.2.0] - 2026-10-01
6
+
7
+ ### 变更
8
+
9
+ - **跨到 `0.2.0` 发布线**:兼容线从 `>=0.1.7-alpha.1 <0.1.8` 整体换成 `>=0.2.0-rc.2 <0.2.1`,逐版本核对 `0.2.0-rc.2`。**这条线不再支持 0.1.7 及更早的 DSH**——还在 0.1.7 上请留在 0.1.7 版本;范围外插件的 Host 半体保持 inert。
10
+ - 版本门改为从发布线与下界常量派生(`DSH_RELEASE_LINE` / `DSH_RELEASE_FLOOR` / `PRERELEASE_CHANNELS`,`install.sh` 有等价的 shell 版):下界是 prerelease 时按档位优先级比较,`0.2.0-rc.1`、`0.2.0-beta.*`、`0.2.0-alpha.*` 都判为不支持,`0.2.0` 正式版判为支持。跨线只改常量与清单,判定逻辑不动。
11
+ - 在隔离宿主 + 无头 Chrome 上逐条重测六个几何常量(出现阈值、让位清距、`clip-path`、三行折叠、展开上限、composer 限高),并在活 DOM 上复核行标记与内层 16px padding:**数值与 0.1.7 全线一致**,**业务代码一字未改**。本线唯一与几何有关的核心变化是默认 flow gap 由 16px 降到 6px,让位清距改由插件自己的 `MIN_PUSH_GAP` 兜底,行为不变。
12
+ - 记录一条实测结论:DSH 的版本门只作用于 Host 半体,纯客户端插件的 client bundle 照旧进启动图并在浏览器里运行。
13
+
14
+ ### 文档
15
+
16
+ - `AGENTS.md` 增加 `0.1.7-rc.2 → 0.2.0-rc.2` 的逐项核对结果、两条差异与新的半离线量测记录;`README.md` 的要求一节改成 `0.2.0` 线;`PUBLISHING.md` 的示例版本同步。
17
+
18
+ ## [0.1.7] - 2026-09-28
19
+
20
+ ### 变更
21
+
22
+ - **`0.1.7-rc.2` 加入逐版本验证清单**(兼容范围仍是 `>=0.1.7-alpha.1 <0.1.8`):`package.json`、`engines.dsh` 同源的 `install.sh` 版本门与 `lib/index.js` 四处同步,安装器不再对 rc.2 打印「尚未逐版本验证」警告。
23
+ - 在隔离宿主 + 无头 Chromium 上量测几何契约后确认 rc.2 无需适配代码:出现阈值等于 scrollport 裁剪边(与阅读线仍差内层 16px padding)、让位时与下一张卡片的清距恒为消息间距 16px、三行折叠高 = 3 × 行高 + 上下 padding、hover 展开的上限随卡片逼近收敛且不越过 composer。rc.2 给聊天根新增的 `overflow:visible clip` 不改变可见性判定,测试里补了一条 `overflow-y: clip` 祖先的回归用例。
24
+
25
+ ### 文档
26
+
27
+ - `AGENTS.md` 增加 `0.1.7-alpha.1 → 0.1.7-rc.2` 的逐项核对结果与半离线量测记录;`README.md` 的要求一节写明 rc.2 已验证。
28
+
5
29
  ## [0.1.6] - 2026-09-22
6
30
 
7
31
  ### 变更
package/PUBLISHING.md CHANGED
@@ -12,8 +12,8 @@ npm publish --dry-run # 跑 prepublishOnly 并构造包,不上传
12
12
  ## 打 tag
13
13
 
14
14
  ```bash
15
- git tag dsh-sticky-user-bubble-v0.1.4
16
- git push origin dsh-sticky-user-bubble-v0.1.4
15
+ git tag dsh-sticky-user-bubble-v0.2.0
16
+ git push origin dsh-sticky-user-bubble-v0.2.0
17
17
  ```
18
18
 
19
19
  ## 安装路线
@@ -26,7 +26,7 @@ git push origin dsh-sticky-user-bubble-v0.1.4
26
26
  release_root="$(mktemp -d /tmp/dsh-sticky-user-bubble-release.XXXXXX)"
27
27
  mkdir -p "$release_root/artifacts"
28
28
  npm pack --ignore-scripts --pack-destination "$release_root/artifacts"
29
- tarball="$release_root/artifacts/dsh-sticky-user-bubble-0.1.4.tgz" # 换成本次发布的版本
29
+ tarball="$release_root/artifacts/dsh-sticky-user-bubble-0.2.0.tgz" # 换成本次发布的版本
30
30
  DSH_HOME="$release_root/dsh-home" \
31
31
  dsh plugin --profile web add "$tarball" --config.minimumReleaseAge=0
32
32
  DSH_HOME="$release_root/dsh-home" dsh web --dump-config
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  ## 要求
19
19
 
20
- - DeepSeek Harness Web `>=0.1.7-alpha.1 <0.1.8`;`0.1.7-alpha.1` 已逐版本验证。同线后续版本会给出警告,并继续依赖客户端结构与能力检查;范围外保持 inert。
20
+ - DeepSeek Harness Web `>=0.2.0-rc.2 <0.2.1`;`0.2.0-rc.2` 已逐版本验证(静态契约 + 单测,外加隔离宿主里对气泡出现阈值、让位清距与裁剪、三行折叠、展开上限、输入区限高与跳回的 `getBoundingClientRect()` 量测)。同线其他版本会给出警告,并继续依赖客户端结构与能力检查;范围外保持 inert——**0.1.7 及更早的 DSH 请继续用 0.1.7 版本的本插件**。
21
21
  - Node.js 20 或更高版本(仅安装与发布检查需要)。
22
22
  - 不需要额外的运行时 npm 依赖。
23
23
 
package/lib/index.js CHANGED
@@ -3,20 +3,37 @@ import { dirname, join } from 'node:path'
3
3
 
4
4
  export const PLUGIN_NAME = 'dsh-sticky-user-bubble'
5
5
  export const inject = []
6
- export const DSH_COMPATIBILITY_RANGE = '>=0.1.7-alpha.1 <0.1.8'
7
- const VERIFIED_DSH_VERSIONS = new Set(['0.1.7-alpha.1'])
8
- const DSH_VERSION_PATTERN = /^0\.1\.7(?:-(alpha|beta|rc)\.(0|[1-9]\d*))?$/u
9
- const DSH_PRERELEASE_ORDER = { alpha: 0, beta: 1, rc: 2 }
6
+ /**
7
+ * 兼容发布线。与 `package.json#dshCompatibility.range` / `engines.dsh` /
8
+ * `install.sh` 的 `DSH_COMPATIBILITY_RANGE` **同源**。
9
+ */
10
+ export const DSH_COMPATIBILITY_RANGE = '>=0.2.0-rc.2 <0.2.1'
11
+ /** 发布线本体;兼容线只覆盖这一个 patch 系列。 */
12
+ export const DSH_RELEASE_LINE = '0.2.0'
13
+ /**
14
+ * 兼容线下界(`0.2.0-rc.2`):同线内更低 channel(alpha/beta)或更小序列号
15
+ * 的 rc 都低于下界,判为不支持。跨线时改这三个常量即可,判定逻辑不用动。
16
+ */
17
+ export const DSH_RELEASE_FLOOR = { channel: 'rc', sequence: 2 }
18
+ /** prerelease channel 的先后顺序;下标即优先级。 */
19
+ const PRERELEASE_CHANNELS = ['alpha', 'beta', 'rc']
20
+ /** 逐版本核对清单;与 `package.json#dshCompatibility.verifiedVersions` / `install.sh` 同源。 */
21
+ export const VERIFIED_DSH_VERSIONS = ['0.2.0-rc.2']
10
22
 
11
23
  export function classifyDshVersion(version) {
12
24
  if (typeof version !== 'string') return { supported: false, verified: false }
13
25
  const normalized = version.split('+', 1)[0]
14
- const match = DSH_VERSION_PATTERN.exec(normalized)
15
- if (match === null) return { supported: false, verified: false, normalized }
16
- const supported = match[1] === undefined
17
- || DSH_PRERELEASE_ORDER[match[1]] > DSH_PRERELEASE_ORDER.alpha
18
- || Number(match[2]) >= 1
19
- return { supported, verified: supported && VERIFIED_DSH_VERSIONS.has(normalized), normalized }
26
+ const verified = VERIFIED_DSH_VERSIONS.includes(normalized)
27
+ if (normalized === DSH_RELEASE_LINE) return { supported: true, verified, normalized }
28
+ const prerelease = new RegExp(`^${DSH_RELEASE_LINE.replace(/\./gu, '\\.')}-(alpha|beta|rc)\\.(0|[1-9]\\d*)$`, 'u').exec(
29
+ normalized
30
+ )
31
+ if (prerelease === null) return { supported: false, verified: false, normalized }
32
+ const rank = PRERELEASE_CHANNELS.indexOf(prerelease[1])
33
+ const floorRank = PRERELEASE_CHANNELS.indexOf(DSH_RELEASE_FLOOR.channel)
34
+ const supported =
35
+ rank > floorRank || (rank === floorRank && Number(prerelease[2]) >= DSH_RELEASE_FLOOR.sequence)
36
+ return { supported, verified: supported && verified, normalized }
20
37
  }
21
38
 
22
39
  export function readDshPackage(entryPath = process.argv[1]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-sticky-user-bubble",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/zhaoliang233/dsh-plugins.git",
@@ -20,9 +20,9 @@
20
20
  "dshCompatibility": {
21
21
  "policy": "compatible-release-line",
22
22
  "package": "@deepseek-ai/dsh",
23
- "range": ">=0.1.7-alpha.1 <0.1.8",
23
+ "range": ">=0.2.0-rc.2 <0.2.1",
24
24
  "verifiedVersions": [
25
- "0.1.7-alpha.1"
25
+ "0.2.0-rc.2"
26
26
  ],
27
27
  "futureVersionsRequireCapabilityChecks": true
28
28
  },
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "engines": {
57
57
  "node": ">=20",
58
- "dsh": ">=0.1.7-alpha.1 <0.1.8"
58
+ "dsh": ">=0.2.0-rc.2 <0.2.1"
59
59
  },
60
60
  "publishConfig": {
61
61
  "access": "public"