fix: prevent plugin crash by removing non-function exports from barrel files
BREAKING: OpenCode plugin loader calls all exports as functions. Exporting non-function values (schemas, constants, types) causes TypeError. Changes: - Remove OhMyOpenCodeConfigSchema export from root index.ts - Replace 'export *' with explicit function exports in hooks/index.ts - Remove 'export *' from comment-checker/index.ts
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "oh-my-opencode",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"description": "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -94,8 +94,4 @@ export function createCommentCheckerHooks() {
|
||||
}
|
||||
}
|
||||
|
||||
export * from "./types"
|
||||
export * from "./constants"
|
||||
export * from "./detector"
|
||||
export * from "./filters"
|
||||
export * from "./output"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export * from "./todo-continuation-enforcer"
|
||||
export * from "./context-window-monitor"
|
||||
export * from "./session-notification"
|
||||
export * from "./session-recovery"
|
||||
export * from "./comment-checker"
|
||||
export { createTodoContinuationEnforcer } from "./todo-continuation-enforcer"
|
||||
export { createContextWindowMonitorHook } from "./context-window-monitor"
|
||||
export { createSessionNotification } from "./session-notification"
|
||||
export { createSessionRecoveryHook } from "./session-recovery"
|
||||
export { createCommentCheckerHooks } from "./comment-checker"
|
||||
|
||||
@@ -190,7 +190,6 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
|
||||
export default OhMyOpenCodePlugin
|
||||
|
||||
export { OhMyOpenCodeConfigSchema } from "./config"
|
||||
export type {
|
||||
OhMyOpenCodeConfig,
|
||||
AgentName,
|
||||
|
||||
Reference in New Issue
Block a user