mirror of
https://github.com/affaan-m/ECC.git
synced 2026-08-31 04:09:51 +02:00
fix(plugin): export only plugin function for opencode loader compatibility
opencode's legacy plugin loader (getLegacyPlugins) iterates every module export and throws 'Plugin export is not a function' if any export is not a plugin function. The bundle exported VERSION (string) and metadata (object) alongside the plugin, breaking plugin loading. Export only the plugin function so opencode can load ecc-universal.
This commit is contained in:
+3
-43
@@ -35,46 +35,6 @@
|
||||
*/
|
||||
|
||||
// Export the main plugin
|
||||
export { ECCHooksPlugin, default } from "./plugins/index.js"
|
||||
|
||||
// Export individual components for selective use
|
||||
export * from "./plugins/index.js"
|
||||
|
||||
// Version export
|
||||
export const VERSION = "1.6.0"
|
||||
|
||||
// Plugin metadata
|
||||
export const metadata = {
|
||||
name: "ecc-universal",
|
||||
version: VERSION,
|
||||
description: "ECC plugin for OpenCode",
|
||||
author: "affaan-m",
|
||||
features: {
|
||||
agents: 13,
|
||||
commands: 31,
|
||||
skills: 37,
|
||||
configAssets: true,
|
||||
hookEvents: [
|
||||
"file.edited",
|
||||
"tool.execute.before",
|
||||
"tool.execute.after",
|
||||
"session.created",
|
||||
"session.idle",
|
||||
"session.deleted",
|
||||
"file.watcher.updated",
|
||||
"permission.ask",
|
||||
"todo.updated",
|
||||
"shell.env",
|
||||
"experimental.session.compacting",
|
||||
],
|
||||
customTools: [
|
||||
"run-tests",
|
||||
"check-coverage",
|
||||
"security-audit",
|
||||
"format-code",
|
||||
"lint-check",
|
||||
"git-summary",
|
||||
"changed-files",
|
||||
],
|
||||
},
|
||||
}
|
||||
// opencode's legacy plugin loader iterates every module export and throws if
|
||||
// any is not a plugin function, so only the plugin function may be exported.
|
||||
export { default } from "./plugins/index.js"
|
||||
|
||||
Reference in New Issue
Block a user