Skip to content

Migrate runtime validators to Effect Schema#26975

Merged
kitlangton merged 1 commit into
devfrom
cleanup/zod-runtime-validators
May 12, 2026
Merged

Migrate runtime validators to Effect Schema#26975
kitlangton merged 1 commit into
devfrom
cleanup/zod-runtime-validators

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Replace isolated Zod runtime validators with Effect Schema in MCP auth, TUI editor context parsing, Zed selection row parsing, and GitHub Copilot model parsing.
  • Preserve the existing JSON field names, transformed editor selection shape, and MCP auth service API mutability.

Verification

  • bun typecheck from packages/opencode
  • bun run test -- test/cli/tui/editor-context.test.tsx test/cli/tui/editor-context-zed.test.ts test/plugin/github-copilot-models.test.ts test/mcp/oauth-auto-connect.test.ts test/server/httpapi-mcp-oauth.test.ts test/server/httpapi-mcp.test.ts from packages/opencode
  • bunx prettier --write packages/opencode/src/mcp/auth.ts packages/opencode/src/cli/cmd/tui/context/editor.ts packages/opencode/src/cli/cmd/tui/context/editor-zed.ts packages/opencode/src/plugin/github-copilot/models.ts
  • bunx oxlint packages/opencode/src/mcp/auth.ts packages/opencode/src/cli/cmd/tui/context/editor.ts packages/opencode/src/cli/cmd/tui/context/editor-zed.ts packages/opencode/src/plugin/github-copilot/models.ts (0 errors; existing warnings remain in editor files)

@kitlangton kitlangton merged commit 1007630 into dev May 12, 2026
12 of 16 checks passed
@kitlangton kitlangton deleted the cleanup/zod-runtime-validators branch May 12, 2026 01:41
leohenon pushed a commit to leohenon/opencode-vim that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant