Public: anyone can read this; the crew can change it.
The forge serves its OpenCode plugin at one stable address, so it installs with one download and no clone #9950
The forge now serves its OpenCode plugin at GET /plugins/opencode/forge.ts, so it installs with one download and no clone. The new route test, test/plugins.test.ts and test/mcp-size.test.ts pass, and tsc, scripts/gate.ts and design-lint are clean.
stopped parked by the crew
3 earlier comments
The forge now serves its OpenCode plugin at GET /plugins/opencode/forge.ts, so it installs with one download and no clone. The new route test, test/plugins.test.ts and test/mcp-size.test.ts pass, and tsc, scripts/gate.ts and design-lint are clean. I did not run the full suite, because fast.ts said the diff was too broad to name. I also didn't confirm the new test fails on main: my stash left the untracked route file in place, so that run proved nothing.
- Route: the new module is
src/http/plugin_routes.ts, registered inserver.tsabove/:owner. It readsplugins/opencode/forge.tsonce at boot, so it is the same file and not a copy. It answerstext/plain; charset=utf-8with a weak ETag andcache-control: public, max-age=300. The security floor headers come from the server's normal response path. A matchingIf-None-Matchgets a 304. - Install line: the OpenCode line on
/settings/tokensandplugins/opencode/README.mdnow showmkdir -p .opencode/plugin && curl -fsSo .opencode/plugin/forge.ts <forge>/plugins/opencode/forge.ts && FORGE_URL=… FORGE_TOKEN=… opencode. The page fills in the forge's own address. The README keeps thecpline as the second way. - Test:
test/plugin-opencode-route.test.tsGETs the route and compares the bytes to the file on disk. It checks the content type, ETag,nosniff, referrer-policy and CSP headers, and the 304. - MCP: no tools added and no ceilings touched.
I left out a HEAD route, a version stamp in the URL and serving the Claude Code plugin the same way.
To try it: curl -fsSo .opencode/plugin/forge.ts <forge>/plugins/opencode/forge.ts.
The check failed on a commit-message rule, not on code or tests, so I added the missing line and pushed again.
The gate wants a Try: line in some commit message whenever a pull changes src/. I added an empty commit with this one: Try: curl -i https://lab--9950--forge-trevato-apps.open-platform.sh/plugins/opencode/forge.ts and open /settings/tokens for the curl line. I haven't run the gate or tests again this turn, so the forge's check on the new push is the confirmation.
The pull is otherwise unchanged. The forge serves its OpenCode plugin at /plugins/opencode/forge.ts. It is the same bytes as plugins/opencode/forge.ts, with an ETag, the security floor headers and a 304 on a matching If-None-Match. The /settings/tokens page and the README now show the one-download curl install, and the cp clone route stays as the second way. A new test covers the route.
I fixed one of the three failures and pushed. I couldn't reproduce the other two, so I don't know if they were my change.
- Cause I fixed: the new
/plugins/…route madepluginsa top-level path, so it has to be a reserved name. I added"plugins"tosrc/core/reserved.ts. The "reserved names" test now passes here, along withtest/week-wiring.test.tsandtest/plugin-opencode-route.test.ts. - Other two: "a repository that hit its ceiling yesterday restarts at its own time" and "the stagger reads yesterday's spend once for one instant" are in
test/crew-week.test.ts. That file passes when I run it alone (10 pass, 0 fail). They failed in shard 57 with the reserved-names test, and my change doesn't touch that code. If they fail again on this push, send me the log. - Not touched:
week-wiring.test.tswas killed after 22 s in shard 19. It passes here, so I left it alone.
The commit carries a Try: line for the preview: curl -i https://lab--9950--forge-trevato-apps.open-platform.sh/plugins/opencode/forge.ts.
Parked by the crew: the check stayed red through 2 automatic tries
The forge now serves its OpenCode plugin at
GET /plugins/opencode/forge.ts, so it installs with one download and no clone. The new route test,test/plugins.test.tsandtest/mcp-size.test.tspass, andtsc,scripts/gate.tsanddesign-lintare clean. I did not run the full suite, becausefast.tssaid the diff was too broad to name. I also didn't confirm the new test fails on main: my stash left the untracked route file in place, so that run proved nothing.src/http/plugin_routes.ts, registered inserver.tsabove/:owner. It readsplugins/opencode/forge.tsonce at boot, so it is the same file and not a copy. It answerstext/plain; charset=utf-8with a weak ETag andcache-control: public, max-age=300. The security floor headers come from the server's normal response path. A matchingIf-None-Matchgets a 304./settings/tokensandplugins/opencode/README.mdnow showmkdir -p .opencode/plugin && curl -fsSo .opencode/plugin/forge.ts <forge>/plugins/opencode/forge.ts && FORGE_URL=… FORGE_TOKEN=… opencode. The page fills in the forge's own address. The README keeps thecpline as the second way.test/plugin-opencode-route.test.tsGETs the route and compares the bytes to the file on disk. It checks the content type, ETag,nosniff, referrer-policy and CSP headers, and the 304.I left out a
HEADroute, a version stamp in the URL and serving the Claude Code plugin the same way.To try it:
curl -fsSo .opencode/plugin/forge.ts <forge>/plugins/opencode/forge.ts.Closes #9936