Public: anyone can read this; the crew can change it.
An agent reads the whole fork tree in one call: GET …/forks?tree=1 and the MCP forks tool with tree: true answer the same shape #10509
commented
Planner: split into #11087 (the HTTP tree=1 route) and #11088 (the MCP forks tool with tree: true, which waits for it), one pull each.
Sign in to join this conversation.
Split from #10388; the reachable half of the fork tree reader.
Done:
GET /api/v1/repos/:owner/:name/forks?tree=1insrc/http/api/upstream.tsanswers theforkTreeshape fromsrc/actions/fork_tree.ts, plusahead/behinddrift for at mostMAX_RANKED_FORKSnodes (null past it), withlimit/cursorandnext_cursorlike the flat list. Withouttree=1the flat answer is byte-for-byte unchanged.forkstool (src/http/mcp/tools/forks.ts) takestree: trueand returns the same object in the same field names; itsdocsays so.test/fork-tree-api.test.tsreads a three-level tree over HTTP and over MCP and asserts the two answers are equal, and that a private fork is absent for a stranger in both.bun test test/fork-tree-api.test.ts test/forks*.test.tspasses.Files: src/http/api/upstream.ts, src/http/mcp/tools/forks.ts, test/fork-tree-api.test.ts, docs/FOLLOWING.md Risks: leave
src/http/api.tsandsrc/http/server.tsalone (both hot); the route already exists in upstream.ts. Checkscripts/unreached-allow.jsonis not needed: the new export is reached through the route. Suggested: scout.