feat(plugin): align hooks with client APIs

This commit is contained in:
Dax Raad 2026-07-03 18:10:24 -04:00
commit 6ae2fa5196
65 changed files with 978 additions and 664 deletions

View file

@ -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>
}