@opencode-ai/plugin
Advanced tools
+36
-1
@@ -1,2 +0,2 @@ | ||
| import type { Event, createOpencodeClient, App, Model, Provider, Permission, UserMessage, Part } from "@opencode-ai/sdk"; | ||
| import type { Event, createOpencodeClient, App, Model, Provider, Permission, UserMessage, Part, Auth } from "@opencode-ai/sdk"; | ||
| import type { BunShell } from "./shell"; | ||
@@ -13,2 +13,37 @@ export type PluginInput = { | ||
| }) => Promise<void>; | ||
| auth?: { | ||
| provider: string; | ||
| loader?: (auth: () => Promise<Auth>, provider: Provider) => Promise<Record<string, any>>; | ||
| methods: ({ | ||
| type: "oauth"; | ||
| label: string; | ||
| authorize(): Promise<{ | ||
| url: string; | ||
| instructions: string; | ||
| } & ({ | ||
| method: "auto"; | ||
| callback(): Promise<{ | ||
| type: "success"; | ||
| refresh: string; | ||
| access: string; | ||
| expires: number; | ||
| } | { | ||
| type: "failed"; | ||
| }>; | ||
| } | { | ||
| method: "code"; | ||
| callback(code: string): Promise<{ | ||
| type: "success"; | ||
| refresh: string; | ||
| access: string; | ||
| expires: number; | ||
| } | { | ||
| type: "failed"; | ||
| }>; | ||
| })>; | ||
| } | { | ||
| type: "api"; | ||
| label: string; | ||
| })[]; | ||
| }; | ||
| /** | ||
@@ -15,0 +50,0 @@ * Called when a new message is received |
+1
-1
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/plugin", | ||
| "version": "0.4.45", | ||
| "version": "0.5.1", | ||
| "type": "module", | ||
@@ -6,0 +6,0 @@ "scripts": { |
6516
19.45%205
20.59%