🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@opencode-ai/plugin

Package Overview
Dependencies
Maintainers
2
Versions
9394
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-next-15259
to
0.0.0-next-15268
+0
-1
dist/v2/promise/index.d.ts
export type { PluginOptions } from "../options.js";
export * as Plugin from "./plugin.js";
export { Tool } from "./tool.js";
export { Agent } from "@opencode-ai/schema/agent";

@@ -5,0 +4,0 @@ export { Command } from "@opencode-ai/schema/command";

export * as Plugin from "./plugin.js";
export { Tool } from "./tool.js";
export { Agent } from "@opencode-ai/schema/agent";

@@ -4,0 +3,0 @@ export { Command } from "@opencode-ai/schema/command";

+11
-15

@@ -1,19 +0,14 @@

export * as Tool from "./tool.js";
import { Tool } from "../effect/tool.js";
import type { Tool } from "../effect/tool.js";
import type { Agent } from "@opencode-ai/schema/agent";
import type { Session } from "@opencode-ai/schema/session";
import type { SessionMessage } from "@opencode-ai/schema/session-message";
import { type JsonSchema, type Schema } from "effect";
import type { JsonSchema, Schema } from "effect";
import type { Hooks, Transform } from "./registration.js";
export type Context = Tool.Context;
export type SchemaType<A> = Tool.SchemaType<A>;
export type Definition<Input extends SchemaType<any>, Output extends SchemaType<any>> = Tool.Definition<Input, Output>;
export type AnyTool = Tool.AnyTool;
export declare const Failure: typeof Tool.Failure;
export type Failure = Tool.Failure;
export declare const RegistrationError: typeof Tool.RegistrationError;
export type RegistrationError = Tool.RegistrationError;
export type Content = Tool.Content;
export type DynamicOutput = Tool.DynamicOutput;
type Config<Input extends SchemaType<any>, Output extends SchemaType<any>, Structured extends SchemaType<any> = Output> = {
export type Definition<Input extends SchemaType<any>, Output extends SchemaType<any>, Structured extends SchemaType<any> = Output> = {
readonly name: string;
readonly options?: RegisterOptions;
readonly description: string;

@@ -33,3 +28,5 @@ readonly input: Input;

};
type DynamicConfig = {
export type DynamicDefinition = {
readonly name: string;
readonly options?: RegisterOptions;
readonly description: string;

@@ -40,5 +37,3 @@ readonly jsonSchema: JsonSchema.JsonSchema;

};
export declare function make<Input extends SchemaType<any>, Output extends SchemaType<any>, Structured extends SchemaType<any> = Output>(config: Config<Input, Output, Structured>): Definition<Input, Structured>;
export declare function make(config: DynamicConfig): AnyTool;
export declare const withPermission: <Input extends Tool.SchemaType<any>, Output extends Tool.SchemaType<any>>(tool: Tool.Definition<Input, Output>, permission: string) => Tool.Definition<Input, Output>;
export type AnyTool = Definition<any, any, any> | DynamicDefinition;
export interface ToolExecuteBeforeEvent {

@@ -68,3 +63,4 @@ readonly tool: string;

export interface ToolDraft {
add(name: string, tool: AnyTool, options?: RegisterOptions): void;
add<Input extends SchemaType<any>, Output extends SchemaType<any>, Structured extends SchemaType<any> = Output>(tool: Definition<Input, Output, Structured>): void;
add(tool: DynamicDefinition): void;
}

@@ -71,0 +67,0 @@ export interface ToolHooks {

{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/plugin",
"version": "0.0.0-next-15259",
"version": "0.0.0-next-15268",
"type": "module",

@@ -47,5 +47,5 @@ "license": "MIT",

"@ai-sdk/provider": "3.0.8",
"@opencode-ai/client": "0.0.0-next-15259",
"@opencode-ai/schema": "0.0.0-next-15259",
"@opencode-ai/sdk": "0.0.0-next-15259",
"@opencode-ai/client": "0.0.0-next-15268",
"@opencode-ai/schema": "0.0.0-next-15268",
"@opencode-ai/sdk": "0.0.0-next-15268",
"effect": "4.0.0-beta.83",

@@ -52,0 +52,0 @@ "zod": "4.1.8"