Kit Langton 3 месяцев назад
Родитель
Сommit
83cb0f60ec
1 измененных файлов с 0 добавлено и 11 удалено
  1. 0 11
      packages/opencode/src/v2/event.ts

+ 0 - 11
packages/opencode/src/v2/event.ts

@@ -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"