# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.2] - 2026-09-06

### Fixed
- `package.json`: `dsh.bundle.patch` pointed at `cordis.patch.yml`, which is a **non-loader** catalog marker for dsh-plugin-marketplace (`client:`/`metadata:`/`installPaths:`) rather than a dsh loader patch file. dsh parses each profile bundle's patch and requires a top-level YAML array, so any profile that had `@eternalnight/publish-kit` in its `bundles` failed loudly with `must be a top-level YAML array of loader patch entries` (the dsh-desktop "no picture / won't boot" symptom). publish-kit only ships a CLI + skill bundle and injects no runtime rows, so the fix is a dedicated loader patch that disables the layer: new `dsh-bundle-patch.yml` containing an explicit top-level `[]` (dsh fails boot on an empty/comments-only file, so `[]` is the sanctioned way to opt out), with `dsh.bundle.patch` redirected to it. `cordis.patch.yml` remains in place purely for marketplace cataloging.

### Deprecated
- `@eternalnight/publish-kit@0.5.1`: superseded by 0.5.2. 0.5.1 declared `dsh.bundle.patch: ./cordis.patch.yml` (a non-loader marketplace marker), so any profile putting it in `bundles` failed loud on boot. Users on 0.5.1 (especially via `dsh plugin` profile bundles) should upgrade to 0.5.2. Dist-tag `latest` now points at 0.5.2.

## [0.5.1] - 2026-09-06

### Fixed
- `scripts/postinstall.js`: when the target skill root already contains a **real directory** (not a symlink, not a Windows junction) with the same name, the script previously logged `already exists (not a link); skipping` and never honoured `PUBLISH_KIT_FORCE=1`. This was the root cause of DSH boot failure "the declared entry artifact is missing (source-only checkout or blocked build) -- the next boot would fail" on systems where an older install (or a corrupted copy) left a non-link directory at `<root>/publish-kit/` (e.g. a stale GBK-encoded SKILL.md that the dsh-skill-filesystem provider rejects during catalog validation). New behaviour: with `PUBLISH_KIT_FORCE=1`, the offending directory is removed with `fs.rmSync({ recursive: true, force: true })` and replaced with the canonical junction; without FORCE, the skip message now also tells the user how to opt in. Non-FORCE path never touches existing real directories, so user data in `<root>/publish-kit/` is preserved.

### Deprecated
- `@eternalnight/publish-kit@0.5.0`: superseded by 0.5.1. Users on 0.5.0 should upgrade; 0.5.0 may be unpublished from the registry (npm 72h policy permitting).

## [0.5.0] - 2026-09-03

### Fixed
- `scripts/postinstall.js`: when the target skill root already has a directory junction (Windows) pointing to **any** publish-kit source, the script no longer attempts `unlinkSync + symlinkSync` (which previously threw `EEXIST` warnings on Windows when the same source inode was reused). New behaviour: detect the junction, compare `realpath` against the locally bundled skill source, and keep the existing junction unless `PUBLISH_KIT_FORCE=1` is set. Solves the `dsh plugin --profile web add @eternalnight/publish-kit` ERR_PNPM_IGNORED_BUILDS flow on systems where the user already has links installed by an older `0.4.0` copy.
- `scripts/postinstall.js`: distinguish true symlinks from Windows directory junctions (Reparse Point) using the existing `lstat` Reparse Point attribute (0x800) instead of relying on `stat.isSymbolicLink()` which is reported `false` for junctions.

### Added
- `scripts/postinstall.js`: environment variables to control behaviour:
  - `PUBLISH_KIT_FORCE=1` — re-create every skill root link even if an existing one points to this or another source.
  - `npm_config_force=true` is also honoured for compatibility with npm's own `--force` flag.
- `scripts/postinstall.js`: terminal summary now reports both `installed in N location(s)` and `kept M existing link(s); set PUBLISH_KIT_FORCE=1 to overwrite` so install logs are unambiguous about what happened.

### Changed
- `0.5.0-beta.1` was withdrawn (git tag deleted on both remotes, npm deprecated). Reason: its tag pointed at the CHANGELOG/docs commit and was missing the follow-up Windows `where.exe` fix (which now ships as the previous-line fix in this stable). Installations already pinned to `0.5.0-beta.1` will see a deprecation warning and should upgrade to `0.5.0`.

### Published
- npm `@eternalnight/publish-kit@0.5.0` on dist-tag=`latest`.
- git tag `v0.5.0` pushed to GitHub + Gitee.

## [0.1.3] - 2026-08-28

### Added
- `assets/readme-banner.svg` (40 lines): top-of-README visual hook with gradient + accent colors + 6 channel checkmarks + tagline + version stamp. Referenced from both `README.md` and `README.zh.md`.
- New README sections in both languages:
  - **Supported languages & packaging ecosystems** — DSH ecosystem (4 tracks) + non-DSH language libraries (npm, cargo, PyPI, PyInstaller exe, Homebrew, Scoop, Chocolatey, Go module, Docker, Maven Central, NuGet, RubyGems) + tracks publish-kit explicitly does NOT cover.
  - **Skill bundle discovery & inclusion standards** — universal requirements (frontmatter, layout, license), 7-channel inclusion matrix (Vercel CLI, awesome-dsh-plugin, dsh-market, dsh-marketplace, dsh-find-plugin, dsh-plugin-marketplace, dsh-agent-skills), GitHub RP setup, topic taxonomy, social preview, author checklist.
  - **README & repo home: how to maximize clicks** — repo-home elements (social preview, description, topics, pinned repos, About sidebar), README structure table, asset hygiene (banner, GIF size, raw.githubusercontent cross-host, Mermaid + fallback, result-over-command), SEO & shareability, community signals.
- `DSH-DEPLOY.md`: extended with a new "Skill bundle inclusion standard (the canonical checklist)" chapter — required file layout, frontmatter contract, repo-level requirements, marketplace-by-marketplace detailed steps (PR/Issue/auto-scan patterns + npm wrapper), topic checklist, disqualifiers, inclusion boosters.
- New README badge set: Agent Skill bundle, GitHub release, stars, license, DSH-DEPLOY-native, npm opt-in wrapper, cargo crates.io, PyPI/PyInstaller (8 badges total).

## [0.5.0-beta.1] - 2026-08-29

### Added
- **Pre-release workflow** (REFERENCE.md section K): ship beta/rc first, promote later. Reduces blast radius of bad `latest` releases.
- `scripts/bootstrap-release.{ps1,sh}`: new flags `--pre-release <tag>` (`beta` / `rc` / `alpha`), `--pre-release-bump <n>` (iterate counter), `--promote-from-beta` (move dist-tag from `beta`/`rc` to `latest` without version bump).
- `scripts/release-exe.{ps1,sh}`: new flag `-Prerelease` / `--prerelease` for GitHub Pre-release mark on exe releases.
- `scripts/release-doctor.mjs`: new check `npm: pre-release version uses non-latest dist-tag` (warns if `0.5.0-beta.1` is being published under dist-tag=latest).
- `scripts/verify-release.mjs`: new channel `npm: dist-tag matches version type` (confirms the version is on the right tag after publish).
- `REFERENCE.md` section K (96 lines): pre-release / dist-tag strategy with the two-step publish flow, manual dist-tag commands, recovery playbook for bad `latest` releases.
- `SKILL.md` Workflow step 2: pre-release first, then promote (kept under 100 lines: 60 lines).
- `README.md` + `README.zh.md`: new `Pre-release strategy` section with version/dist-tag table.

### Published
- npm `@eternalnight/publish-kit@0.5.0-beta.1` on dist-tag=`beta` (latest stays at 0.4.0).
- git tag `v0.5.0-beta.1` pushed to GitHub + Gitee.
- GitHub Release `v0.5.0-beta.1` marked Pre-release.

## [0.4.0] - 2026-08-28
- `scripts/README.md` (85 lines): usage docs for all 4 scripts + recommended local dev loop.
- `.github/dependabot.yml`: weekly auto-PR for GitHub Actions / npm / Docker dependencies with grouped minor+patch updates.
- `.github/ISSIS_TEMPLATE/release_question.yml`: new release-question template added to existing bug_report + feature_request.
- **GitHub Releases**: created `v0.2.0`, `v0.2.1`, `v0.3.0`, `v0.4.0` with auto-generated release notes (latest marker on `v0.4.0`).
- **Repo settings**: `delete_branch_on_merge=true` (auto-delete PR branches), `allow_update_branch=true` (maintainers can update PRs), `has_discussions=true` (community Q&A enabled).
- **PR #3554** to `awesome-dsh-plugin`: conflicts resolved, `mergeable=MERGEABLE` (was `CONFLICTING` before rebase).

### Mirror to Gitee
- **`scripts/push-to-gitee.{ps1,sh}`**: one-command Gitee mirror sync (use after manual empty repo creation).
- **Gitee mirror complete**: `https://gitee.com/eternalnight996/publish-kit` now has `main` branch + 9 tags (v0.1.0 through v0.4.0). Gitee Description / Topics / Releases require web UI (API write scope limited for the git-only token used).

### npm package published
- **`@eternalnight/publish-kit@0.4.0`** live at https://registry.npmjs.org/. 20 files / 56.6 KB / signed. Includes `release-doctor.mjs`, `verify-release.mjs`, `scripts/README.md`, `push-to-gitee.{ps1,sh}`. GPG-signed by npm registry.

## [0.5.0-beta.1] - 2026-08-29

### Added
- **Pre-release workflow** (REFERENCE.md section K): ship beta/rc first, promote later. Reduces blast radius of bad `latest` releases.
- `scripts/bootstrap-release.{ps1,sh}`: new flags `--pre-release <tag>` (`beta` / `rc` / `alpha`), `--pre-release-bump <n>` (iterate counter), `--promote-from-beta` (move dist-tag from `beta`/`rc` to `latest` without version bump).
- `scripts/release-exe.{ps1,sh}`: new flag `-Prerelease` / `--prerelease` for GitHub Pre-release mark on exe releases.
- `scripts/release-doctor.mjs`: new check `npm: pre-release version uses non-latest dist-tag` (warns if `0.5.0-beta.1` is being published under dist-tag=latest).
- `scripts/verify-release.mjs`: new channel `npm: dist-tag matches version type` (confirms the version is on the right tag after publish).
- `REFERENCE.md` section K (96 lines): pre-release / dist-tag strategy with the two-step publish flow, manual dist-tag commands, recovery playbook for bad `latest` releases.
- `SKILL.md` Workflow step 2: pre-release first, then promote (kept under 100 lines: 60 lines).
- `README.md` + `README.zh.md`: new `Pre-release strategy` section with version/dist-tag table.

### Published
- npm `@eternalnight/publish-kit@0.5.0-beta.1` on dist-tag=`beta` (latest stays at 0.4.0).
- git tag `v0.5.0-beta.1` pushed to GitHub + Gitee.
- GitHub Release `v0.5.0-beta.1` marked Pre-release.

## [0.4.0] - 2026-08-28
- `scripts/README.md` (85 lines): usage docs for all 4 scripts + recommended local dev loop.
- `.github/dependabot.yml`: weekly auto-PR for GitHub Actions / npm / Docker dependencies with grouped minor+patch updates.
- `.github/ISSUE_TEMPLATE/release_question.yml`: new release-question template added to existing bug_report + feature_request.
- **GitHub Releases**: created `v0.2.0`, `v0.2.1`, `v0.3.0`, `v0.4.0` with auto-generated release notes (latest marker on `v0.4.0`).
- **Repo settings**: `delete_branch_on_merge=true` (auto-delete PR branches), `allow_update_branch=true` (maintainers can update PRs), `has_discussions=true` (community Q&A enabled).
- **PR #3554** to `awesome-dsh-plugin`: conflicts resolved, `mergeable=MERGEABLE` (was `CONFLICTING` before rebase).

## [0.3.0] - 2026-08-28

### Added
- `.github/ISSUE_TEMPLATE/bug_report.yml`: bug report template with agent / install-method / release-track dropdowns + env block.
- `.github/ISSUE_TEMPLATE/feature_request.yml`: feature request template with track dropdown + proposal structure.
- `.github/ISSUE_TEMPLATE/release_question.yml`: release question template for "how do I publish X" questions.
- `.github/PULL_REQUEST_TEMPLATE.md`: PR template with house-format checklist + release-flow checklist + test-evidence requirement.
- `.github/CONTRIBUTING.md`: contribution guide with ground rules + local dev loop + coding style for scripts.
- `.github/SECURITY.md`: vulnerability disclosure policy + supported-versions scope.
- `.github/CODE_OF_CONDUCT.md`: Contributor Covenant 2.0.
- `.github/FUNDING.yml`: GitHub Sponsor link.
- `.github/workflows/ci.yml`: 4-job CI (validate-skill, check-readme-links, check-package, check-markdown-toc). Runs on push, PR, and manual dispatch.
- `assets/social-preview.png` (1280x640, 65 KB): GitHub social preview image. Upload via Settings -> General -> Social preview to maximize click-through when the URL is shared.

## [0.2.1] - 2026-08-28

### Changed
- Removed duplicate old Install section in both READMEs (was after Feature tour).
- Marked npm wrapper Roadmap entry as completed in both languages (v0.2.0 npm publication supersedes it).

## [0.2.0] - 2026-08-28

### Added
- **npm package: `@eternalnight/publish-kit`** published at https://registry.npmjs.org/. Bundles `.agents/skills/publish-kit/` as a tarball asset, ships `bootstrap-release.{ps1,sh}` and `release-exe.{ps1,sh}` as `bin` entries, and includes `cordis.patch.yml` + `dsh.marketplace` metadata so `dsh plugin --profile web add @eternalnight/publish-kit` installs the skill into `~/.agents/skills/` via a postinstall symlink.
- `package.json`: scoped package (`@eternalnight/`), MIT, explicit registry (`https://registry.npmjs.org/`), 19-file tarball (51 KB).
- `cordis.patch.yml`: marker file declaring the package as a skill-wrapper; consumed by `dsh-plugin-marketplace` static validator.
- `scripts/postinstall.js`: auto-symlinks the bundled skill into `~/.agents/skills/`, `~/.claude/skills/`, `~/.codex/skills/`, `~/.gemini/skills/`, `~/.dsh/skills/` on install.
- README: top-of-page **Install** (3 commands: skill bundle / npm / DSH plugin) and **Usage** (model-invoked prompts + CLI examples) sections.
- README: top-of-page **Supported agents & languages** tables (8 agents, 13 languages/ecosystems).
- README badges: replaced `npm-opt-in-wrapper` with `npm-published`.

### Changed
- All references to "not published to npm" updated to reflect the v0.2.0 npm publication. The npm wrapper is no longer opt-in — it is the canonical install path for users who prefer `dsh plugin add` or `npm install -g`.

## [0.1.2] - 2026-08-28

### Changed
- Rewrote top-level `README.md` (243 lines, English) following the dsh-memory-eternal productization pattern: pain table, Before/After mapping, Mermaid flow, core design rationale, competitive differentiation, feature tour, install paths, bundle layout, roadmap, release log, discovery table.
- Clarified npm status: publish-kit is **not published to npm**. The npm wrapper pattern (for users who want `dsh plugin --profile web add publish-kit`) is documented as opt-in in `DSH-DEPLOY.md` and `TEMPLATE.md` section A. No code in the bundle assumes it.

### Added
- New `README.zh.md` (202 lines, Chinese) — Chinese mirror of the rewritten English README, same structure.

## [0.1.1] - 2026-08-28

### Added
- `scripts/bootstrap-release.ps1` and `scripts/bootstrap-release.sh`: six-step release automation (bump version, test, build, commit, npm publish with throwaway token in `finally`-deleted `.npmrc.publish`, tag + push both remotes, GitHub RP fields via API).
- `.agents/skills/publish-kit/EXAMPLES.md`: two worked transcripts (this skill's own v0.1.0 release and a full DSH plugin npm flow) plus a 7-row pitfall table.
- `README.md` script reference section.
- `SKILL.md` See also table extended to include EXAMPLES.md.

## [0.1.0] - 2026-08-28

### Added
- Initial release of publish-kit skill bundle.
- `SKILL.md` (58 lines): frontmatter, quick start, workflow, anti-patterns, checklist, See also table.
- `REFERENCE.md` (103 lines): sections A-J covering npm release SOP, DSH plugin marketplace matrix, peer-dependency semver, npm slimming, git tag SOP, bilingual README spec, dual-remote push, cargo + PyPI baseline, PyInstaller exe build, pitfall quick table.
- `TEMPLATE.md` (316 lines): 10 copy-paste templates (DSH plugin package.json, awesome-dsh-plugin yml entry, dsh-market Issue body, publish.bat, bilingual README, PUBLISH.md, GitHub Actions release, Cargo.toml, pyproject.toml, PyInstaller build).
- `INSTALL.md` (91 lines): four install paths (Vercel `npx skills add`, DSH native, dsh-agent-skills mirror, manual curl).
- `DSH-DEPLOY.md` (67 lines): DSH-specific deployment guide covering six discovery roots, watch semantics, ranks, distribution channels, topic taxonomy.
- `COMPATIBILITY.md` (58 lines): platform matrix for DSH/Claude Code/Codex/Gemini/Cursor/Windsurf/Copilot, frontmatter field support, body-format constraints.
