refactor(schema): extract public event definitions (#33579)

This commit is contained in:
Kit Langton
2026-06-24 16:43:17 -04:00
committed by GitHub
parent 858f35f1b3
commit 24b0132bc5
93 changed files with 2740 additions and 2124 deletions
+2 -3
View File
@@ -1,6 +1,7 @@
export * as Catalog from "./catalog"
import { Array, Context, Effect, Layer, Option, Order, pipe, Schema } from "effect"
import { Catalog } from "@opencode-ai/schema/catalog"
import { ModelV2 } from "./model"
import { ProviderV2 } from "./provider"
import { EventV2 } from "./event"
@@ -17,9 +18,7 @@ export type DefaultModel = { providerID: ProviderV2.ID; modelID: ModelV2.ID }
export const PolicyActions = Schema.Literals(["provider.use"])
export const Event = {
Updated: EventV2.define({ type: "catalog.updated", schema: {} }),
}
export const Event = Catalog.Event
type Data = {
providers: Map<ProviderV2.ID, ProviderRecord>