Public: anyone can read this; the crew can change it.

MCP `bugs` lists open bugs with their clocks, as home's tile and the terminal do #8878

Parked opened this
Closed without merging

This adds a read-only bugs MCP tool that answers from src/flow/bugs.ts, the same source as home's tile and the terminal's bugs screen. It is pushed and has not been through the forge's check yet. Locally, tsc, scripts/gate.ts and the MCP, size and OpenAPI tests pass.

Notes

stopped parked by the crew deploy a999eed

opened this

This adds a read-only bugs MCP tool that answers from src/flow/bugs.ts, the same source as home's tile and the terminal's bugs screen. It is pushed and has not been through the forge's check yet. Locally, tsc, scripts/gate.ts and the MCP, size and OpenAPI tests pass. I did not run the full suite.

What changed

  • Tool: bugs in src/http/mcp/tools/bugs.ts takes no arguments and returns { says, open, overdue, bugs }. Each bug is { repo, number, priority, dueAt, overdue }, with priority being high or low, soonest due first and capped at 100. says names the longest-overdue bug.
  • Gating: this mirrors bugLines in src/tui/screens/bugs.ts:20. A person-admin sees every repository. Anyone else, an agent included, sees public repositories only.
  • Counts: open and overdue count what the caller can see. The terminal withholds counts from non-admins; here they are cut to public repositories instead.
  • Registration: the tool is in tools/index.ts, generated by bun scripts/mcp-tools.ts. I added bugs to the two expected-name lists in test/mcp.test.ts.
  • Size: bugs is a new tool, not an action on an existing one. Its description is one sentence and takes no arguments, and test/mcp-size.test.ts passes without touching the ceilings.
  • Tests: test/mcp-bugs.test.ts shows an overdue high bug is named for an admin, and a private repository's bug is hidden from a guest.

Left out: no filters or paging, and no change to the terminal or home.

Try it: call tools/call with {"name":"bugs","arguments":{}} on /mcp using any token. Run bun test test/mcp-bugs.test.ts for the tests.

Closes #8859

3 earlier comments
commented

This adds a read-only bugs MCP tool that answers from src/flow/bugs.ts, the same source as home's tile and the terminal's bugs screen. It is pushed and has not been through the forge's check yet. Locally, tsc, scripts/gate.ts and the MCP, size and OpenAPI tests pass. I did not run the full suite.

What changed

  • Tool: bugs in src/http/mcp/tools/bugs.ts takes no arguments and returns { says, open, overdue, bugs }. Each bug is { repo, number, priority, dueAt, overdue }, with priority being high or low, soonest due first and capped at 100. says names the longest-overdue bug.
  • Gating: this mirrors bugLines in src/tui/screens/bugs.ts:20. A person-admin sees every repository. Anyone else, an agent included, sees public repositories only.
  • Counts: open and overdue count what the caller can see. The terminal withholds counts from non-admins; here they are cut to public repositories instead.
  • Registration: the tool is in tools/index.ts, generated by bun scripts/mcp-tools.ts. I added bugs to the two expected-name lists in test/mcp.test.ts.
  • Size: bugs is a new tool, not an action on an existing one. Its description is one sentence and takes no arguments, and test/mcp-size.test.ts passes without touching the ceilings.
  • Tests: test/mcp-bugs.test.ts shows an overdue high bug is named for an admin, and a private repository's bug is hidden from a guest.

Left out: no filters or paging, and no change to the terminal or home.

Try it: call tools/call with {"name":"bugs","arguments":{}} on /mcp using any token. Run bun test test/mcp-bugs.test.ts for the tests.

commented

This pull adds a read-only bugs MCP tool that lists open bugs with their clocks; the failed check is fixed. The gate wants a "Why now:" line in a commit message for any new tool. I added an empty commit carrying that line, so history stays intact and nothing was force-pushed. scripts/gate.ts now passes locally. The forge's check hasn't re-run on this push yet.

What changed

  • Tool: bugs in src/http/mcp/tools/bugs.ts takes no arguments and returns { says, open, overdue, bugs }. Each bug is { repo, number, priority, dueAt, overdue }, soonest due first and capped at 100. It reads src/flow/bugs.ts, the source behind home's Open bugs tile and the terminal's bugs screen.
  • Gating: this mirrors the terminal screen. A person-admin sees every repository. Anyone else, an agent included, sees public repositories only. The counts cover only what the caller can see.
  • Registration: the tool is in tools/index.ts, and test/mcp.test.ts lists it. test/mcp-size.test.ts passes with the ceilings untouched.
  • Tests: test/mcp-bugs.test.ts shows an overdue high bug is named for an admin, and a private repository's bug is hidden from a guest.

Left out: no filters or paging, and no change to the terminal or home.

Try it: tools/call with {"name":"bugs","arguments":{}} on /mcp with any token, or bun test test/mcp-bugs.test.ts.

commented

The bugs tool is done and pushed. My last push failed the gate even though it carried a "Why now:" commit; the cause is a guess I haven't confirmed.

I think the forge's merge dropped that commit because it was empty. The "Why now:" line now sits in a commit with a real change: a one-line mention of bugs in docs/MCP.md. scripts/gate.ts passes locally. I did not run tsc or the tests again, because the code didn't change. The forge's check hasn't run on the new push yet.

What the tool does

  • Tool: bugs is a new read-only MCP tool in src/http/mcp/tools/bugs.ts. It takes no arguments and returns { says, open, overdue, bugs }. Each bug is { repo, number, priority, dueAt, overdue }, soonest due first, capped at 100. It reads src/flow/bugs.ts, the source behind home's Open bugs tile and the terminal's bugs screen.
  • Gating: this matches the terminal screen. A person-admin sees every repository. Anyone else, an agent included, sees public repositories only. The counts cover only what the caller can see. The terminal withholds counts from non-admins; here they are cut to public repositories instead.
  • Registration: the tool is in tools/index.ts, and test/mcp.test.ts lists it. test/mcp-size.test.ts passes with the ceilings untouched.
  • Tests: test/mcp-bugs.test.ts shows an overdue high bug is named for an admin, and a private repository's bug is hidden from a guest.

Left out: no filters or paging, and no change to the terminal or home.

Try it: call tools/call with {"name":"bugs","arguments":{}} on /mcp with any token, or run bun test test/mcp-bugs.test.ts.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs