agentmail-toolkit 0.2.5 → 0.2.7

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/mcp.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ListToolkit,
3
3
  safeFunc
4
- } from "./chunk-44OTSXCQ.js";
4
+ } from "./chunk-H4XLJ3VA.js";
5
5
 
6
6
  // src/mcp.ts
7
7
  var AgentMailToolkit = class extends ListToolkit {
@@ -16,7 +16,6 @@ var AgentMailToolkit = class extends ListToolkit {
16
16
  const { isError, result } = await safeFunc(tool.func, this.client, args);
17
17
  return {
18
18
  content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
19
- structuredContent: result,
20
19
  isError
21
20
  };
22
21
  },
package/dist/mcp.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/mcp.ts"],"sourcesContent":["import { z } from 'zod'\nimport { type ToolCallback } from '@modelcontextprotocol/sdk/server/mcp.js'\nimport { type ToolAnnotations } from '@modelcontextprotocol/sdk/types.js'\n\nimport { ListToolkit } from './toolkit.js'\nimport { type Tool } from './tools.js'\nimport { safeFunc } from './util.js'\n\ninterface McpTool {\n name: string\n title: string\n description: string\n inputSchema: z.ZodRawShape\n callback: ToolCallback<z.ZodRawShape>\n annotations?: ToolAnnotations\n}\n\nexport class AgentMailToolkit extends ListToolkit<McpTool> {\n protected buildTool(tool: Tool): McpTool {\n const title = tool.name\n .split('_')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ')\n\n return {\n name: tool.name,\n title,\n description: tool.description,\n inputSchema: tool.paramsSchema.shape,\n callback: async (args) => {\n const { isError, result } = await safeFunc(tool.func, this.client, args)\n return {\n content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],\n structuredContent: result,\n isError,\n }\n },\n annotations: { title, ...tool.annotations },\n }\n }\n}\n"],"mappings":";;;;;;AAiBO,IAAM,mBAAN,cAA+B,YAAqB;AAAA,EAC7C,UAAU,MAAqB;AACrC,UAAM,QAAQ,KAAK,KACd,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,CAAC,EAC1D,KAAK,GAAG;AAEb,WAAO;AAAA,MACH,MAAM,KAAK;AAAA,MACX;AAAA,MACA,aAAa,KAAK;AAAA,MAClB,aAAa,KAAK,aAAa;AAAA,MAC/B,UAAU,OAAO,SAAS;AACtB,cAAM,EAAE,SAAS,OAAO,IAAI,MAAM,SAAS,KAAK,MAAM,KAAK,QAAQ,IAAI;AACvE,eAAO;AAAA,UACH,SAAS,CAAC,EAAE,MAAM,QAAiB,MAAM,KAAK,UAAU,QAAQ,MAAM,CAAC,EAAE,CAAC;AAAA,UAC1E,mBAAmB;AAAA,UACnB;AAAA,QACJ;AAAA,MACJ;AAAA,MACA,aAAa,EAAE,OAAO,GAAG,KAAK,YAAY;AAAA,IAC9C;AAAA,EACJ;AACJ;","names":[]}
1
+ {"version":3,"sources":["../src/mcp.ts"],"sourcesContent":["import { z } from 'zod'\nimport { type ToolCallback } from '@modelcontextprotocol/sdk/server/mcp.js'\nimport { type ToolAnnotations } from '@modelcontextprotocol/sdk/types.js'\n\nimport { ListToolkit } from './toolkit.js'\nimport { type Tool } from './tools.js'\nimport { safeFunc } from './util.js'\n\ninterface McpTool {\n name: string\n title: string\n description: string\n inputSchema: z.ZodRawShape\n callback: ToolCallback<z.ZodRawShape>\n annotations?: ToolAnnotations\n}\n\nexport class AgentMailToolkit extends ListToolkit<McpTool> {\n protected buildTool(tool: Tool): McpTool {\n const title = tool.name\n .split('_')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ')\n\n return {\n name: tool.name,\n title,\n description: tool.description,\n inputSchema: tool.paramsSchema.shape,\n callback: async (args) => {\n const { isError, result } = await safeFunc(tool.func, this.client, args)\n return {\n content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],\n isError,\n }\n },\n annotations: { title, ...tool.annotations },\n }\n }\n}\n"],"mappings":";;;;;;AAiBO,IAAM,mBAAN,cAA+B,YAAqB;AAAA,EAC7C,UAAU,MAAqB;AACrC,UAAM,QAAQ,KAAK,KACd,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,CAAC,EAC1D,KAAK,GAAG;AAEb,WAAO;AAAA,MACH,MAAM,KAAK;AAAA,MACX;AAAA,MACA,aAAa,KAAK;AAAA,MAClB,aAAa,KAAK,aAAa;AAAA,MAC/B,UAAU,OAAO,SAAS;AACtB,cAAM,EAAE,SAAS,OAAO,IAAI,MAAM,SAAS,KAAK,MAAM,KAAK,QAAQ,IAAI;AACvE,eAAO;AAAA,UACH,SAAS,CAAC,EAAE,MAAM,QAAiB,MAAM,KAAK,UAAU,QAAQ,MAAM,CAAC,EAAE,CAAC;AAAA,UAC1E;AAAA,QACJ;AAAA,MACJ;AAAA,MACA,aAAa,EAAE,OAAO,GAAG,KAAK,YAAY;AAAA,IAC9C;AAAA,EACJ;AACJ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmail-toolkit",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "AgentMail Toolkit",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -55,7 +55,7 @@
55
55
  }
56
56
  },
57
57
  "dependencies": {
58
- "agentmail": "^0.2.5",
58
+ "agentmail": "^0.4.10",
59
59
  "jszip": "^3.10.1",
60
60
  "unpdf": "^1.4.0",
61
61
  "zod": "^4.1.13"