mirror of
https://github.com/Heretek-AI/opencode.git
synced 2026-11-22 19:09:31 -10:00
18 lines
674 B
TypeScript
18 lines
674 B
TypeScript
import type { McpApi } from "@opencode-ai/client/promise/api"
|
|
import type { Mcp } from "@opencode-ai/schema/mcp"
|
|
import type { Transform } from "./registration.js"
|
|
import type { DeepMutable } from "./types.js"
|
|
|
|
export interface MCPDraft {
|
|
list(): readonly [string, DeepMutable<Mcp.ServerConfig>][]
|
|
get(name: string): DeepMutable<Mcp.ServerConfig> | undefined
|
|
set(name: string, config: Mcp.ServerConfig): void
|
|
update(name: string, update: (config: DeepMutable<Mcp.ServerConfig>) => void): void
|
|
remove(name: string): void
|
|
}
|
|
|
|
export interface MCPDomain extends Pick<McpApi, "list"> {
|
|
readonly transform: Transform<MCPDraft>
|
|
readonly reload: () => Promise<void>
|
|
}
|