feat(plugin): align hooks with client APIs
This commit is contained in:
parent
650d774372
commit
6ae2fa5196
65 changed files with 978 additions and 664 deletions
|
|
@ -1,11 +1,14 @@
|
|||
import type { SkillV2Source } from "@opencode-ai/sdk/v2/types"
|
||||
import type { Hooks } from "./registration.js"
|
||||
import type { SkillApi } from "@opencode-ai/client/effect/api"
|
||||
import type { Effect } from "effect"
|
||||
import type { TransformHook } from "./registration.js"
|
||||
|
||||
export interface SkillDraft {
|
||||
source(source: SkillV2Source): void
|
||||
list(): readonly SkillV2Source[]
|
||||
}
|
||||
|
||||
export type SkillHooks = Hooks<{
|
||||
transform: SkillDraft
|
||||
}>
|
||||
export interface SkillHooks extends SkillApi<unknown> {
|
||||
readonly transform: TransformHook<SkillDraft>
|
||||
readonly reload: () => Effect.Effect<void>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue