refactor(core): consolidate tool architecture
This commit is contained in:
parent
0fd73a2976
commit
8db7487c89
466 changed files with 9405 additions and 11071 deletions
16
packages/plugin/src/effect/command.ts
Normal file
16
packages/plugin/src/effect/command.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import type { CommandApi } from "@opencode-ai/client/effect/api"
|
||||
import type { CommandInfo } from "@opencode-ai/client"
|
||||
import type { Effect } from "effect"
|
||||
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<unknown> {
|
||||
readonly transform: Transform<CommandDraft>
|
||||
readonly reload: () => Effect.Effect<void>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue