feat(plugin): add namespaced hook API (#33416)

This commit is contained in:
Dax
2026-06-22 19:06:57 -04:00
committed by GitHub
parent dc468bdcfd
commit 909a1a6d78
150 changed files with 3286 additions and 3916 deletions
+7 -10
View File
@@ -1,21 +1,18 @@
import type { LanguageModelV3 } from "@ai-sdk/provider"
import type { ModelV2Info } from "@opencode-ai/sdk/v2/types"
import type { Effect } from "effect"
import type { Hookable } from "./registration.js"
import type { Hooks } from "./registration.js"
export interface AISDKHooks {
readonly sdk: (event: {
export type AISDKHooks = Hooks<{
sdk: {
readonly model: ModelV2Info
readonly package: string
readonly options: Record<string, any>
sdk?: any
}) => Effect.Effect<void> | void
readonly language: (event: {
}
language: {
readonly model: ModelV2Info
readonly sdk: any
readonly options: Record<string, any>
language?: LanguageModelV3
}) => Effect.Effect<void> | void
}
export interface AISDK extends Hookable<AISDKHooks> {}
}
}>