Skip to content

Commit eba89a6

Browse files
committed
hotfix: move McpNameSchema to src/mcp/types.ts for proper module organization
1 parent 0a82787 commit eba89a6

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/config/schema.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { z } from "zod"
2+
import { McpNameSchema } from "../mcp/types"
23

34
const PermissionValue = z.enum(["ask", "allow", "deny"])
45

@@ -23,8 +24,6 @@ export const AgentNameSchema = z.enum([
2324
"document-writer",
2425
])
2526

26-
export const McpNameSchema = z.enum(["websearch_exa", "context7"])
27-
2827
export const AgentOverrideConfigSchema = z.object({
2928
model: z.string().optional(),
3029
temperature: z.number().min(0).max(2).optional(),
@@ -53,5 +52,6 @@ export const OhMyOpenCodeConfigSchema = z.object({
5352
export type OhMyOpenCodeConfig = z.infer<typeof OhMyOpenCodeConfigSchema>
5453
export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>
5554
export type AgentOverrides = z.infer<typeof AgentOverridesSchema>
56-
export type McpName = z.infer<typeof McpNameSchema>
5755
export type AgentName = z.infer<typeof AgentNameSchema>
56+
57+
export { McpNameSchema, type McpName } from "../mcp/types"

src/mcp/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { McpName } from "../config"
21
import { websearch_exa } from "./websearch-exa"
32
import { context7 } from "./context7"
3+
import type { McpName } from "./types"
44

5-
export type { McpName }
5+
export { McpNameSchema, type McpName } from "./types"
66

77
const allBuiltinMcps: Record<McpName, { type: "remote"; url: string; enabled: boolean }> = {
88
websearch_exa,

src/mcp/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { z } from "zod"
2+
3+
export const McpNameSchema = z.enum(["websearch_exa", "context7"])
4+
5+
export type McpName = z.infer<typeof McpNameSchema>

0 commit comments

Comments
 (0)