@opencode-ai/plugin 0.0.0-next-15267 → 0.0.0-next-15269

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,8 @@ export type SchemaType<A> = Tool.SchemaType<A>;
9
9
  export type Content = Tool.Content;
10
10
  export type DynamicOutput = Tool.DynamicOutput;
11
11
  export type Definition<Input extends SchemaType<any>, Output extends SchemaType<any>, Structured extends SchemaType<any> = Output> = {
12
+ readonly name: string;
13
+ readonly options?: RegisterOptions;
12
14
  readonly description: string;
13
15
  readonly input: Input;
14
16
  readonly output: Output;
@@ -24,6 +26,8 @@ export type Definition<Input extends SchemaType<any>, Output extends SchemaType<
24
26
  }) => ReadonlyArray<Content>;
25
27
  };
26
28
  export type DynamicDefinition = {
29
+ readonly name: string;
30
+ readonly options?: RegisterOptions;
27
31
  readonly description: string;
28
32
  readonly jsonSchema: JsonSchema.JsonSchema;
29
33
  readonly outputSchema?: JsonSchema.JsonSchema;
@@ -54,8 +58,8 @@ export interface RegisterOptions {
54
58
  readonly deferred?: boolean;
55
59
  }
56
60
  export interface ToolDraft {
57
- add<Input extends SchemaType<any>, Output extends SchemaType<any>, Structured extends SchemaType<any> = Output>(name: string, tool: Definition<Input, Output, Structured>, options?: RegisterOptions): void;
58
- add(name: string, tool: DynamicDefinition, options?: RegisterOptions): void;
61
+ add<Input extends SchemaType<any>, Output extends SchemaType<any>, Structured extends SchemaType<any> = Output>(tool: Definition<Input, Output, Structured>): void;
62
+ add(tool: DynamicDefinition): void;
59
63
  }
60
64
  export interface ToolHooks {
61
65
  readonly "execute.before": ToolExecuteBeforeEvent;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/plugin",
4
- "version": "0.0.0-next-15267",
4
+ "version": "0.0.0-next-15269",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -44,9 +44,9 @@
44
44
  ],
45
45
  "dependencies": {
46
46
  "@ai-sdk/provider": "3.0.8",
47
- "@opencode-ai/client": "0.0.0-next-15267",
48
- "@opencode-ai/schema": "0.0.0-next-15267",
49
- "@opencode-ai/sdk": "0.0.0-next-15267",
47
+ "@opencode-ai/client": "0.0.0-next-15269",
48
+ "@opencode-ai/schema": "0.0.0-next-15269",
49
+ "@opencode-ai/sdk": "0.0.0-next-15269",
50
50
  "effect": "4.0.0-beta.83",
51
51
  "zod": "4.1.8"
52
52
  },