GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move schema utilities into core (#26565) · githubhjs/opencode@dcdbdb2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • core/src
      • effect-zod.ts
      • schema.ts
    • opencode
      • specs/effect
        • migration.md
        • schema.md
      • src
        • agent
          • agent.ts
        • auth
          • index.ts
        • cli/cmd/tui
          • event.ts
        • command
          • index.ts
        • config
          • agent.ts
          • command.ts
          • config.ts
          • console-state.ts
          • formatter.ts
          • layout.ts
          • lsp.ts
          • mcp.ts
          • model-id.ts
          • parse.ts
          • permission.ts
          • plugin.ts
          • provider.ts
          • reference.ts
          • server.ts
          • skills.ts
        • control-plane
          • schema.ts
          • types.ts
        • file
          • index.ts
          • ripgrep.ts
        • format
          • index.ts
        • lsp
          • lsp.ts
        • mcp
          • index.ts
        • permission
          • index.ts
          • schema.ts
        • project
          • project.ts
          • schema.ts
          • vcs.ts
        • provider
          • auth.ts
          • provider.ts
          • schema.ts
        • pty
          • index.ts
          • schema.ts
          • ticket.ts
        • question
          • index.ts
          • schema.ts
        • server/routes/instance/httpapi
          • groups
            • experimental.ts
            • sync.ts
          • handlers
            • experimental.ts
        • session
          • message-v2.ts
          • message.ts
          • prompt.ts
          • revert.ts
          • schema.ts
          • session.ts
          • status.ts
          • summary.ts
          • todo.ts
        • skill
          • index.ts
        • snapshot
          • index.ts
        • storage
          • storage.ts
        • sync
          • index.ts
          • schema.ts
        • tool
          • read.ts
          • registry.ts
          • schema.ts
          • shell
            • prompt.ts
        • util
          • named-schema-error.ts
        • v2
          • auth.ts
          • event.ts
          • model.ts
          • session-event.ts
          • session.ts
      • test
        • tool
          • parameters.test.ts
        • util
          • effect-zod.test.ts

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/opencode/src/util/effect-zod.ts‎ ‎packages/core/src/effect-zod.ts‎packages/opencode/src/util/effect-zod.ts renamed to packages/core/src/effect-zod.ts

Copy file name to clipboard
File renamed without changes.
Collapse file

‎packages/opencode/src/util/schema.ts‎ ‎packages/core/src/schema.ts‎packages/opencode/src/util/schema.ts renamed to packages/core/src/schema.ts

Copy file name to clipboard
File renamed without changes.
Collapse file

‎packages/opencode/specs/effect/migration.md‎

Copy file name to clipboardExpand all lines: packages/opencode/specs/effect/migration.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ Rules:
5959

6060
## Schema → Zod interop
6161

62-
When a service uses Effect Schema internally but needs Zod schemas for the HTTP layer, derive Zod from Schema using the `zod()` helper from `@/util/effect-zod`:
62+
When a service uses Effect Schema internally but needs Zod schemas for the HTTP layer, derive Zod from Schema using the `zod()` helper from `@opencode-ai/core/effect-zod`:
6363

6464
```ts
65-
import { zod } from "@/util/effect-zod"
65+
import { zod } from "@opencode-ai/core/effect-zod"
6666

6767
export const ZodInfo = zod(Info) // derives z.ZodType from Schema.Union
6868
```
Collapse file

‎packages/opencode/specs/effect/schema.md‎

Copy file name to clipboardExpand all lines: packages/opencode/specs/effect/schema.md
+3-3Lines changed: 3 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Zod-first definitions to Effect Schema with Zod compatibility shims.
88
Use Effect Schema as the source of truth for domain models, IDs, inputs,
99
outputs, and typed errors. Keep Zod available at existing HTTP, tool, and
1010
compatibility boundaries by exposing a `.zod` static derived from the Effect
11-
schema via `@/util/effect-zod`.
11+
schema via `@opencode-ai/core/effect-zod`.
1212

1313
The long-term driver is `specs/effect/http-api.md` — once the HTTP server
1414
moves to `@effect/platform`, every Schema-first DTO can flow through
@@ -97,7 +97,7 @@ creating a parallel schema source of truth.
9797

9898
## Escape hatches
9999

100-
The walker in `@/util/effect-zod` exposes two explicit escape hatches for
100+
The walker in `@opencode-ai/core/effect-zod` exposes two explicit escape hatches for
101101
cases the pure-Schema path cannot express. Each one stays in the codebase
102102
only as long as its upstream or local dependency requires it — inline
103103
comments document when each can be deleted.
@@ -389,7 +389,7 @@ piecewise.
389389

390390
## Notes
391391

392-
- Use `@/util/effect-zod` for all Schema → Zod conversion.
392+
- Use `@opencode-ai/core/effect-zod` for all Schema → Zod conversion.
393393
- Prefer one canonical schema definition. Avoid maintaining parallel Zod and
394394
Effect definitions for the same domain type.
395395
- Keep the migration incremental. Converting the domain model first is more
Collapse file

‎packages/opencode/src/agent/agent.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/agent/agent.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import { Effect, Context, Layer, Schema } from "effect"
2424
import { InstanceState } from "@/effect/instance-state"
2525
import * as Option from "effect/Option"
2626
import * as OtelTracer from "@effect/opentelemetry/Tracer"
27-
import { zod } from "@/util/effect-zod"
28-
import { withStatics, type DeepMutable } from "@/util/schema"
27+
import { zod } from "@opencode-ai/core/effect-zod"
28+
import { withStatics, type DeepMutable } from "@opencode-ai/core/schema"
2929

3030
type ReferenceEntry = NonNullable<Config.Info["reference"]>[string]
3131
type ResolvedReference = { kind: "git"; repository: string; branch?: string } | { kind: "local"; path: string }
Collapse file

‎packages/opencode/src/auth/index.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/auth/index.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from "path"
22
import { Effect, Layer, Record, Result, Schema, Context } from "effect"
3-
import { zod } from "@/util/effect-zod"
4-
import { NonNegativeInt } from "@/util/schema"
3+
import { zod } from "@opencode-ai/core/effect-zod"
4+
import { NonNegativeInt } from "@opencode-ai/core/schema"
55
import { Global } from "@opencode-ai/core/global"
66
import { AppFileSystem } from "@opencode-ai/core/filesystem"
77

Collapse file

‎packages/opencode/src/cli/cmd/tui/event.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/cli/cmd/tui/event.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { BusEvent } from "@/bus/bus-event"
22
import { SessionID } from "@/session/schema"
3-
import { PositiveInt } from "@/util/schema"
3+
import { PositiveInt } from "@opencode-ai/core/schema"
44
import { Effect, Schema } from "effect"
55

66
const DEFAULT_TOAST_DURATION = 5000
Collapse file

‎packages/opencode/src/command/index.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/command/index.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import type { InstanceContext } from "@/project/instance"
55
import { SessionID, MessageID } from "@/session/schema"
66
import { Effect, Layer, Context, Schema } from "effect"
77
import z from "zod"
8-
import { zod, ZodOverride } from "@/util/effect-zod"
9-
import { withStatics } from "@/util/schema"
8+
import { zod, ZodOverride } from "@opencode-ai/core/effect-zod"
9+
import { withStatics } from "@opencode-ai/core/schema"
1010
import { Config } from "@/config/config"
1111
import { MCP } from "../mcp"
1212
import { Skill } from "../skill"
Collapse file

‎packages/opencode/src/config/agent.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/config/agent.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ export * as ConfigAgent from "./agent"
22

33
import { Exit, Schema, SchemaGetter } from "effect"
44
import { Bus } from "@/bus"
5-
import { zod } from "@/util/effect-zod"
6-
import { PositiveInt, withStatics } from "@/util/schema"
5+
import { zod } from "@opencode-ai/core/effect-zod"
6+
import { PositiveInt, withStatics } from "@opencode-ai/core/schema"
77
import * as Log from "@opencode-ai/core/util/log"
88
import { NamedError } from "@opencode-ai/core/util/error"
99
import { Glob } from "@opencode-ai/core/util/glob"
Collapse file

‎packages/opencode/src/config/command.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/config/command.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { Schema } from "effect"
55
import { NamedError } from "@opencode-ai/core/util/error"
66
import { Glob } from "@opencode-ai/core/util/glob"
77
import { Bus } from "@/bus"
8-
import { zod } from "@/util/effect-zod"
9-
import { withStatics } from "@/util/schema"
8+
import { zod } from "@opencode-ai/core/effect-zod"
9+
import { withStatics } from "@opencode-ai/core/schema"
1010
import { configEntryNameFromPath } from "./entry-name"
1111
import { InvalidError } from "./error"
1212
import * as ConfigMarkdown from "./markdown"

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.