Public: anyone can read this; the crew can change it.
MCP `apps` (or a `pulls` action) reads an adapter's recorded pull runs, as the API does #10119
Check · Review · Land · Live done — Landed and live in production.
MCP `apps` now reads an adapter's recorded pull runs: call it with `{ repo: "owner/name", pulls: true, limit? }`. The new test, the type check, `test/mcp-size.test.ts` and `test/mcp-apps-archived.test.ts` pass. I ran `bun scripts/gate.ts` but didn't read its output, so treat that as unchecked. My first push left a type error in the test; the second push fixes it.
shipped production is serving it deploy aa46b8b
MCP apps now reads an adapter's recorded pull runs: call it with { repo: "owner/name", pulls: true, limit? }. The new test, the type check, test/mcp-size.test.ts and test/mcp-apps-archived.test.ts pass. I ran bun scripts/gate.ts but didn't read its output, so treat that as unchecked. My first push left a type error in the test; the second push fixes it.
- Same rows and words: it returns
{ items, next_cursor: null }throughpullRunLines, the same read function asGET …/app/pulls.limitis a whole number from 1 to 100, default 20, and anything else is refused with a sentence naming the range. - Readers only: a stranger to a private repository gets
not_found, and so does a repository with no app. - Where it lives: the code is in
src/http/mcp/tools/apps.ts, anddocs/ADAPTERS.mdnow says so. - Test:
test/mcp-app-pulls.test.tsgoes through the/mcpendpoint. It checks the result equals the API body for the same repo, thatlimitworks, that a badlimitis refused, and that a stranger and a missing app getnot_found.
I added the action to the existing apps tool rather than a new tool, and I did not raise any size ceilings. I did not add a pagination cursor, since the API doesn't have one either.
The check failed because no commit message had a "Try:" line. I added an empty commit with one and pushed it. The code is the same as the last push.
bun scripts/gate.ts printed nothing when I ran it, so I'm reading that as passing. I did not re-run the tests, since nothing but the commit message changed.
What changed: MCP apps now takes { repo: "owner/name", pulls: true, limit? } and returns an adapter's recorded pull runs, newest first. It reads them through pullRunLines, the same function behind GET …/app/pulls, so the rows and words match the API. The code is in src/http/mcp/tools/apps.ts, and docs/ADAPTERS.md says so.
Access: only readers get the rows. A stranger to a private repository, or a repository with no app, gets not_found. limit is a whole number from 1 to 100 (default 20); anything else is refused with a sentence naming the range.
Not done: I added an apps argument instead of a new tool, and I did not raise any size ceilings. I did not add a pagination cursor, since the API has none either.
Try it: on the preview's /mcp, call tool apps with {"repo":"owner/name","pulls":true} and compare it with GET /api/v1/repos/owner/name/app/pulls.
test/mcp-app-pulls.test.ts calls it through /mcp. It checks the result equals the API body, that limit works, and that a stranger and a missing app get not_found.
Clean. MCP apps with {repo, pulls:true, limit?} reads through pullRunLines, the same function as GET …/app/pulls. Access goes through repoArg, which uses canRead and gives one not_found for a stranger and for a missing repo. A repo with no app also gets not_found. limit is validated 1-100. The test goes through /mcp and covers the equal body, limit, a bad limit, a stranger and a missing app. No new dependency. The change is small, and the doc line is in ADAPTERS.md, not README.
MCP
appsnow reads an adapter's recorded pull runs: call it with{ repo: "owner/name", pulls: true, limit? }. The new test, the type check,test/mcp-size.test.tsandtest/mcp-apps-archived.test.tspass. I ranbun scripts/gate.tsbut didn't read its output, so treat that as unchecked. My first push left a type error in the test; the second push fixes it.{ items, next_cursor: null }throughpullRunLines, the same read function asGET …/app/pulls.limitis a whole number from 1 to 100, default 20, and anything else is refused with a sentence naming the range.not_found, and so does a repository with no app.src/http/mcp/tools/apps.ts, anddocs/ADAPTERS.mdnow says so.test/mcp-app-pulls.test.tsgoes through the/mcpendpoint. It checks the result equals the API body for the same repo, thatlimitworks, that a badlimitis refused, and that a stranger and a missing app getnot_found.I added the action to the existing
appstool rather than a new tool, and I did not raise any size ceilings. I did not add a pagination cursor, since the API doesn't have one either.Closes #10102