From aed03078f88af5c28035a28b6edbbf10228a49ed Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Thu, 23 Apr 2026 16:44:32 +0000 Subject: [PATCH] chore: generate --- packages/opencode/src/bus/index.ts | 20 ++++---------------- packages/opencode/src/sync/index.ts | 16 +++++++++++----- packages/sdk/openapi.json | 21 +++------------------ 3 files changed, 18 insertions(+), 39 deletions(-) diff --git a/packages/opencode/src/bus/index.ts b/packages/opencode/src/bus/index.ts index a2f9f5ccba..9183ff72a4 100644 --- a/packages/opencode/src/bus/index.ts +++ b/packages/opencode/src/bus/index.ts @@ -33,10 +33,7 @@ type State = { } export interface Interface { - readonly publish: ( - def: D, - properties: BusProperties, - ) => Effect.Effect + readonly publish: (def: D, properties: BusProperties) => Effect.Effect readonly subscribe: (def: D) => Stream.Stream> readonly subscribeAll: () => Stream.Stream readonly subscribeCallback: ( @@ -85,10 +82,7 @@ export const layer = Layer.effect( }) } - function publish( - def: D, - properties: BusProperties, - ) { + function publish(def: D, properties: BusProperties) { return Effect.gen(function* () { const s = yield* InstanceState.get(state) const payload: Payload = { type: def.type, properties } @@ -184,17 +178,11 @@ const { runPromise, runSync } = makeRuntime(Service, layer) // runSync is safe here because the subscribe chain (InstanceState.get, PubSub.subscribe, // Scope.make, Effect.forkScoped) is entirely synchronous. If any step becomes async, this will throw. -export async function publish( - def: D, - properties: BusProperties, -) { +export async function publish(def: D, properties: BusProperties) { return runPromise((svc) => svc.publish(def, properties)) } -export function subscribe( - def: D, - callback: (event: Payload) => unknown, -) { +export function subscribe(def: D, callback: (event: Payload) => unknown) { return runSync((svc) => svc.subscribeCallback(def, callback)) } diff --git a/packages/opencode/src/sync/index.ts b/packages/opencode/src/sync/index.ts index 5a4078402d..482ad4fbb6 100644 --- a/packages/opencode/src/sync/index.ts +++ b/packages/opencode/src/sync/index.ts @@ -12,7 +12,10 @@ import { Schema as EffectSchema, Types } from "effect" import { zodObject } from "@/util/effect-zod" import { isRecord } from "@/util/record" -export type Definition = { +export type Definition< + Schema extends EffectSchema.Top = EffectSchema.Top, + BusSchema extends EffectSchema.Top = Schema, +> = { type: string version: number aggregate: string @@ -87,10 +90,13 @@ export function define< Agg extends string, Schema extends EffectSchema.Top, BusSchema extends EffectSchema.Top = Schema, ->(input: { type: Type; version: number; aggregate: Agg; schema: Schema; busSchema?: BusSchema }): Definition< - Schema, - BusSchema -> { +>(input: { + type: Type + version: number + aggregate: Agg + schema: Schema + busSchema?: BusSchema +}): Definition { if (frozen) { throw new Error("Error defining sync event: sync system has been frozen") } diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 55570d47dd..e54648e198 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -10570,8 +10570,7 @@ } ] } - }, - "required": ["url"] + } }, "title": { "anyOf": [ @@ -10636,8 +10635,7 @@ } ] } - }, - "required": ["created", "updated", "compacting", "archived"] + } }, "permission": { "anyOf": [ @@ -10676,20 +10674,7 @@ } ] } - }, - "required": [ - "id", - "slug", - "projectID", - "workspaceID", - "directory", - "parentID", - "summary", - "title", - "version", - "permission", - "revert" - ] + } } }, "required": ["sessionID", "info"]