mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-07 05:23:23 +00:00
17 lines
609 B
TypeScript
17 lines
609 B
TypeScript
import type { AgentV2Info } from "@opencode-ai/sdk/v2/types"
|
|
import type { AgentApi } from "@opencode-ai/client/effect/api"
|
|
import type { Effect } from "effect"
|
|
import type { TransformHook } from "./registration.js"
|
|
|
|
export interface AgentDraft {
|
|
list(): readonly AgentV2Info[]
|
|
get(id: string): AgentV2Info | undefined
|
|
default(id: string | undefined): void
|
|
update(id: string, update: (agent: AgentV2Info) => void): void
|
|
remove(id: string): void
|
|
}
|
|
|
|
export interface AgentHooks extends AgentApi<unknown> {
|
|
readonly transform: TransformHook<AgentDraft>
|
|
readonly reload: () => Effect.Effect<void>
|
|
}
|