add plugin hook for config

This commit is contained in:
Dax Raad
2025-08-21 11:22:13 -04:00
parent a9dcbedf99
commit 4518f96e3d
3 changed files with 9 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import type {
UserMessage,
Part,
Auth,
Config,
} from "@opencode-ai/sdk"
import type { BunShell } from "./shell"
@@ -20,6 +21,7 @@ export type Plugin = (input: PluginInput) => Promise<Hooks>
export interface Hooks {
event?: (input: { event: Event }) => Promise<void>
config?: (input: Config) => Promise<void>
auth?: {
provider: string
loader?: (auth: () => Promise<Auth>, provider: Provider) => Promise<Record<string, any>>