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 #9963
The forge now serves its OpenCode plugin at GET /plugins/opencode/forge.ts, and I fixed the cause of the earlier red check: the Docker image didn't contain the plugin file. It's pushed, but the forge's full check hasn't run on it yet.
stopped parked by the crew deploy fe53573
3 earlier comments
The forge now serves its OpenCode plugin at GET /plugins/opencode/forge.ts, and I fixed the cause of the earlier red check: the Docker image didn't contain the plugin file. It's pushed, but the forge's full check hasn't run on it yet. Locally the gate, tsc, the new route test, the release-boot and Dockerfile-pin tests, and a wider batch of related tests (262) pass.
- Route:
src/http/plugin_routes.tsreadsplugins/opencode/forge.tsonce at boot and answers it astext/plain; charset=utf-8with an ETag and the security headers. A matchingIf-None-Matchgets a 304. The route is wired insrc/http/server.ts. - Reserved name:
pluginsis added to the reserved names insrc/core/reserved.ts, so no user or app can take it as a top-level path. - Install line: the OpenCode line on /settings/tokens (
src/web/pages/account.ts) now fills in the forge's own address:mkdir -p .opencode/plugin && curl -fsSo .opencode/plugin/forge.ts <forge>/plugins/opencode/forge.ts && … opencode.plugins/opencode/README.mdleads with the same download and keeps the clone route as the second way. - Test:
test/plugin-opencode-route.test.tschecks that the bytes equal the file and the headers are present. It also checks that a 304 answers a matchingIf-None-Match.
Why the check was red: the image copies only src/ and two docs files, so the boot-time read of the plugin file failed and the forge crashed on start. The release-boot test, which boots the tree the way the image ships it, caught it. I added COPY plugins/opencode/forge.ts to the Dockerfile, and the release-boot test copies that file in as well. That is the one test I changed, because the test has to mirror the image.
The branch had also fallen behind main, so I merged origin/main into it.
Left out: the top-level README.md doesn't show the curl line. I only updated plugins/opencode/README.md and the tokens page.
To try it: curl -i <preview>/plugins/opencode/forge.ts. Then repeat the request with the returned ETag as If-None-Match, which should give a 304.
🤖 Generated with Claude Code
I didn't fix anything for this failure; I pushed an empty commit to get the check re-run. The one failing test, "a fresh account's second preview is refused…" in test/quotas-running.test.ts, passed in all three local runs (7 of 7 each time). I think it's a timing flake, not something this pull broke.
The test starts real app processes and waits for them to come up. In the forge's run it timed out at about 120 s, and the pull got the failure only because it changed server.ts, which that test imports. Nothing on this branch touches previews or quotas. The plugin route is a single GET handler, and the other 14,827 tests passed.
The branch still has the real fix from before: the Dockerfile copies the plugin file into the image, and the release-boot test now copies it in too. If the same test fails again on the new run, the cause is the load on the shard, not this branch. A person would need to look at that test's wait budget.
🤖 Generated with Claude Code
The failing test looks like a load flake. I did not change its code, and I could not reproduce the failure.
- Failure:
a linked sub signs in and is not throttled…intest/forge-signin-signup.test.tsfailed once in shard 22 (39 ms) during the full check. Run alone, it passed 4 times. Three were after the merge below and one was before it. - Cause: I did not find one. The pull touches nothing the test imports, so I made no code change for it.
- What I did: I merged
origin/maininto the branch and pushed (fe53573f). That brings in main's newer tests and may clear the failure, but that is a guess. If the check fails on this test again, the cause is in the sign-up throttle or window timing. - Checks:
tsc --noEmitis clean. The OpenCode plugin route test andrelease-boottest pass (12 tests). I did not runscripts/gate.tsthis turn.
Pull description: The forge serves its OpenCode plugin at /plugins/opencode/forge.ts.
- Route: the route is in
src/http/plugin_routes.tsand is wired insrc/http/server.ts. - Reserved name:
pluginsis a reserved top-level name insrc/core/reserved.ts. - Image: the Dockerfile ships the plugin file, so the route's boot read finds it.
- Docs:
plugins/opencode/README.mdsays how to use it. - Tests:
test/plugin-opencode-route.test.tsandtest/release-boot.test.tscover the route and the boot read. - Not done: no auth or versioning on the route, and no plugin changes beyond serving the file.
- Try it:
curl $FORGE_URL/plugins/opencode/forge.ts.
🤖 Generated with Claude Code
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, and I fixed the cause of the earlier red check: the Docker image didn't contain the plugin file. It's pushed, but the forge's full check hasn't run on it yet. Locally the gate,tsc, the new route test, the release-boot and Dockerfile-pin tests, and a wider batch of related tests (262) pass.src/http/plugin_routes.tsreadsplugins/opencode/forge.tsonce at boot and answers it astext/plain; charset=utf-8with an ETag and the security headers. A matchingIf-None-Matchgets a 304. The route is wired insrc/http/server.ts.pluginsis added to the reserved names insrc/core/reserved.ts, so no user or app can take it as a top-level path.src/web/pages/account.ts) now fills in the forge's own address:mkdir -p .opencode/plugin && curl -fsSo .opencode/plugin/forge.ts <forge>/plugins/opencode/forge.ts && … opencode.plugins/opencode/README.mdleads with the same download and keeps the clone route as the second way.test/plugin-opencode-route.test.tschecks that the bytes equal the file and the headers are present. It also checks that a 304 answers a matchingIf-None-Match.Why the check was red: the image copies only
src/and two docs files, so the boot-time read of the plugin file failed and the forge crashed on start. The release-boot test, which boots the tree the way the image ships it, caught it. I addedCOPY plugins/opencode/forge.tsto theDockerfile, and the release-boot test copies that file in as well. That is the one test I changed, because the test has to mirror the image.The branch had also fallen behind main, so I merged
origin/maininto it.Left out: the top-level
README.mddoesn't show the curl line. I only updatedplugins/opencode/README.mdand the tokens page.To try it:
curl -i <preview>/plugins/opencode/forge.ts. Then repeat the request with the returned ETag asIf-None-Match, which should give a 304.🤖 Generated with Claude Code
Closes #9936