agentmail-toolkit 0.1.27 → 0.1.29

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.
@@ -0,0 +1,33 @@
1
+ import { AgentMailClient } from 'agentmail';
2
+ import { AnyZodObject } from 'zod';
3
+
4
+ declare class Wrapper {
5
+ private readonly client;
6
+ constructor(client?: AgentMailClient);
7
+ call(method: string, args: any): Promise<any>;
8
+ safeCall(method: string, args: any): Promise<{
9
+ isError: boolean;
10
+ result: any;
11
+ }>;
12
+ }
13
+
14
+ interface Tool {
15
+ name: string;
16
+ method: string;
17
+ description: string;
18
+ schema: AnyZodObject;
19
+ }
20
+
21
+ declare abstract class BaseToolkit<T> extends Wrapper {
22
+ protected readonly tools: Record<string, T>;
23
+ constructor(client?: AgentMailClient);
24
+ protected abstract buildTool(tool: Tool): T;
25
+ }
26
+ declare abstract class ListToolkit<T> extends BaseToolkit<T> {
27
+ getTools(names?: string[]): T[];
28
+ }
29
+ declare abstract class MapToolkit<T> extends BaseToolkit<T> {
30
+ getTools(names?: string[]): Record<string, T>;
31
+ }
32
+
33
+ export { ListToolkit as L, MapToolkit as M, type Tool as T };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmail-toolkit",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "description": "AgentMail Toolkit",
5
5
  "scripts": {
6
6
  "build": "tsup",