Packcompare

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 3, 2026

比較軟體包的兩個版本:檔案、依賴項、大小和匯出。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Diff two versions of a package: files, dependencies, size, and exports.

已驗證STDIO僅桌面

概覽

Packcompare 的本機 MCP 服務;無需登入;STDIO。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Packcompare,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

packcompare

A package can change a lot between two versions without any single change looking dramatic: a file quietly grows, a dependency is swapped, an export path disappears. packcompare puts both snapshots side by side and reports the whole move at once, so a release review starts from the diff instead of from a hunch.

You supply two snapshots of the same package — a before and an after. Each one is a plain description, not a real package on disk: a version string, a files list of {path, size} entries, a dependencies map of name to version string, and an exports list of strings.

The file report splits into three sorted lists: paths only in after were added, paths only in before were removed, and paths present in both with different sizes are changed, each carrying size_before and size_after. File paths must be unique within a snapshot, and sizes may be zero — an empty file is still a file. Dependencies get the same treatment, sorted by name: added and removed entries carry the version from the side they exist on, and a name present in both with a different version string is changed, reported as {name, from, to}.

Exports are compared as sets, so mentioning the same export twice in one snapshot changes nothing. The headline numbers are the summed file sizes of each snapshot, their difference size_delta (which is negative when the package shrank), and the file counts on each side.

Breaking is deliberately narrow and pinned: a change is breaking exactly when at least one export was removed, and breaking_reasons spells each one out as removed export: <name> in the removed list's sorted order. Added files, resized files, and dependency bumps — however large — never make a change breaking on their own.

Malformed input is a validation error naming the offending path, with the snapshot named in the path: a duplicate file path is reported as before.files[1].path is a duplicate, for example. No partial diff is produced. Unknown extra fields are ignored. The computation is pure and local: no network, no configuration, and no real package is read.

CLI

bash
npx @reneturcios/packcompare compare --input args.jsonnpx @reneturcios/packcompare --version

args.json contains the full arguments object:

json
{  "before": {    "version": "1.0.0",    "files": [{ "path": "index.js", "size": 1200 }],    "dependencies": { "left-pad": "1.3.0" },    "exports": ["./index.js"]  },  "after": {    "version": "1.1.0",    "files": [{ "path": "index.js", "size": 1400 }],    "dependencies": { "left-pad": "1.3.0" },    "exports": ["./index.js"]  }}

The result is printed as JSON:

json
{  "version_before": "1.0.0",  "version_after": "1.1.0",  "files": {    "added": [],    "removed": [],    "changed": [{ "path": "index.js", "size_before": 1200, "size_after": 1400 }]  },  "dependencies": { "added": [], "removed": [], "changed": [] },  "exports": { "added": [], "removed": [] },  "size_before": 1200,  "size_after": 1400,  "size_delta": 200,  "file_count_before": 1,  "file_count_after": 1,  "breaking": false,  "breaking_reasons": []}

Exit codes: 0 on success, 1 on a runtime error (including an unreadable or invalid input file, or invalid input), 2 on a usage error.

MCP server

bash
npx -y @reneturcios/packcompare mcp

MCP client config:

json
{  "mcpServers": {    "packcompare": {      "command": "npx",      "args": ["-y", "@reneturcios/packcompare", "mcp"]    }  }}

Tools

  • compare_packages — Diff two versions of a package.

    • before (object, required) — the earlier package snapshot: {version, files, dependencies, exports}, where version is a non-empty string, files is a list of {path, size} entries with unique non-empty paths and integer sizes of at least 0, dependencies is a map of dependency name to non-empty version string, and exports is a list of non-empty strings
    • after (object, required) — the later package snapshot, with the same shape as before

    Returns {version_before, version_after, files, dependencies, exports, size_before, size_after, size_delta, file_count_before, file_count_after, breaking, breaking_reasons}.

Docker

bash
docker run -i ghcr.io/cloudcorprecords/packcomparedocker run --rm -v "$PWD:/w" ghcr.io/cloudcorprecords/packcompare compare --input /w/args.json

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # tsx --test test/*.test.ts (pure local, no network)npm run dev     # run the CLI from source

License

MIT — Copyright (c) 2026 Rene Turcios

來源:README.md,提交 dbbbf86

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Nov 3, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分