diff options
| author | Kit Langton <[email protected]> | 2026-04-17 21:04:40 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-18 01:04:40 +0000 |
| commit | 5181f9b4e141fc6c0c3c3d26169721af9e63ca51 (patch) | |
| tree | 8057cbf4079ce9b650aa34771de4442d04aa5cdf | |
| parent | f52ae28432f66eef13ea48203899b23992f89eb9 (diff) | |
| download | opencode-5181f9b4e141fc6c0c3c3d26169721af9e63ca51.tar.gz opencode-5181f9b4e141fc6c0c3c3d26169721af9e63ca51.zip | |
refactor(config): drop ZodOverride from PositiveInt in provider.ts (#23215)
| -rw-r--r-- | packages/opencode/src/config/provider.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/opencode/src/config/provider.ts b/packages/opencode/src/config/provider.ts index b435f4375..4b08592a6 100644 --- a/packages/opencode/src/config/provider.ts +++ b/packages/opencode/src/config/provider.ts @@ -1,12 +1,10 @@ import { Schema } from "effect" -import z from "zod" -import { zod, ZodOverride } from "@/util/effect-zod" +import { zod } from "@/util/effect-zod" import { withStatics } from "@/util/schema" -// Positive integer preserving exact Zod JSON Schema (type: integer, exclusiveMinimum: 0). -const PositiveInt = Schema.Number.annotate({ - [ZodOverride]: z.number().int().positive(), -}) +// Positive integer: emits JSON Schema `type: integer, exclusiveMinimum: 0` +// via the effect-zod walker's well-known refinement translation. +const PositiveInt = Schema.Number.check(Schema.isInt()).check(Schema.isGreaterThan(0)) export const Model = Schema.Struct({ id: Schema.optional(Schema.String), |
