import type { AgentApi } from "@opencode-ai/client/promise/api" import type { Agent } from "@opencode-ai/schema/agent" import type { Transform } from "./registration.js" import type { DeepMutable } from "./types.js" export interface AgentDraft { list(): readonly DeepMutable[] get(id: string): DeepMutable | undefined default(id: string | undefined): void update(id: string, update: (agent: DeepMutable) => void): void remove(id: string): void } export interface AgentDomain extends AgentApi { readonly transform: Transform readonly reload: () => Promise }