From 0dce4ba5c6ae982ae56dd00f0d923977e7ce20ee Mon Sep 17 00:00:00 2001 From: lostmartian Date: Mon, 19 Oct 2026 07:51:44 +0530 Subject: [PATCH] fix(npm): publish the launcher as @kerrshift/agentdiff npm rejects the unscoped name agentdiff as too similar to the existing agent-diff package, so the 0.6.1 npm publish failed with E403. Publish under the kerrshift org scope instead; the installed command stays agentdiff. Update README, npm README, tests and workflow comments. --- .github/workflows/publish.yml | 4 ++-- CHANGELOG.md | 8 ++++++++ README.md | 4 ++-- npm/README.md | 12 +++++++----- npm/bin/agentdiff.js | 2 +- npm/package.json | 5 ++++- tests/test_distribution.py | 3 ++- 7 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ae65f873..335ac434 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,8 +2,8 @@ name: Publish to PyPI # Build and publish a release to PyPI whenever a version tag (`v*`) is pushed. # Uses OpenID Connect trusted publishing — no PyPI API token is stored. -# After PyPI, publishes the `agentdiff` npm launcher (npm/) at the same -# version, so `npx agentdiff` resolves to the release just uploaded. +# After PyPI, publishes the `@kerrshift/agentdiff` npm launcher (npm/) at the +# same version, so `npx @kerrshift/agentdiff` resolves to the release just uploaded. on: push: tags: diff --git a/CHANGELOG.md b/CHANGELOG.md index c1655c45..b5d9d48b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- **npm package renamed to `@kerrshift/agentdiff`.** npm refuses the unscoped + name `agentdiff` as too similar to the existing `agent-diff` package, so the + 0.6.1 npm publish was rejected and never reached the registry. Run it with + `npx @kerrshift/agentdiff` or install it with + `npm i -g @kerrshift/agentdiff`; the command is still `agentdiff`. The + 0.6.1 notes below that say `npx agentdiff` refer to this package. + ## [0.6.1] - 2026-10-19 AgentDiff v0.6.1: **run it however you like.** `npx agentdiff` joins `uvx` and diff --git a/README.md b/README.md index 8cf3af6e..3c7e7fe9 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@

```bash -npx agentdiff +npx @kerrshift/agentdiff ``` or `uvx --from agent-trajectory-diff agentdiff` · or `/agentdiff:report` in [Claude Code](#inside-claude-code) @@ -91,7 +91,7 @@ Pick whatever your machine already has. Every option runs the same CLI. | You have | Run once | Install | | :--- | :--- | :--- | -| Node 18+ | `npx agentdiff` | `npm i -g agentdiff` | +| Node 18+ | `npx @kerrshift/agentdiff` | `npm i -g @kerrshift/agentdiff` | | [uv](https://docs.astral.sh/uv/) | `uvx --from agent-trajectory-diff agentdiff` | `uv tool install agent-trajectory-diff` | | pipx | `pipx run --spec agent-trajectory-diff agentdiff` | `pipx install agent-trajectory-diff` | | Python 3.10+ | | `pip install agent-trajectory-diff` | diff --git a/npm/README.md b/npm/README.md index 70d6b0ea..f3790632 100644 --- a/npm/README.md +++ b/npm/README.md @@ -1,9 +1,9 @@ -# agentdiff +# @kerrshift/agentdiff **See what your AI coding agent actually did, and what it cost.** ```bash -npx agentdiff +npx @kerrshift/agentdiff ``` Reads the Claude Code session logs already on your machine and shows where the @@ -12,11 +12,13 @@ caches rebuilt after breaks, stuck retries. No config, no API key, nothing uploaded. ```bash -npx agentdiff --since 30d # 24h, 7d, 30d, 12w … or all -npx agentdiff --project api # only projects whose name contains "api" -npx agentdiff --json # machine-readable +npx @kerrshift/agentdiff --since 30d # 24h, 7d, 30d, 12w … or all +npx @kerrshift/agentdiff --project api # only projects whose name contains "api" +npx @kerrshift/agentdiff --json # machine-readable ``` +Install it with `npm i -g @kerrshift/agentdiff`; the command is `agentdiff`. + This npm package is a thin launcher for the Python CLI ([`agent-trajectory-diff`](https://pypi.org/project/agent-trajectory-diff/)) at the same version. It uses `uvx` if you have uv, else `pipx`, else builds a diff --git a/npm/bin/agentdiff.js b/npm/bin/agentdiff.js index ac78e938..7ed29e0a 100755 --- a/npm/bin/agentdiff.js +++ b/npm/bin/agentdiff.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -// `npx agentdiff` — runs the AgentDiff Python CLI (PyPI: agent-trajectory-diff) +// `npx @kerrshift/agentdiff` — runs the AgentDiff Python CLI (PyPI: agent-trajectory-diff) // at the same version as this npm package, using whichever Python runner the // machine already has: uvx, then pipx, then a private virtualenv built once // with any Python 3.10+. No runtime dependencies. diff --git a/npm/package.json b/npm/package.json index 8cad0406..df97b2b3 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,5 +1,5 @@ { - "name": "agentdiff", + "name": "@kerrshift/agentdiff", "version": "0.6.1", "description": "See what your AI coding agent actually did, and what it cost. Local spend report for Claude Code sessions.", "keywords": [ @@ -25,6 +25,9 @@ "files": [ "bin" ], + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=18" }, diff --git a/tests/test_distribution.py b/tests/test_distribution.py index fed6c76b..6c345492 100644 --- a/tests/test_distribution.py +++ b/tests/test_distribution.py @@ -49,7 +49,8 @@ def test_npm_launcher_version_tracks_package_version(): from agentdiff import __version__ package = json.loads((ROOT / "npm" / "package.json").read_text()) - assert package["name"] == "agentdiff" + # Unscoped "agentdiff" is rejected by npm as too similar to "agent-diff". + assert package["name"] == "@kerrshift/agentdiff" assert package["version"] == __version__ assert package["bin"] == {"agentdiff": "bin/agentdiff.js"} assert os.access(ROOT / "npm" / "bin" / "agentdiff.js", os.X_OK)