mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-10-20 19:38:52 +00:00
Merged. Thank you, @maxmad64bis. The reasoning holds: the stable 2.0 host no longer provides the beta `@opencode-ai/plugin` contract the plugin was written against, so the plugin simply failed to load there — moving catalog publishing to `Plugin.define` with `ctx.provider.transform` against the stable `@opencode/plugin` peer range is the fix rather than a preference. The diff is large, but it is contained entirely inside the `@omniroute/opencode-plugin-v2` workspace package and carries its own suite. Validation before merge: boarded onto the current release tip together with four sibling PRs of yours — merged clean, no conflict against the tip or the siblings. `check:file-size`, `check:changelog-integrity` and `typecheck:core` green on the combined tree, and the boarded unit suites 36 pass / 0 fail. Note for the follow-up: #14235 (the sdk telemetry hook) conflicts with this one on `src/index.ts` and will be re-applied on top of the new shape rather than merged as-is — nothing for you to do, I'll handle the reconciliation.
10 lines
579 B
JavaScript
10 lines
579 B
JavaScript
// Root entrypoint for OpenCode host plugin loading.
|
|
//
|
|
// OpenCode 2.x local installs (`file://` directory in `opencode.json`) never
|
|
// read package.json `main`/`exports`: the config scan resolves only the
|
|
// subpaths ["server", ""] then ["tui"], ["rpc"] from the package directory.
|
|
// With only `dist/index.js` present the scan yields `{}` and the plugin is
|
|
// silently dropped (no `loading plugin`, no error). This stable re-export
|
|
// keeps `dist/` as the only build output while exposing the module the host
|
|
// actually probes for.
|
|
export { default } from "./dist/index.js";
|