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
5148
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
0.0.0-202509010531
to
0.0.0-202509130949
+2
-2
dist/example.js

@@ -1,5 +0,5 @@

export const ExamplePlugin = async ({ client, $ }) => {
export const ExamplePlugin = async ({ client: _client, $: _shell, project: _project, directory: _directory, worktree: _worktree, }) => {
return {
permission: {},
async "chat.params"(input, output) {
async "chat.params"(_input, output) {
output.topP = 1;

@@ -6,0 +6,0 @@ },

@@ -9,4 +9,24 @@ import type { Event, createOpencodeClient, Project, Model, Provider, Permission, UserMessage, Part, Auth, Config } from "@opencode-ai/sdk";

$: BunShell;
Tool: {
define(id: string, init: any | (() => Promise<any>)): any;
};
z: any;
};
export type Plugin = (input: PluginInput) => Promise<Hooks>;
export type HttpParamSpec = {
type: "string" | "number" | "boolean" | "array";
description?: string;
optional?: boolean;
items?: "string" | "number" | "boolean";
};
export type HttpToolRegistration = {
id: string;
description: string;
parameters: {
type: "object";
properties: Record<string, HttpParamSpec>;
};
callbackUrl: string;
headers?: Record<string, string>;
};
export interface Hooks {

@@ -96,2 +116,11 @@ event?: (input: {

}) => Promise<void>;
/**
* Allow plugins to register additional tools with the server.
* Use registerHTTP to add a tool that calls back to your plugin/service.
* Use register to add a native/local tool with direct function execution.
*/
"tool.register"?: (input: {}, output: {
registerHTTP: (tool: HttpToolRegistration) => void | Promise<void>;
register: (tool: any) => void | Promise<void>;
}) => Promise<void>;
}
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/plugin",
"version": "0.0.0-202509010531",
"version": "0.0.0-202509130949",
"type": "module",

@@ -19,3 +19,3 @@ "scripts": {

"dependencies": {
"@opencode-ai/sdk": "0.5.28"
"@opencode-ai/sdk": "0.7.6"
},

@@ -22,0 +22,0 @@ "devDependencies": {