You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@opencode-ai/plugin

Package Overview
Dependencies
Maintainers
2
Versions
5085
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/plugin - npm Package Compare versions

Comparing version
1.2.27
to
1.3.0
+13
-0
dist/index.d.ts

@@ -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 @@ },