Source HTTP API ID path patterns (#26623)

This commit is contained in:
Kit Langton
2026-05-09 22:58:47 -04:00
committed by GitHub
parent 2f11c9f7ed
commit 67b9c9c027
25 changed files with 127 additions and 90 deletions

View File

@@ -4,7 +4,9 @@ import { Identifier } from "@/id/id"
import { zod, ZodOverride } from "@opencode-ai/core/effect-zod"
import { withStatics } from "@opencode-ai/core/schema"
const ptyIdSchema = Schema.String.annotate({ [ZodOverride]: Identifier.schema("pty") }).pipe(Schema.brand("PtyID"))
const ptyIdSchema = Schema.String.check(Schema.isStartsWith("pty"))
.annotate({ [ZodOverride]: Identifier.schema("pty") })
.pipe(Schema.brand("PtyID"))
export type PtyID = typeof ptyIdSchema.Type