pull/16961/head
Dax Raad 2026-03-10 16:07:25 -04:00
parent 4d5da9697e
commit 040700dbc4
2 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,11 @@ export namespace Plugin {
project: Instance.project,
worktree: Instance.worktree,
directory: Instance.directory,
get serverUrl(): URL {
throw new Error("Server URL is no longer supported in plugins")
},
// @ts-expect-error
$: typeof Bun === "undefined" ? undefined : Bun.$,
}
for (const plugin of INTERNAL_PLUGINS) {

View File

@ -12,6 +12,7 @@ import type {
Config,
} from "@opencode-ai/sdk"
import type { BunShell } from "./shell.js"
import { type ToolDefinition } from "./tool.js"
export * from "./tool.js"
@ -27,6 +28,8 @@ export type PluginInput = {
project: Project
directory: string
worktree: string
serverUrl: URL
$: BunShell
}
export type Plugin = (input: PluginInput) => Promise<Hooks>