@nikcli-ai/plugin 1.36.0 → 1.37.0

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.
package/dist/index.d.ts CHANGED
@@ -133,6 +133,7 @@ export type AuthOuathResult = {
133
133
  }>;
134
134
  });
135
135
  export interface Hooks {
136
+ dispose?: () => Promise<void> | void;
136
137
  event?: (input: {
137
138
  event: Event;
138
139
  }) => Promise<void>;
package/dist/tool.d.ts CHANGED
@@ -20,14 +20,26 @@ type AskInput = {
20
20
  [key: string]: any;
21
21
  };
22
22
  };
23
+ export type ToolAttachment = {
24
+ type: "file";
25
+ mime: string;
26
+ url: string;
27
+ filename?: string;
28
+ };
29
+ export type ToolResult = string | {
30
+ title?: string;
31
+ output: string;
32
+ metadata?: Record<string, any>;
33
+ attachments?: ToolAttachment[];
34
+ };
23
35
  export declare function tool<Args extends z.ZodRawShape>(input: {
24
36
  description: string;
25
37
  args: Args;
26
- execute(args: z.infer<z.ZodObject<Args>>, context: ToolContext): Promise<string>;
38
+ execute(args: z.infer<z.ZodObject<Args>>, context: ToolContext): Promise<ToolResult>;
27
39
  }): {
28
40
  description: string;
29
41
  args: Args;
30
- execute(args: z.infer<z.ZodObject<Args>>, context: ToolContext): Promise<string>;
42
+ execute(args: z.infer<z.ZodObject<Args>>, context: ToolContext): Promise<ToolResult>;
31
43
  };
32
44
  export declare namespace tool {
33
45
  var schema: typeof z;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@nikcli-ai/plugin",
4
- "version": "1.36.0",
4
+ "version": "1.37.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -35,7 +35,7 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@nikcli-ai/sdk": "1.36.0",
38
+ "@nikcli-ai/sdk": "1.37.0",
39
39
  "@opentui/core": "0.1.91",
40
40
  "@opentui/solid": "0.1.91",
41
41
  "zod": "4.1.8"