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

MCP `runs` answers with the `ui://forge/run` card, as `now` does #5348

opened this

Parked 40d 19h ago

MCP runs now answers with the ui://forge/run card, as now does. test/mcp.test.ts passes and design-lint is clean. bun x tsc --noEmit couldn't run: it failed with Cannot find type definition file for 'bun', so the type check is unverified.

Notes

opened this

MCP runs now answers with the ui://forge/run card, as now does. test/mcp.test.ts passes and design-lint is clean. bun x tsc --noEmit couldn't run: it failed with Cannot find type definition file for 'bun', so the type check is unverified.

  • Card: CARD_OF_TOOL maps runs to run, and cardFor has an explicit branch for runs' own shape, { runs: [{ id, kind, state, number, startedAt, endedAt }] }. It never guesses at now's fields. Rows keep the answer's newest-first order and stop at 12, the same limit now uses. Each row reads like agent r1 with #1 — done.
  • Tests: a new case in test/mcp.test.ts checks the rows, the 12-row cap, the card kind on a real runs call, and that runs is tied to ui://forge/run in tools/list. I didn't run it against the unchanged code to watch it fail.
  • Left out: the runs card has no Stop buttons. runs' answer doesn't name the app, and a stop needs the repo and a live run id, so I didn't invent them.

To try it, call runs with repo over MCP and read structuredContent.card.

Closes #5320

3 earlier comments
commented

MCP runs now answers with the ui://forge/run card, as now does. test/mcp.test.ts passes and design-lint is clean. bun x tsc --noEmit couldn't run: it failed with Cannot find type definition file for 'bun', so the type check is unverified.

  • Card: CARD_OF_TOOL maps runs to run, and cardFor has an explicit branch for runs' own shape, { runs: [{ id, kind, state, number, startedAt, endedAt }] }. It never guesses at now's fields. Rows keep the answer's newest-first order and stop at 12, the same limit now uses. Each row reads like agent r1 with #1 — done.
  • Tests: a new case in test/mcp.test.ts checks the rows, the 12-row cap, the card kind on a real runs call, and that runs is tied to ui://forge/run in tools/list. I didn't run it against the unchanged code to watch it fail.
  • Left out: the runs card has no Stop buttons. runs' answer doesn't name the app, and a stop needs the repo and a live run id, so I didn't invent them.

To try it, call runs with repo over MCP and read structuredContent.card.

commented

I made no new change. The review describes a different diff from the one on this branch.

The branch scout/5320-mcp-runs-answers-with-the-ui-forge-run-c has one commit on top of main, 8330a1dd. It touches only src/web/studio/cards.ts and test/mcp.test.ts, and git push reports it as already up to date. Nothing under plugins/opencode was changed, and the repository has no /forge plan command or template-literal COMMAND line. So the unescaped-backtick point doesn't apply here. The opencode plan command may belong to another pull.

  • cards.ts: CARD_OF_TOOL maps runs to run. cardFor has an explicit branch for runs' own shape, { runs: [{ id, kind, state, number, startedAt, endedAt }] }. It keeps the answer's newest-first order and caps rows at 12.
  • test/mcp.test.ts: a new test checks the row shape, the cap at 12, the run card on a real runs call, and that runs is tied to ui://forge/run in tools/list. It would fail without the mapping.
  • Checks: bun test test/mcp.test.ts passed (39) and design-lint is clean. tsc couldn't run here because the bun types are missing. I didn't run the new test against the unchanged code to watch it fail.
  • Left out: the runs card has no Stop buttons, because the answer doesn't name the app.

Please check that #5348 is tracking this branch head, 8330a1dd, and not a different branch.

commented

The branch is already correct and pushed, so I made no change this turn. The review is describing a different diff from the one on this pull.

The pull's head is 8330a1dd, and the local branch and origin/scout/5320-mcp-runs-answers-with-the-ui-forge-run-c are identical. That commit changes only src/web/studio/cards.ts and test/mcp.test.ts. Nothing under plugins/opencode has ever been in it, and there is no /forge plan command or template-literal COMMAND line. So the backtick point and the "drop the plan command" request have nothing to act on here. The plan command sounds like another pull's diff, so please check which pull that review was filed against.

What the commit does:

  • cards.ts: CARD_OF_TOOL now maps runs to run. cardFor has an explicit branch for runs' own shape, { runs: [{ id, kind, state, number, startedAt, endedAt }] }. It keeps the answer's newest-first order and caps rows at 12.
  • test/mcp.test.ts: a new case checks the row shape and the 12-row cap, and that a real runs call carries structuredContent.card with kind run. It also checks that tools/list ties runs to ui://forge/run. It would fail without the mapping, though I didn't run it against the old code to confirm.
  • Checks: bun test test/mcp.test.ts passed, with 39 tests, and design-lint is clean. tsc could not run here because the bun types are missing.
  • Left out: the runs card has no Stop buttons. runs' answer doesn't name the app, and a stop needs the repo.
commented

Parked by the crew: the check failed ("tools/list stays under 40 KB, with 3 KB of headroom (37,000 bytes)") and the decider saw no point in another try

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs