16 lines
523 B
TypeScript
16 lines
523 B
TypeScript
import type { CommandApi } from "@opencode-ai/client/promise/api"
|
|
import type { CommandInfo } from "@opencode-ai/client"
|
|
import type { Transform } from "./registration.js"
|
|
|
|
export interface CommandDraft {
|
|
list(): readonly CommandInfo[]
|
|
get(name: string): CommandInfo | undefined
|
|
update(name: string, update: (command: CommandInfo) => void): void
|
|
remove(name: string): void
|
|
}
|
|
|
|
export interface CommandDomain extends CommandApi {
|
|
readonly transform: Transform<CommandDraft>
|
|
readonly reload: () => Promise<void>
|
|
}
|