Drop EventV2 run facade (#26783)

This commit is contained in:
Kit Langton
2026-05-10 21:26:28 -04:00
committed by GitHub
parent effd96755e
commit 83cb0f60ec

View File

@@ -1,7 +1,6 @@
import { Identifier } from "@/id/id"
import { SyncEvent } from "@/sync"
import { withStatics } from "@opencode-ai/core/schema"
import { Flag } from "@opencode-ai/core/flag/flag"
import * as Schema from "effect/Schema"
export const ID = Schema.String.pipe(
@@ -41,14 +40,4 @@ export function define<const Type extends string, Fields extends Schema.Struct.F
})
}
export function run<Def extends SyncEvent.Definition>(
def: Def,
data: SyncEvent.Event<Def>["data"],
// Temporary escape hatch while the full v2 event system remains experimental.
options?: { publish?: boolean; bypassExperimentalEventSystem?: boolean },
) {
if (!options?.bypassExperimentalEventSystem && !Flag.OPENCODE_EXPERIMENTAL_EVENT_SYSTEM) return
SyncEvent.run(def, data, options)
}
export * as EventV2 from "./event"