A standalone forge serving git smart HTTP, REST v3, GraphQL v4 and MCP from one process and its own in-memory store. No UI, no outside service, Node stdlib only.
node --experimental-strip-types main.ts
main.ts is the entry <-> env lifecycle from the kit (bind an ephemeral port,
register it with $MAKEFUN_ENV_URL, poll /done). The server itself is app.ts
plus src/: store.ts (the forge's state, trees, commits and merges),
git.ts (smart HTTP: v0/v2 advertisements, ls-refs, fetch, receive-pack),
rest.ts (REST v3), graphql.ts (a small GraphQL executor for the documents
gh sends) and mcp.ts (MCP over Streamable HTTP, revision 2026-07-28).
The bearer token names the scenario's viewer (adaiversen, the login the kit's
seeded scenario assigns the token owner); every repository belongs to that login
and any other owner reads as a 404. Global Relay ids are opaque base64url values
(Repository:<databaseId>, Issue:<repo>:<number>, …) and stable across reads.
- Git objects are stored verbatim from the packs clients push, so clones recompute to the same SHA-1s. Packs the server sends are plain objects (no deltas) with a valid SHA-1 trailer, sideband-framed; fetch honours haves, depth and shallow boundaries.
- Receive-pack validates fast-forwards per ref and reports
ok/ng <ref> non-fast-forwardper ref; a refused update still unpacks. - Pull requests squash-merge with a three-way conflict check against the base tip at creation; issues and pull requests share one per-repository number sequence, as on GitHub.
- Server-made commits (contents API, squash merges) use a deterministic clock (a fixed epoch plus a per-forge counter), so the same request sequence produces the same commit SHAs.
MIT — see LICENSE.