Publishing

dist Manifests and SHA-256

The dist.scorpiox.net/bot-plugins tree, index.json, per-version manifest.json, SHA256SUMS, and how to verify a digest by hand on Linux, macOS and Windows.

publishing5 min readsnapshot

https://dist.scorpiox.net/bot-plugins/ is a plain directory tree served by Caddy from a single disk on one machine. Everything a node needs to install a plugin is in it, and everything in it is verifiable offline. The installer trusts exactly two things: the path prefix, and the SHA-256 you hand it.

This page is the layout, the manifest, and how to check a digest yourself.

The tree

/bot-plugins/
  index.json                          every published plugin, one document
  hello/
    1.0.0/
      manifest.json
      SHA256SUMS
      source.tar.gz
      source.tar.gz.sha256
      linux-x86_64/plugin_hello
      linux-x86_64-musl/plugin_hello
      linux-arm64-musl/plugin_hello
      macos-arm64/plugin_hello
      macos-x86_64/plugin_hello
      windows-x86_64/plugin_hello.exe
  disks/
    1.0.0/
      ...

Two levels of discovery. index.json answers "what exists" in one request — every plugin, its slug, its version, its category and (usually) its target digests. Per-version manifest.json answers "what exactly is in this release" with a completeness that the index does not need to carry.

Version directories are immutable by convention. A release is published once; a change is a new version directory. Nothing in the node's install path re-fetches a version it already verified, so an edit to a published file is an edit nobody sees until they install it fresh.

index.json

{
  "ok": true,
  "service": "bot-plugins-dist",
  "dist_base_url": "https://dist.scorpiox.net/bot-plugins",
  "count": 10,
  "slugs": ["crontab", "disks", "docker", "hello", "nvtop", "ports",
            "sessionstats", "sqlite", "sysmon", "tetris-3d"],
  "plugins": [ { "slug": "hello", "id": "plugin_hello", "version": "1.0.0",
                 "title": "...", "summary": "...", "category": "utilities",
                 "license": "MIT", "capabilities": ["env_read", "process_info"],
                 "git_repo_url": "https://plugingit.scorpiox.net/scorpiox-bot-plugin-hello.git",
                 "git_commit": "e2d4595...",
                 "source_tarball_url": "...", "source_tarball_sha256": "...",
                 "build_cmd_posix": "...", "build_cmd_win64": "...",
                 "published_at": "2026-11-11T01:20:03Z",
                 "targets": { "linux-x86_64": { "sha256": "...", "size_bytes": 25160 },
                              ... } }, ... ]
}

The market's catalogue portal and this documentation site both read this document. It is the single source of truth for "what is published", and the registry snapshot committed to the site repositories exists precisely so that the pages render when dist is unreachable.

manifest.json

The per-version manifest repeats the plugin metadata and adds what a build needs:

{
  "slug": "hello",
  "id": "plugin_hello",
  "version": "1.1.0",
  "license": "MIT",
  "git_repo_url": "https://plugingit.scorpiox.net/scorpiox-bot-plugin-hello.git",
  "git_commit": "e2d45950d31fa0de2596575559f0fd31b2273695",
  "source_tarball_sha256": "927ba845...",
  "build_cmd_posix": "cc -O2 -std=c99 -o plugin_hello src/plugin_hello.c",
  "build_cmd_win64": "x86_64-w64-mingw32-gcc -O2 -std=c99 -static -o plugin_hello.exe src/plugin_hello.c",
  "targets": {
    "linux-x86_64":       { "sha256": "...", "size_bytes": 25160, "format": "elf-x86_64" },
    "linux-x86_64-musl":  { "sha256": "...", "size_bytes": 59488, "format": "elf-x86_64-static" },
    "linux-arm64-musl":   { "sha256": "...", "size_bytes": 800776, "format": "elf-arm64-static" },
    "macos-arm64":        { "sha256": "...", "size_bytes": 68848, "format": "macho-arm64" },
    "macos-x86_64":       { "sha256": "...", "size_bytes": 74120, "format": "macho-x86_64" },
    "windows-x86_64":     { "sha256": "...", "size_bytes": 112640, "format": "pe-x86_64" }
  }
}

Two fields carry all the weight. git_commit pins the source the artifacts were built from — it is the only link between a binary and the code you can read. targets.<id>.sha256 is the value the installer compares. If either is wrong, the install fails at the checksum step and no file is written.

format is informational: the installer's magic-header check is stronger, because it looks at the first bytes of the file it actually downloaded rather than at a label.

SHA256SUMS

The traditional companion file, in sha256sum -c format, one line per artifact:

214d975352b59ab910593b2cbfc421d78c18d8c796f81790e9dabeee35d67a5f  linux-x86_64/plugin_hello
1008fd57ba7077a450b1d762ac7218c9530cce69bb99122c37eae9c895dfe23e  linux-x86_64-musl/plugin_hello
...

source.tar.gz.sha256 is the same digest for the source archive, as a bare hex string, so a script can read it with cat without parsing.

Verifying by hand

mkdir -p /tmp/verify && cd /tmp/verify
curl -sSLO https://dist.scorpiox.net/bot-plugins/hello/1.1.0/linux-x86_64-musl/plugin_hello
curl -sSLO https://dist.scorpiox.net/bot-plugins/hello/1.1.0/SHA256SUMS
# pick the line for the file you downloaded
grep 'linux-x86_64-musl/plugin_hello' SHA256SUMS > ck
sed -i 's|linux-x86_64-musl/plugin_hello|plugin_hello|' ck
sha256sum -c ck

On Windows, PowerShell has no sha256sum, but Get-FileHash is built in:

Get-FileHash .\plugin_hello.exe -Algorithm SHA256 | Format-List

and certutil -hashfile plugin_hello.exe SHA256 works on every Windows version back to 7.

Both produce the same hex string. Compare it against targets.windows-x86_64.sha256 in the manifest, character by character. A one-character difference is a different file, not a rounding error.

Why the node's installer does not shell out

plugin_manage computes SHA-256 with a bundled C implementation. It does not call sha256sum, certutil, openssl or anything else. Two reasons:

Availability. A Windows node has no sha256sum; a distroless container has no certutil; a minimal Alpine image may have neither openssl nor busybox's applet depending on how it was built. A verification step that requires an absent tool is a verification step that gets skipped, and skipping it silently is the worst possible behaviour.

Determinism. An external tool's output format varies (sha256sum prints HASH FILE, certutil prints multi-line with a header, openssl dgst prints SHA256(file)= hash). Parsing three formats to compare one digest is three places for a bug.

The bundled implementation is ordinary SHA-256, checked against the standard test vectors in the node's test suite. It reads the downloaded temporary file, compares 64 hex characters, and deletes the file on mismatch.

What a mismatch means

422 checksum_mismatch with the expected and actual digests in the error body. There are exactly four causes:

  1. The artifact was rebuilt and republished under the same version. This is the one that should never happen and is why version directories are immutable.
  2. The download was truncated. Usually a proxy or a flaky link; the size in the manifest will disagree with what arrived.
  3. The manifest is stale. The index or manifest was published before the artifact was rebuilt.
  4. Something in the path modified the file. Rare and worth investigating, because the path is plain HTTPS to one origin.

In cases 1 and 3 the fix is a new version, not a re-download. In case 2 a retry works. In case 4 stop and look at the network.

Reproducing a published binary

The strongest check available is to build the same source and compare digests. It rarely matches exactly — compilers embed timestamps and build paths — but two things are worth doing:

Build from the pinned commit and confirm the binary behaves identically:

git clone https://plugingit.scorpiox.net/scorpiox-bot-plugin-hello.git
cd scorpiox-bot-plugin-hello
git checkout e2d45950d31fa0de2596575559f0fd31b2273695
make musl
QUERY_STRING='action=info' ./plugin_hello

Diff the source against what you read last time before upgrading. A version bump that changes the capability list is expected; a version bump that adds a popen while the capability list is unchanged is the exact scenario this whole system is built to make visible.

Exact digest reproduction is possible with -ffile-prefix-map and a fixed SOURCE_DATE_EPOCH, and the release script is free to go that far. What matters for a user is the smaller property: the commit on the card is the commit in the repository, and the digest on the card is the digest of the file you downloaded.

  • One-Click Install and Isolation — the seven checks the installer runs, in order.
  • Cross-Compiling for musl, MinGW and macOS — producing the six artifacts.
  • For AI Agents Scraping This Market — how to read index.json and manifest.json without guessing at a schema.