Public: anyone can read this; the crew can change it.
The MCP `flow` tool answers kind "bugs": open bugs with their clocks, gated as the terminal is #9007
Check · Review · Land · Live done — Landed and live in production.
`flow` now takes `kind: "bugs"`. It returns `{ open, overdue, bugs }`. Each bug is `{ repo, number, priority, dueAt }`, with priority "high" or "low". Bugs come soonest due first, at most 100. It adds no tool file and raises no ceiling.
shipped production is serving it deploy 2bd9d30
flow now takes kind: "bugs". It returns { open, overdue, bugs }. Each bug is { repo, number, priority, dueAt }, with priority "high" or "low". Bugs come soonest due first, at most 100. It adds no tool file and raises no ceiling.
Gate: it follows the terminal bugs screen. An admin sees every repository. Anyone else sees only public repositories. The counts are taken over what the caller can see, so a guest's open and overdue leave private bugs out. An agent counts as a guest, as on the terminal. Any other kind is refused as invalid.
Tests: test/mcp-flow-bugs.test.ts names an overdue high bug first and hides a private repository's bug from a guest. bun test test/mcp-size.test.ts passes with no ceiling raised, and bun x tsc --noEmit is clean. I also ran test/mcp-flow-why.test.ts, which passes. bun scripts/gate.ts printed nothing, so I take it as passing. The commit carries "Pipeline: #591".
Docs: docs/MCP.md has a short note under "Room for a new tool", and the tool's doc string describes the new kind.
Left out: paging past 100 bugs, and filtering by repository. open and overdue count every visible bug, not just the 100 returned.
To try: call flow with { "kind": "bugs" } as an admin and as a non-admin.
The flow MCP tool now takes kind: "bugs". It returns { open, overdue, bugs }, where each bug is { repo, number, priority, dueAt }. Bugs come soonest due first, at most 100. It adds no new tool file and raises no ceiling.
The check failed only because no commit message had a "Try:" line. I added an empty commit that carries one and pushed it. I haven't seen the check's verdict on the new push yet. The code is unchanged since the last push, and test/mcp-flow-bugs.test.ts, test/mcp-size.test.ts and tsc were green then.
Gate: it follows the terminal bugs screen. An admin sees every repository. Anyone else, agents included, sees only public repositories. open and overdue count only the bugs the caller can see. Any other kind is refused as invalid.
Tests: test/mcp-flow-bugs.test.ts names an overdue high bug first and hides a private repository's bug from a guest. It also checks that an unknown kind is refused.
Left out: paging past 100 bugs, and filtering by repository. open and overdue count every visible bug, not just the 100 returned.
To try: on the preview, call flow with { "kind": "bugs" } as an admin and as a non-admin.
Clean. kind "bugs" reuses openBugs, sorts by due time, caps at 100, counts over what the caller can see, and gates exactly as the terminal bugs screen does (admin person sees all; agents and others public only). Unknown kind refused. Tests cover overdue-high-first, guest hiding private, and bad kind. Docs note is in MCP.md, not README. The terminal screen already exists, so both doors hold. I could not see the commit message locally; I take the Pipeline: #591 line from the builder and the green check.
flownow takeskind: "bugs". It returns{ open, overdue, bugs }. Each bug is{ repo, number, priority, dueAt }, with priority "high" or "low". Bugs come soonest due first, at most 100. It adds no tool file and raises no ceiling.Gate: it follows the terminal bugs screen. An admin sees every repository. Anyone else sees only public repositories. The counts are taken over what the caller can see, so a guest's
openandoverdueleave private bugs out. An agent counts as a guest, as on the terminal. Any otherkindis refused as invalid.Tests:
test/mcp-flow-bugs.test.tsnames an overdue high bug first and hides a private repository's bug from a guest.bun test test/mcp-size.test.tspasses with no ceiling raised, andbun x tsc --noEmitis clean. I also rantest/mcp-flow-why.test.ts, which passes.bun scripts/gate.tsprinted nothing, so I take it as passing. The commit carries "Pipeline: #591".Docs:
docs/MCP.mdhas a short note under "Room for a new tool", and the tool'sdocstring describes the new kind.Left out: paging past 100 bugs, and filtering by repository.
openandoverduecount every visible bug, not just the 100 returned.To try: call
flowwith{ "kind": "bugs" }as an admin and as a non-admin.Closes #8973