@@ -22,8 +22,7 @@ import { InstanceState } from "@/effect/instance-state"
2222import { Context , Duration , Effect , Exit , Fiber , Layer , Option , Schema } from "effect"
2323import { EffectFlock } from "@opencode-ai/core/util/effect-flock"
2424import { containsPath } from "../project/instance-context"
25- import { zod } from "@opencode-ai/core/effect-zod"
26- import { NonNegativeInt , PositiveInt , withStatics , type DeepMutable } from "@opencode-ai/core/schema"
25+ import { NonNegativeInt , PositiveInt , type DeepMutable } from "@opencode-ai/core/schema"
2726import { ConfigAgent } from "./agent"
2827import { ConfigAttachment } from "./attachment"
2928import { ConfigCommand } from "./command"
@@ -112,23 +111,13 @@ async function resolveLoadedPlugins<T extends { plugin?: ConfigPlugin.Spec[] }>(
112111 return config
113112}
114113
115- export const Server = ConfigServer . Server . zod
116- export const Layout = ConfigLayout . Layout . zod
117114export type Layout = ConfigLayout . Layout
118115
119116const LogLevelRef = Schema . Literals ( [ "DEBUG" , "INFO" , "WARN" , "ERROR" ] ) . annotate ( {
120117 identifier : "LogLevel" ,
121118 description : "Log level" ,
122119} )
123120
124- // The Effect Schema is the canonical source of truth. The `.zod` compatibility
125- // surface is derived from it so plugin/SDK Zod consumers keep working without
126- // a parallel hand-maintained Zod definition.
127- //
128- // The walker emits `z.object({...})` which is non-strict by default. Config
129- // historically uses `.strict()` (additionalProperties: false in openapi.json),
130- // so layer that on after derivation. Re-apply the Config ref afterward
131- // since `.strict()` strips the walker's meta annotation.
132121export const Info = Schema . Struct ( {
133122 $schema : Schema . optional ( Schema . String ) . annotate ( {
134123 description : "JSON schema reference for configuration validation" ,
@@ -301,15 +290,7 @@ export const Info = Schema.Struct({
301290 } ) ,
302291 } ) ,
303292 ) ,
304- } )
305- . annotate ( { identifier : "Config" } )
306- . pipe (
307- withStatics ( ( s ) => ( {
308- zod : ( zod ( s ) as unknown as z . ZodObject < any > ) . strict ( ) . meta ( { ref : "Config" } ) as unknown as z . ZodType <
309- DeepMutable < Schema . Schema . Type < typeof s > >
310- > ,
311- } ) ) ,
312- )
293+ } ) . annotate ( { identifier : "Config" } )
313294
314295// Uses the shared `DeepMutable` from `@opencode-ai/core/schema`. See the definition
315296// there for why the local variant is needed over `Types.DeepMutable` from
0 commit comments