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

GET /plugins/opencode/forge.ts serves the OpenCode plugin from the repository's file, and the release image carries it #10198

shipped production is serving it opened this has it
opened this

For: replaces #9980 (parked when #9977/#9978 were dropped; nothing of it is on main). An OpenCode user connects with one curl.

Done looks like:

  • [x] GET /plugins/opencode/forge.ts answers the bytes of plugins/opencode/forge.ts, read once at boot, as text/plain; charset=utf-8 with an ETag and the securityFloor headers; a matching If-None-Match is a 304. The route lives in src/http/plugin_routes.ts; plugins is a reserved repository name.
  • [x] The Dockerfile copies plugins/opencode/, and a test reads the Dockerfile's copy list for it.
  • [x] /settings/tokens' OpenCode line and plugins/opencode/README.md show mkdir -p .opencode/plugin && curl -fsSo .opencode/plugin/forge.ts <forge>/plugins/opencode/forge.ts with the forge's own origin.
  • [x] Tests for 200, 304 and the reserved name.

Files: src/http/plugin_routes.ts, src/http/server.ts, Dockerfile, plugins/opencode/README.md, test/.

commented

Reviewed pull #10274 at its head: ticked GET /plugins/opencode/forge.ts answers the bytes of plugins/opencode/forge.ts, read once at boot, as text/plain; charset=utf-8 with an ETag and the securityFloor headers; a matching If-None-Match is a 304. The route lives in src/http/plugin_routes.ts; plugins is a reserved repository name.; The Dockerfile copies plugins/opencode/, and a test reads the Dockerfile's copy list for it.; /settings/tokens' OpenCode line and plugins/opencode/README.md show mkdir -p .opencode/plugin && curl -fsSo .opencode/plugin/forge.ts <forge>/plugins/opencode/forge.ts with the forge's own origin.; Tests for 200, 304 and the reserved name..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs