Source workspace path pattern (#26632)

This commit is contained in:
Kit Langton
2026-05-09 23:02:31 -04:00
committed by GitHub
parent 85e47225d4
commit 3d29b6a6f5
4 changed files with 7 additions and 11 deletions
@@ -4,9 +4,9 @@ import { Identifier } from "@/id/id"
import { zod, ZodOverride } from "@opencode-ai/core/effect-zod"
import { withStatics } from "@opencode-ai/core/schema"
const workspaceIdSchema = Schema.String.annotate({ [ZodOverride]: Identifier.schema("workspace") }).pipe(
Schema.brand("WorkspaceID"),
)
const workspaceIdSchema = Schema.String.check(Schema.isStartsWith("wrk"))
.annotate({ [ZodOverride]: Identifier.schema("workspace") })
.pipe(Schema.brand("WorkspaceID"))
export type WorkspaceID = typeof workspaceIdSchema.Type