dsh-plugin-upgrade 0.1.0 → 0.1.2

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/AGENTS.md CHANGED
@@ -28,7 +28,8 @@ fixtures/ scanner fixtures (bad-repo, good-repo)
28
28
  cordis.patch.yml bundle declaration (insert dsh-plugin-upgrade); every Config key inline
29
29
  pnpm-workspace.yaml nearest-workspace root (isolates this repo from a surrounding harness checkout)
30
30
  package.json npm metadata; files whitelist = published content
31
- .github/workflows/ CI (3 OS × 2 Node), monthly compat probe, v* npm release
31
+ .github/workflows/ CI (3 OS × 2 Node), monthly compat probe, v* npm release,
32
+ plugin-doctor static R/K gate, OpenSSF Scorecard
32
33
  README.md English primary (GitHub default page; source of truth)
33
34
  README.{zh,es,pt,hi}.md translations, top switcher, updated in the same commit
34
35
  CHANGELOG.md Keep a Changelog, [Unreleased] at the top
@@ -66,7 +67,7 @@ LICENSE Apache-2.0
66
67
 
67
68
  ```sh
68
69
  pnpm install
69
- pnpm test # node --test (9 tests: scanner + real-registry mount)
70
+ pnpm test # node --test (11 tests: scanner + real-registry mount)
70
71
  pnpm run verify:self-contained # dependency specs resolve from the registry
71
72
  pnpm run verify:artifacts # shipped files present + entry importable from the tarball
72
73
  pnpm run check:readmes # five-language README consistency
@@ -80,7 +81,7 @@ after every harness release.
80
81
 
81
82
  ## Release
82
83
 
83
- Version is currently `0.1.0`. For a new version: bump `package.json#version`, stamp the
84
+ Version is currently `0.1.2`. For a new version: bump `package.json#version`, stamp the
84
85
  CHANGELOG `[Unreleased]` section into `## [<x.y.z>] - <UTC date>`, re-run the full gate,
85
86
  commit `chore(release): <x.y.z>`, and `git tag -a v<x.y.z>`. `git push origin main
86
87
  --follow-tags` triggers `.github/workflows/release.yml`, which re-runs the gate, publishes to
package/CHANGELOG.md CHANGED
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.2] - 2026-09-09
11
+
12
+ ### Fixed
13
+
14
+ - **The shipped version card no longer describes itself as unpublished.** Its status line
15
+ now names the three published channels and points at the packaged CLI
16
+ (`dsh-plugin-upgrade-scan`) for reproduction instead of a workspace-private evidence
17
+ path that no reader of the tarball can follow.
18
+
19
+ ### Changed
20
+
21
+ - Family-standard CI: the `plugin-doctor` static R/K gate and OpenSSF Scorecard now run in
22
+ this repository, and `dsh-plugin-upgrade` is enrolled in the
23
+ `dsh-plugin-doctor` verified registry (badge: passing).
24
+
25
+ ## [0.1.1] - 2026-09-09
26
+
27
+ ### Fixed
28
+
29
+ - **SKILL.md frontmatter on a CRLF checkout.** The parser required the `---\n`
30
+ delimiter, so a Windows checkout (`core.autocrlf=true`) mounted the skill with the
31
+ frontmatter leaked into the body and no description/`whenToUse`. Line endings are now
32
+ normalized before parsing, `.gitattributes` pins every text file to LF, and the suite
33
+ covers both a CRLF string and a CRLF-converted bundle on disk. Caught by the Windows
34
+ CI leg of v0.1.0.
35
+
10
36
  ## [0.1.0] - 2026-09-09
11
37
 
12
38
  ### Added
package/index.mjs CHANGED
@@ -37,16 +37,19 @@ export const Config = Schema.object({
37
37
 
38
38
  /**
39
39
  * Strip the YAML frontmatter block from SKILL.md and return its routing fields
40
- * and body. A missing block falls back to the full text as the body.
40
+ * and body. Line endings are normalized first: a Windows checkout with
41
+ * `core.autocrlf=true` hands us CRLF, and the frontmatter delimiters are `\n`.
42
+ * A missing block falls back to the full text as the body.
41
43
  * @param text - raw SKILL.md content.
42
44
  * @returns the parsed description/whenToUse (when present) and the instruction body.
43
45
  */
44
46
  export function splitFrontmatter(text) {
45
- if (!text.startsWith('---\n')) return { description: undefined, whenToUse: undefined, body: text }
46
- const end = text.indexOf('\n---', 4)
47
- if (end < 0) return { description: undefined, whenToUse: undefined, body: text }
48
- const meta = text.slice(4, end)
49
- const body = text.slice(end + 4).replace(/^\n+/, '')
47
+ const source = text.replace(/\r\n/g, '\n')
48
+ if (!source.startsWith('---\n')) return { description: undefined, whenToUse: undefined, body: source }
49
+ const end = source.indexOf('\n---', 4)
50
+ if (end < 0) return { description: undefined, whenToUse: undefined, body: source }
51
+ const meta = source.slice(4, end)
52
+ const body = source.slice(end + 4).replace(/^\n+/, '')
50
53
  const scalar = (key) => new RegExp(`^${key}:\\s*(.+)$`, 'm').exec(meta)?.[1]?.trim()
51
54
  return { description: scalar('description'), whenToUse: scalar('whenToUse'), body }
52
55
  }
@@ -61,12 +64,13 @@ export function splitFrontmatter(text) {
61
64
  */
62
65
  export function readSkillBundle(skillsRoot, skillName) {
63
66
  const skillPath = join(skillsRoot, skillName, 'SKILL.md')
64
- let text
67
+ let raw
65
68
  try {
66
- text = readFileSync(skillPath, 'utf8')
69
+ raw = readFileSync(skillPath, 'utf8')
67
70
  } catch (error) {
68
71
  throw new Error(`dsh-plugin-upgrade: cannot read skill bundle at ${skillPath}: ${error instanceof Error ? error.message : String(error)}`)
69
72
  }
73
+ const text = raw.replace(/\r\n/g, '\n')
70
74
  const { description, whenToUse, body } = splitFrontmatter(text)
71
75
  if (body.trim() === '') throw new Error(`dsh-plugin-upgrade: skill body is empty at ${skillPath}`)
72
76
  const frontmatterName = /^name:\s*(\S+)\s*$/m.exec(text.slice(0, text.indexOf('\n---', 4) + 1))?.[1]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-upgrade",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Plugin-author upgrade skill for DeepSeek Harness: a version-locked 0.1.3-alpha.1 -> 0.1.5-alpha.1 version card plus a zero-dependency seam scanner (V3 session format, assistant/message.stream, SessionHandleReadResult, ctx.agent, Inbox, SubprocessHandle.pid, SystemPrompt persona, PTC rename, EpochHeader.system, and the tsconfig stale-path false green), packaged as a bundle skill and an npx CLI.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,8 +1,8 @@
1
1
  # Version card · `0.1.3-alpha.1` → `0.1.5-alpha.1`
2
2
 
3
3
  > 适用:任何 `@deepseek-ai/dsh-*` peer 落在 `>=0.1.2-rc.1 <0.2.0`、且需要同时支持 `0.1.5-alpha.1` 的插件仓。
4
- > 状态:**本地留档(未发布)**。证据来自 2026-09-09 批次 40 个真实插件仓的实测升级波(宿主 checkout `0.1.5-alpha.1`,HEAD `19d2e38480`;官方 tag `dsh-v0.1.5-alpha.1` = `5dda764ed3`)。
5
- > 证据目录:`_scratch/batch-2026-09-09/`(`COMPLETION-REPORT.md` §2、`cards/*.md`、`probe/*.json`、`doctor/`、`charset/`、`phase-e/`)。
4
+ > 状态:**已发布**(当前发布版本见本包 `package.json`;npm `dsh-plugin-upgrade` · GitHub `PerryLink/dsh-plugin-upgrade` · Gitee 镜像)。
5
+ > 证据:2026-09-09 批次 **40 个真实插件仓**的实测升级波(宿主 checkout `0.1.5-alpha.1`,HEAD `19d2e38480`;官方 tag `dsh-v0.1.5-alpha.1` = `5dda764ed3`)。复现方式:本包 CLI `dsh-plugin-upgrade-scan --repo <仓库>` 输出 `file:line`,再按本卡逐缝处理。
6
6
 
7
7
  ## 0. 这一跳与其它跳的关系
8
8