agentmail-toolkit 0.1.0 → 0.1.1

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,8 @@
1
+ import { type Tool as AiSdkTool } from 'ai';
2
+ import { AgentMailClient } from 'agentmail';
3
+ import { Toolkit } from './toolkit';
4
+ import { type Tool } from './tools';
5
+ export declare class AgentMailToolkit extends Toolkit<AiSdkTool> {
6
+ constructor(client?: AgentMailClient);
7
+ protected buildTool(tool: Tool): AiSdkTool;
8
+ }
@@ -0,0 +1 @@
1
+ export * from './ai-sdk';
@@ -0,0 +1,139 @@
1
+ import { z } from 'zod';
2
+ export declare const ListItemsParams: z.ZodObject<{
3
+ limit: z.ZodOptional<z.ZodNumber>;
4
+ last_key: z.ZodOptional<z.ZodString>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ limit?: number | undefined;
7
+ last_key?: string | undefined;
8
+ }, {
9
+ limit?: number | undefined;
10
+ last_key?: string | undefined;
11
+ }>;
12
+ export declare const GetInboxParams: z.ZodObject<{
13
+ inbox_id: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ inbox_id: string;
16
+ }, {
17
+ inbox_id: string;
18
+ }>;
19
+ export declare const CreateInboxParams: z.ZodObject<{
20
+ username: z.ZodOptional<z.ZodString>;
21
+ domain: z.ZodOptional<z.ZodString>;
22
+ display_name: z.ZodOptional<z.ZodString>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ username?: string | undefined;
25
+ domain?: string | undefined;
26
+ display_name?: string | undefined;
27
+ }, {
28
+ username?: string | undefined;
29
+ domain?: string | undefined;
30
+ display_name?: string | undefined;
31
+ }>;
32
+ export declare const ListThreadsParams: z.ZodObject<z.objectUtil.extendShape<{
33
+ limit: z.ZodOptional<z.ZodNumber>;
34
+ last_key: z.ZodOptional<z.ZodString>;
35
+ }, {
36
+ inbox_id: z.ZodString;
37
+ received: z.ZodOptional<z.ZodBoolean>;
38
+ sent: z.ZodOptional<z.ZodBoolean>;
39
+ }>, "strip", z.ZodTypeAny, {
40
+ inbox_id: string;
41
+ limit?: number | undefined;
42
+ last_key?: string | undefined;
43
+ received?: boolean | undefined;
44
+ sent?: boolean | undefined;
45
+ }, {
46
+ inbox_id: string;
47
+ limit?: number | undefined;
48
+ last_key?: string | undefined;
49
+ received?: boolean | undefined;
50
+ sent?: boolean | undefined;
51
+ }>;
52
+ export declare const GetThreadParams: z.ZodObject<{
53
+ inbox_id: z.ZodString;
54
+ thread_id: z.ZodString;
55
+ }, "strip", z.ZodTypeAny, {
56
+ inbox_id: string;
57
+ thread_id: string;
58
+ }, {
59
+ inbox_id: string;
60
+ thread_id: string;
61
+ }>;
62
+ export declare const ListMessagesParams: z.ZodObject<z.objectUtil.extendShape<{
63
+ limit: z.ZodOptional<z.ZodNumber>;
64
+ last_key: z.ZodOptional<z.ZodString>;
65
+ }, {
66
+ inbox_id: z.ZodString;
67
+ }>, "strip", z.ZodTypeAny, {
68
+ inbox_id: string;
69
+ limit?: number | undefined;
70
+ last_key?: string | undefined;
71
+ }, {
72
+ inbox_id: string;
73
+ limit?: number | undefined;
74
+ last_key?: string | undefined;
75
+ }>;
76
+ export declare const GetMessageParams: z.ZodObject<{
77
+ inbox_id: z.ZodString;
78
+ message_id: z.ZodString;
79
+ }, "strip", z.ZodTypeAny, {
80
+ inbox_id: string;
81
+ message_id: string;
82
+ }, {
83
+ inbox_id: string;
84
+ message_id: string;
85
+ }>;
86
+ export declare const GetAttachmentParams: z.ZodObject<{
87
+ inbox_id: z.ZodString;
88
+ message_id: z.ZodString;
89
+ attachment_id: z.ZodString;
90
+ }, "strip", z.ZodTypeAny, {
91
+ inbox_id: string;
92
+ message_id: string;
93
+ attachment_id: string;
94
+ }, {
95
+ inbox_id: string;
96
+ message_id: string;
97
+ attachment_id: string;
98
+ }>;
99
+ export declare const SendMessageParams: z.ZodObject<{
100
+ inbox_id: z.ZodString;
101
+ to: z.ZodArray<z.ZodString, "many">;
102
+ cc: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
103
+ bcc: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
104
+ subject: z.ZodOptional<z.ZodString>;
105
+ text: z.ZodOptional<z.ZodString>;
106
+ html: z.ZodOptional<z.ZodString>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ inbox_id: string;
109
+ to: string[];
110
+ cc?: string[] | undefined;
111
+ bcc?: string[] | undefined;
112
+ subject?: string | undefined;
113
+ text?: string | undefined;
114
+ html?: string | undefined;
115
+ }, {
116
+ inbox_id: string;
117
+ to: string[];
118
+ cc?: string[] | undefined;
119
+ bcc?: string[] | undefined;
120
+ subject?: string | undefined;
121
+ text?: string | undefined;
122
+ html?: string | undefined;
123
+ }>;
124
+ export declare const ReplyToMessageParams: z.ZodObject<{
125
+ inbox_id: z.ZodString;
126
+ message_id: z.ZodString;
127
+ text: z.ZodOptional<z.ZodString>;
128
+ html: z.ZodOptional<z.ZodString>;
129
+ }, "strip", z.ZodTypeAny, {
130
+ inbox_id: string;
131
+ message_id: string;
132
+ text?: string | undefined;
133
+ html?: string | undefined;
134
+ }, {
135
+ inbox_id: string;
136
+ message_id: string;
137
+ text?: string | undefined;
138
+ html?: string | undefined;
139
+ }>;
@@ -0,0 +1,10 @@
1
+ import { AgentMailClient } from 'agentmail';
2
+ import { type Tool } from './tools';
3
+ export declare abstract class Toolkit<T> {
4
+ private readonly client?;
5
+ private readonly tools;
6
+ constructor(client?: AgentMailClient | undefined);
7
+ protected abstract buildTool(tool: Tool): T;
8
+ getTools(): Record<string, T>;
9
+ callMethod(methodName: string, args: unknown): Promise<any>;
10
+ }
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export type Tool = {
3
+ name: string;
4
+ methodName: string;
5
+ description: string;
6
+ paramsSchema: z.ZodObject<any>;
7
+ };
8
+ export declare const tools: Tool[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmail-toolkit",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "AgentMail Toolkit",
5
5
  "main": "dist/src/index.js",
6
6
  "files": [
@@ -17,7 +17,7 @@
17
17
  "license": "ISC",
18
18
  "repository": {
19
19
  "type": "git",
20
- "url": "https://github.com/agentmail-to/agentmail-toolkit"
20
+ "url": "git+https://github.com/agentmail-to/agentmail-toolkit.git"
21
21
  },
22
22
  "keywords": [
23
23
  "Agents",