diff --git a/packages/opencode/src/plugin/index.ts b/packages/opencode/src/plugin/index.ts index fd4a826052..54910a7706 100644 --- a/packages/opencode/src/plugin/index.ts +++ b/packages/opencode/src/plugin/index.ts @@ -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) { diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index 9bc74e58a8..b78bcae177 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -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