Public: anyone can read this; the crew can change it.
`runs` answers with a ui://forge/runs card: each run's kind, state, issue or pull, and duration, newest first, linked to its log #11129
The MCP `runs` tool now draws its own `ui://forge/runs` card. `tsc`, `scripts/gate.ts` and the MCP tests (`test/mcp-size.test.ts` included, no ceiling raised) pass locally.
stopped parked by the crew deploy e65acd0
The MCP runs tool now draws its own ui://forge/runs card. tsc, scripts/gate.ts and the MCP tests (test/mcp-size.test.ts included, no ceiling raised) pass locally.
What changed
- Card:
runsused to draw the genericui://forge/runcard. That card was a thin row (agent <id>and#N — state) with no glyph, title or duration. It now has a card of its own. - Rows: one per run, newest first, up to 20. Each shows a glyph, the kind,
#Nand the issue or pull title, and the state as a word with its duration. A finished run shows the time it ran, and a running one showsrunning for 2m. Each row links to its run page, and only for a valid run id on anowner/namerepo. - Failed first: the status line leads with failures, for example
1 failed · 1 running · 20 runs. - Answer shape: the
runsJSON now also carriestitlefor each run. - Escaping: the card is plain data that the shell draws with
textContent. The newtest/mcp-runs-card.test.tsrenders a run with a hostile title and asserts it stays inert, and that the shell never usesinnerHTML. - Docs and tests:
docs/MCP.mdlists the card. I changed the olderrunscard assertions intest/mcp.test.tsto expectruns, because that test was asserting the old kind. - Reader scope:
listRepoRunsalready limits a reader to repositories they can read, and I didn't touch that.
Not done
- The card has no Stop action, since these are past runs.
- I did not run the full suite or
bun scripts/design-lint.ts; I left the design lint out because nothing undersrc/web/pages changed (only the card module).
Try it
Call the MCP runs tool with { repo: "owner/name" }. The result carries structuredContent.card, and the host reads ui://forge/runs.
The pre-push hook wanted a commit saying how to try the change, so I added an empty Try: commit.
The preview deploy didn't fail on anything in this change, so I made no new commit. The deploy log you sent shows no error from this branch. It also says only "no tests declared, none run".
- Preview: it is up, and
/healthzanswers 200 at https://lab--11129--forge-trevato-apps.open-platform.sh. - Log noise: the one ERROR line in the log is
[snapshots] restore drill failed to run: this forge has nowhere to drill from. That comes from the forge host, not from this app. - Tests:
forge.jsondeclares noapp.test, so the deploy runs none. The tests run under thecheckblock (fast,runandverifycommands), not at deploy. - Checks:
bun scripts/gate.ts,bun x tsc --noEmitandbun scripts/design-lint.tspass.bun test test/mcp-runs-card.test.ts test/mcp.test.tspasses 51 tests with 0 failures. - Head commit:
7d60f981c("Try: call the MCP runs tool…") is empty. I left it as is; I can't rewrite history, so it stays on the branch.
What the pull changes: the MCP runs tool now draws its own ui://forge/runs card (src/web/studio/cards.ts, src/http/mcp/tools/runs.ts). Each card row shows:
- the run's kind;
- a state word and glyph;
- the issue or pull it belongs to, with its title;
- the duration;
- a link to its run page.
docs/MCP.md, test/mcp.test.ts and the new test/mcp-runs-card.test.ts cover it.
To try it: call the MCP runs tool with { repo } and read the returned card.
I did not change forge.json or add a deploy-time test command, since the check block already runs the suite.
I merged main into the branch, fixed the two conflicts and pushed it as 342b85412. Before pushing, the gate, tsc, the design lint and test/mcp-runs-card.test.ts plus test/mcp.test.ts (51 tests) all passed.
The pull draws the runs tool's answer as its own ui://forge/runs card. Main had since added a scorecard card, and it had changed which card now and runs draw. The conflicts were all in the card kind lists and mappings.
src/web/studio/cards.ts: I kept both sets of changes.
- runs stays a card kind of its own and scorecard stays alongside it.
- now now draws the crew card, as on main, and runs draws the new runs card.
- The run card kind stays for the stop and now rows.
test/mcp.test.ts: the card list now has bothui://forge/runsandui://forge/scorecard. The expectation thatscorecardmaps toui://forge/scorecardismain's. Therunstool now expects therunskind and resource.
The runs tool now answers with a ui://forge/runs card. Each row links to its run page, and a failed run comes first in the card's status.
Both check failures were stale artefacts of the new title field on each run, not code bugs:
test/mcp-runs.test.ts: the test was wrong. It pinned the exact key set of a run row, so I addedtitleto the expected keys.docs/MCP.md: I regenerated the tool table withbun scripts/mcp-table.tsso therunsrow matches the new doc string.
The runs and mcp-table tests and bun x tsc --noEmit pass locally. I did not re-run the full suite here, and the forge's check will run it on this push.
To try it, call the runs tool with { repo: "owner/name" }.
Closed by the crew: main moved under it 2 times and the branch could not be brought up to date. Conflicting files: docs/MCP.md, src/web/studio/cards.ts.
The MCP
runstool now draws its ownui://forge/runscard.tsc,scripts/gate.tsand the MCP tests (test/mcp-size.test.tsincluded, no ceiling raised) pass locally.What changed
runsused to draw the genericui://forge/runcard. That card was a thin row (agent <id>and#N — state) with no glyph, title or duration. It now has a card of its own.#Nand the issue or pull title, and the state as a word with its duration. A finished run shows the time it ran, and a running one showsrunning for 2m. Each row links to its run page, and only for a valid run id on anowner/namerepo.1 failed · 1 running · 20 runs.runsJSON now also carriestitlefor each run.textContent. The newtest/mcp-runs-card.test.tsrenders a run with a hostile title and asserts it stays inert, and that the shell never usesinnerHTML.docs/MCP.mdlists the card. I changed the olderrunscard assertions intest/mcp.test.tsto expectruns, because that test was asserting the old kind.listRepoRunsalready limits a reader to repositories they can read, and I didn't touch that.Not done
bun scripts/design-lint.ts; I left the design lint out because nothing undersrc/web/pages changed (only the card module).Try it Call the MCP
runstool with{ repo: "owner/name" }. The result carriesstructuredContent.card, and the host readsui://forge/runs.The pre-push hook wanted a commit saying how to try the change, so I added an empty
Try:commit.Closes #11122