Repository navigation
Description
Is your feature request related to a problem?
Hi there. We're using this plugin to capture token usage metrics on our team, love it so far! We do our coding in ephemeral cloud dev environments which means opencode plugins are installed quite often.
We noticed OpenCode was getting slow to start in fresh sandboxes and traced it back to the plugin install. It pulls in about 185 MB of dependencies: mostly @opentelemetry/* (~105 MB) and effect (~47 MB), plus zod, @grpc, protobufjs, etc.
When we dug in, it looks like none of that is needed at runtime. The dist/index.js file is seems to already be a self-contained bundle. The only things it imports are Node built-ins like fs, http and zlib. To double-check, I copied just dist/ and package.json into an empty folder with no node_modules and imported it with Node. It loaded fine on both 1.5.1 and 2.1.0.
Since OpenCode installs plugins on first start, the download lands right on the startup path. In a fresh sandbox, opencode serve took about 8.5s to come up with the plugin not yet installed, versus about 1.2s once it was cached. On slower networks it was enough to blow past our startup timeout. Anything ephemeral (CI, cloud sandboxes, fresh containers) hits this every time.
Describe the solution you'd like
Would you be open to moving those packages from dependencies to devDependencies, like #117 did for typescript? Since everything's already bundled, it shouldn't change anything at runtime. If something really does need to resolve at runtime, it could stay as a dependency or become a peer dependency.
Describe alternatives you've considered
Right now we're installing the plugin into our sandbox image so it's fine, but thought this was worth mentioning.
Telemetry type
No response
Additional context
No response
Checklist
- I have searched existing issues and discussions for similar feature requests
- I have checked the changelog to see if this already exists
Activity