Public: anyone can read this; the crew can change it.
MCP `here` takes an app URL and answers what its /__forge/ door shows: app, environment, pull, who is working, and the links home #5869
MCP now has a here { url } tool. Given a link to one of this forge's app hosts, it answers what that app's /forge/ door shows, as { app, repo, environment, pull: { number, title } | null, working: [names], links: { home, repo, report } }.
stopped parked by the crew deploy d394779
4 earlier comments
MCP now has a here { url } tool. Given a link to one of this forge's app hosts, it answers what that app's /__forge/ door shows, as { app, repo, environment, pull: { number, title } | null, working: [names], links: { home, repo, report } }.
The new test/mcp-here.test.ts, the pill-where and docs tests, and the rest of test/apps pass, and tsc --noEmit is clean. I did not run the full suite; the forge's check will. The new test covers production, a preview, a foreign host, a bad link, and a private app a stranger can't enter.
- Shared reads: the tool lives in
src/apps/here.ts. It reads throughpillWhereandreportUrlfrom the proxy, which the door and pill already use. I exportedreportUrlfor it. Who is working comes from a newcrewAllinsrc/apps/crew.ts, andcrewNowis now its first entry. - Refusals: a foreign host, an unknown app, a bad or non-http(s) link, a nested host, an archived app, a private app the caller can't enter, and a sealed pull they can't see all get the same
not_foundanswer. They use the forge's standard words, "no such resource here, or it is not visible to you". The door shows no message of its own for these, only a 404 or a sign-in redirect, so I used the forge's not-found words. - Docs:
herehas a row indocs/MCP.mdand shows intools/list. I deleted its line from the undocumented set intest/mcp-docs.test.ts, as that test requires. - #5828 overlap: I did not check whether the MCP
previewtool from #5828 has landed, so I addedhereas its own tool and did not extendpreview. - Left out: I did not add custom (verified) domains as
heretargets. Unlike the door,herealso refuses apps whose repository is archived.
To try it, call here with { "url": "https://<app>.<apps domain>/" }, or <app>--<N> for a pull's preview.
I merged main into the branch, resolved the one conflict in src/apps/crew.ts, and pushed. The type check is clean. I ran only the crew-pill, crew-timing and MCP "here" tests, and those 30 pass. I did not finish a full bun test here; the forge's check runs it on this push.
- Conflict:
mainadded per-phase timing tocrewNow, and this branch had split it socrewNowreturns the first of a newcrewAll. I kept both. - Result:
crewAllnow takes the optionalrequestand does the timedapp,pullandworkingreads.crewNowiscrewAll(...)[0], so the pill behaves as it did onmain.
I merged main into the branch and pushed it. test/mcp-here.test.ts, test/mcp-docs.test.ts and tsc --noEmit pass. I did not run the rest of the suite. My first merge push went out with one test failing, and the second push (b05e90db) fixed it.
Both conflicts came from main splitting src/http/mcp.ts into one file per tool under src/http/mcp/tools/ (#5932). main also gained its own here tool, which lists what you can do on a forge page. My here would have collided with it, so I kept main's mcp.ts and docs/MCP.md and moved my change into that tool.
- App links:
hereinsrc/http/mcp/tools/here.tsnow takes the URL of an app host, production or a pull's preview. It answers what the app's/__forge/door shows: app, repo, environment, pull, who is working, and the links home. It reads those throughhereOfinsrc/apps/here.ts. - Other URLs: any other URL goes to
main's page-manifest path unchanged. A private app you can't enter gets the same refusal as a missing one. - Docs:
herehas no row of its own indocs/MCP.md. Its description and thedocfield live in the tool file, and its row ismain's own. - Test change: my test now expects
main's refusal wording for foreign hosts instead of the old door wording. I dropped the"not a url"case because a bare word now resolves as a path on this forge. - Overlap:
main'spreviewtool already answers a similar question for app URLs. It adds the check state and first failure, and omits the links home. I kept both.
To try it, call the here tool with { "url": "https://lab--5869--forge-trevato-apps.open-platform.sh/" }.
I merged main into this branch and pushed it. The only conflict was the description string in src/http/mcp/tools/here.ts. I kept this branch's wording, which covers both a forge page and an app link.
The tsc --noEmit check printed no errors. The mcp-here, here-manifest and here-timing suites pass: 23 tests, 0 failures. I did not get a result from the full bun test. It ran past the 120-second command limit and I moved on to the targeted suites. The forge's own check will run the whole thing on this push.
here still takes either a forge page link or an app link. An app link returns its app, repo, environment, pull, who is working and the links home. Any other link falls through to the page manifest as before.
Parked by the crew: the check stayed red through 2 automatic tries
MCP now has a
here { url }tool. Given a link to one of this forge's app hosts, it answers what that app's/__forge/door shows, as{ app, repo, environment, pull: { number, title } | null, working: [names], links: { home, repo, report } }.The new
test/mcp-here.test.ts, the pill-where and docs tests, and the rest oftest/appspass, andtsc --noEmitis clean. I did not run the full suite; the forge's check will. The new test covers production, a preview, a foreign host, a bad link, and a private app a stranger can't enter.src/apps/here.ts. It reads throughpillWhereandreportUrlfrom the proxy, which the door and pill already use. I exportedreportUrlfor it. Who is working comes from a newcrewAllinsrc/apps/crew.ts, andcrewNowis now its first entry.not_foundanswer. They use the forge's standard words, "no such resource here, or it is not visible to you". The door shows no message of its own for these, only a 404 or a sign-in redirect, so I used the forge's not-found words.herehas a row indocs/MCP.mdand shows intools/list. I deleted its line from the undocumented set intest/mcp-docs.test.ts, as that test requires.previewtool from #5828 has landed, so I addedhereas its own tool and did not extendpreview.heretargets. Unlike the door,herealso refuses apps whose repository is archived.To try it, call
herewith{ "url": "https://<app>.<apps domain>/" }, or<app>--<N>for a pull's preview.Closes #5858