@@ -22,8 +22,7 @@ import type { SystemError } from "bun"
2222import type { Provider } from "@/provider/provider"
2323import { ModelID , ProviderID } from "@/provider/schema"
2424import { Effect , Schema , Types } from "effect"
25- import { zod } from "@opencode-ai/core/effect-zod"
26- import { NonNegativeInt , withStatics } from "@opencode-ai/core/schema"
25+ import { NonNegativeInt } from "@opencode-ai/core/schema"
2726import * as EffectLogger from "@opencode-ai/core/effect/logger"
2827import { MessageError } from "./message-error"
2928import { AuthError , OutputLengthError } from "./message-error"
@@ -277,9 +276,7 @@ export const ToolStateCompleted = Schema.Struct({
277276 } ) ,
278277 attachments : Schema . optional ( Schema . Array ( FilePart ) ) ,
279278 rawOutput : Schema . optional ( Schema . Any ) ,
280- } )
281- . annotate ( { identifier : "ToolStateCompleted" } )
282- . pipe ( withStatics ( ( s ) => ( { zod : zod ( s ) } ) ) )
279+ } ) . annotate ( { identifier : "ToolStateCompleted" } )
283280export type ToolStateCompleted = Types . DeepMutable < Schema . Schema . Type < typeof ToolStateCompleted > >
284281
285282function truncateToolOutput ( text : string , maxChars ?: number ) {
@@ -298,9 +295,7 @@ export const ToolStateError = Schema.Struct({
298295 end : NonNegativeInt ,
299296 } ) ,
300297 rawError : Schema . optional ( Schema . Any ) ,
301- } )
302- . annotate ( { identifier : "ToolStateError" } )
303- . pipe ( withStatics ( ( s ) => ( { zod : zod ( s ) } ) ) )
298+ } ) . annotate ( { identifier : "ToolStateError" } )
304299export type ToolStateError = Types . DeepMutable < Schema . Schema . Type < typeof ToolStateError > >
305300
306301export const ToolState = Schema . Union ( [
@@ -323,9 +318,7 @@ export const ToolPart = Schema.Struct({
323318 metadata : Schema . optional ( Schema . Record ( Schema . String , Schema . Any ) ) ,
324319 providerExecuted : Schema . optional ( Schema . Boolean ) ,
325320 dynamic : Schema . optional ( Schema . Boolean ) ,
326- } )
327- . annotate ( { identifier : "ToolPart" } )
328- . pipe ( withStatics ( ( s ) => ( { zod : zod ( s ) } ) ) )
321+ } ) . annotate ( { identifier : "ToolPart" } )
329322export type ToolPart = Omit < Types . DeepMutable < Schema . Schema . Type < typeof ToolPart > > , "state" > & {
330323 state : ToolState
331324}
0 commit comments