Skip to content

Research tools

These tools read the installed Octokit packages and regenerate the API reference. The inputs are the npm tarballs recorded in bun.lock. The outputs are Markdown in the upstream inventory.

From the repository root, use Bun 1.4.5 and Git:

Terminal window
bun install --cwd tools --frozen-lockfile
bun run --cwd tools check
Command (run in this directory) Result
bun inventory.ts Writes a machine-readable JSON inventory to stdout. Compares every named REST and enterprise method key against the installed client or plugin.
bun run update Regenerates the REST, route-difference, Enterprise and webhook catalogues and the exports table in the profile document. Removes obsolete generated namespace pages.
bun run probe Runs the offline transport experiments for fiber interruption and REST paginator signal propagation.
bun run check Reports catalogue drift without writing, checks local Markdown file links and runs the probes. It also type-checks and runs all three guide examples against local HTTP responses. Exits nonzero on failure.

Updating upstream. Change the research dependencies in this directory, e.g. bun add --dev --exact octokit@<version>, then run bun run update and bun run check. Review the lockfile and catalogue diff together. Review handwritten distribution descriptions, source observations and capability contracts against the new releases. If the paginator starts forwarding the signal itself, the characterization test fails deliberately so the recorded observation gets reviewed.

Indexer · Catalogue renderer · Transport probes · Link checker

Resolve the public package export map and declarations from the exact consuming package. Record npm version and artifact identity for each profile; follow nested dependencies rather than assuming a hoisted type package is universal. Read shipped named endpoint tables, decorators, eligible pagination routes, enterprise profiles and webhook names. Supplement those with a curated inventory of overloaded callables, synchronous fields, subscriptions, constructors and middleware. Review type/runtime discrepancies manually.

Generate stable, sorted signatures and catalogue rows. Preserve aliases, body remapping, alternate base URLs, empty argument lists and callable helper surfaces. Emit forwarding to real methods only; generated code never contains retry logic, URL expansion, auth, response parsing or Effect runtime policy. Feed the manifest to the parity checks. Fail on an unclassified export or a difference requiring human review.

A published package’s internal table is acceptable as a version-pinned research input. Prefer a supported export when available. Record the upstream license and provenance before redistributing generated SDK material.