mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
17 lines
700 B
TypeScript
17 lines
700 B
TypeScript
import type { McpApi } from "@opencode/client/effect/api"
|
|
import type { Mcp } from "@opencode/schema/mcp"
|
|
import type { Effect, Types } from "effect"
|
|
import type { Transform } from "./registration.js"
|
|
|
|
export interface MCPEditor {
|
|
list(): readonly [string, Types.DeepMutable<Mcp.ServerConfig>][]
|
|
get(name: string): Types.DeepMutable<Mcp.ServerConfig> | undefined
|
|
set(name: string, config: Mcp.ServerConfig): void
|
|
update(name: string, update: (config: Types.DeepMutable<Mcp.ServerConfig>) => void): void
|
|
remove(name: string): void
|
|
}
|
|
|
|
export interface MCPDomain extends Pick<McpApi<unknown>, "list"> {
|
|
readonly transform: Transform<MCPEditor>
|
|
readonly reload: () => Effect.Effect<void>
|
|
}
|