diff --git a/package.json b/package.json index 0838c56..eb46557 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "typecheck": "tsc --noEmit", "check": "npm run typecheck && npm run lint && npm run format:check", "prepublishOnly": "npm run check && npm run clean && npm run build", - "prepare": "husky" + "prepare": "npm run build" }, "lint-staged": { "src/**/*.ts": [ diff --git a/src/index.ts b/src/index.ts index dfd504c..04c234d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,5 +7,6 @@ import { OpencodeSyncPlugin } from './plugin/index.js'; -// Only export the plugin as default - OpenCode expects a single default export -export default OpencodeSyncPlugin; +// OpenCode 1.17.x expects a V1 PluginModule: { id?, server: Plugin } +// Wrap the bare plugin function so the loader recognizes it. +export default { id: 'oc-sync', server: OpencodeSyncPlugin };