fix(sdk): preserve generated event contracts

This commit is contained in:
Dax Raad
2026-05-31 03:18:43 -04:00
parent 1afa9e32c9
commit 25edeaf473
7 changed files with 2496 additions and 2150 deletions
+7
View File
@@ -1,6 +1,13 @@
import { EventV2 } from "@opencode-ai/core/event"
import { Schema } from "effect"
export const Event = {
Connected: EventV2.define({ type: "server.connected", schema: {} }),
Disposed: EventV2.define({ type: "global.disposed", schema: {} }),
}
export const InstanceDisposed = Schema.Struct({
id: Schema.String,
type: Schema.Literal("server.instance.disposed"),
properties: Schema.Struct({ directory: Schema.String }),
}).annotate({ identifier: "Event.server.instance.disposed" })