The prepare script used POSIX sh syntax, which fails under npm's
default cmd.exe script shell on Windows and aborts npm install in git
checkouts. Port the hook installer to a Node script.
Fixes#778
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`showVersion()` ran `git -C <scriptDir> rev-parse --short HEAD`. `git -C`
walks *up*, so any install nested inside another repository reported that
repository's HEAD as qmd's — a global npm install under a git-managed prefix
(Homebrew's /opt/homebrew is itself a checkout) claimed Homebrew's commit.
Identical tarballs reported different "commits" depending only on where they
were installed, so version strings in bug reports stopped being evidence:
build.
A published tarball has no git history of its own, so runtime discovery can
only ever find someone else's. scripts/build.mjs now stamps the commit it
built from into dist/cli/build-info.json — it already post-processes
dist/cli/qmd.js for the shebang, so the seam existed — and the runtime
prefers that stamp. Builds from a modified tree are marked `-dirty`, which
answers "did my install actually take?" directly.
Source checkouts have no stamp, so the git lookup stays as a fallback, with
the guard that was missing: trust the hash only when `git rev-parse
--show-toplevel` is this package's root. Anything else reports no commit
rather than a wrong one. The lookup now uses execFileSync + cwd instead of
interpolating the path into a shell string, so an install path containing a
space no longer silently drops the commit, and `--version` from a build runs
no subprocess at all.
Verified in the issue's own layout — a package copied into an unrelated repo
(HEAD 96b9fc1) with qmd built at e428df7:
git -C <copy>/dist/cli rev-parse --short HEAD -> 96b9fc1 (what shipped)
<copy>/dist/cli/qmd.js --version, unstamped -> qmd 2.6.3 (no false hash)
<copy>/dist/cli/qmd.js --version, stamped -> qmd 2.6.3 (e428df7-dirty)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Claude Code plugin cache is keyed on the version in
.claude-plugin/marketplace.json, stuck at 0.1.0 since February — so
installed plugins never received skill updates. release.sh now stamps
the plugin version in lockstep with package.json on every release
(with a guard that fails the release if the stamp doesn't land),
plus a one-time catch-up bump 0.1.0 -> 2.6.3 so existing installs pick
up the current skill on their next 'claude plugin update'.
Fixes#789
The libggml-metal static destructor asserts on a non-empty residency-set
collection during __cxa_finalize_ranges, dumping a multi-kB GGML backtrace
after successful output (ggml-org/llama.cpp#22593, one-line fix open as
PR #22595). The assertion only trips when process.exit() skips Node's
beforeExit hook — which is exactly the hook node-llama-cpp registers to
auto-dispose its native handles.
Primary fix: finishSuccessfulCliCommand now sets process.exitCode = 0
and returns instead of calling process.exit(0). The event loop drains,
beforeExit fires, native Metal resources tear down in order, and the
process exits cleanly even without the workaround env var.
Defense-in-depth retained: bin/qmd and scripts/test-all.mjs still export
GGML_METAL_NO_RESIDENCY=1 on darwin for error paths and tests that
terminate via process.exit(). Opt back in with QMD_METAL_KEEP_RESIDENCY=1.
Also: correct upstream issue refs (was #17869 → now #22593/#22595).
Add scripts/repro-metal-rsets-crash.mjs minimal reproduction.
bun.lock still resolved better-sqlite3 to 11.x after package.json was
bumped to ^12.4.5 in v2.0.0. This breaks sandboxed builds (e.g. Nix
with bun2nix) where network access is unavailable to resolve the
mismatch.
CI and the publish workflow now use --frozen-lockfile so drift is caught
immediately. The release script also validates lockfile consistency
before tagging.
Closes#386
- Move model info from --help to `qmd status` with live HuggingFace
links derived from actual configured URIs
- Pre-push hook: handle non-interactive shells gracefully, resolve
annotated tags correctly for CI checks
- Add tsc build step (tsconfig.build.json) so npm package ships
compiled JS instead of raw TypeScript requiring tsx at runtime
- Update qmd wrapper and daemon spawn to use dist/qmd.js in
production while keeping tsx for development
- Add self-installing pre-push hook validating v* tag pushes:
package.json version match, changelog entry, CI status
- Add release.sh script that renames [Unreleased] to versioned
entry, bumps package.json, commits, and tags
- Add extract-changelog.sh for cumulative GitHub release notes
- Update publish workflow with build step and GitHub release creation
- Flesh out CHANGELOG.md with full history from 0.1.0 through 1.0.0
in Keep-a-Changelog format with PR/contributor attributions
- Add release standards and changelog guidelines to CLAUDE.md