mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-07 16:43:28 +00:00
16 lines
595 B
TypeScript
16 lines
595 B
TypeScript
import type { CommandV2Info } from "@opencode-ai/sdk/v2/types"
|
|
import type { CommandApi } from "@opencode-ai/client/effect/api"
|
|
import type { Effect } from "effect"
|
|
import type { TransformHook } from "./registration.js"
|
|
|
|
export interface CommandDraft {
|
|
list(): readonly CommandV2Info[]
|
|
get(name: string): CommandV2Info | undefined
|
|
update(name: string, update: (command: CommandV2Info) => void): void
|
|
remove(name: string): void
|
|
}
|
|
|
|
export interface CommandHooks extends CommandApi<unknown> {
|
|
readonly transform: TransformHook<CommandDraft>
|
|
readonly reload: () => Effect.Effect<void>
|
|
}
|