@opencode-ai/plugin
Advanced tools
+13
-0
@@ -19,2 +19,7 @@ import type { Event, createOpencodeClient, Project, Model, Provider, Permission, UserMessage, Message, Part, Auth, Config } from "@opencode-ai/sdk"; | ||
| export type Plugin = (input: PluginInput) => Promise<Hooks>; | ||
| type Rule = { | ||
| key: string; | ||
| op: "eq" | "neq"; | ||
| value: string; | ||
| }; | ||
| export type AuthHook = { | ||
@@ -32,3 +37,5 @@ provider: string; | ||
| validate?: (value: string) => string | undefined; | ||
| /** @deprecated Use `when` instead */ | ||
| condition?: (inputs: Record<string, string>) => boolean; | ||
| when?: Rule; | ||
| } | { | ||
@@ -43,3 +50,5 @@ type: "select"; | ||
| }>; | ||
| /** @deprecated Use `when` instead */ | ||
| condition?: (inputs: Record<string, string>) => boolean; | ||
| when?: Rule; | ||
| }>; | ||
@@ -56,3 +65,5 @@ authorize(inputs?: Record<string, string>): Promise<AuthOuathResult>; | ||
| validate?: (value: string) => string | undefined; | ||
| /** @deprecated Use `when` instead */ | ||
| condition?: (inputs: Record<string, string>) => boolean; | ||
| when?: Rule; | ||
| } | { | ||
@@ -67,3 +78,5 @@ type: "select"; | ||
| }>; | ||
| /** @deprecated Use `when` instead */ | ||
| condition?: (inputs: Record<string, string>) => boolean; | ||
| when?: Rule; | ||
| }>; | ||
@@ -70,0 +83,0 @@ authorize?(inputs?: Record<string, string>): Promise<{ |
+2
-2
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/plugin", | ||
| "version": "1.2.27", | ||
| "version": "1.3.0", | ||
| "type": "module", | ||
@@ -25,3 +25,3 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/sdk": "1.2.27", | ||
| "@opencode-ai/sdk": "1.3.0", | ||
| "zod": "4.1.8" | ||
@@ -28,0 +28,0 @@ }, |
12639
3.04%425
3.16%+ Added
- Removed
Updated