@composio/mastra 0.1.26 → 0.1.28
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.cjs +9 -30
- package/dist/index.d.cts +5 -7
- package/dist/index.d.ts +5 -7
- package/dist/index.js +9 -30
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -31,39 +31,18 @@ var MastraProvider = class extends import_core.BaseAgenticProvider {
|
|
|
31
31
|
super();
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* Transform MCP URL response into
|
|
35
|
-
*
|
|
34
|
+
* Transform MCP URL response into Anthropic-specific format.
|
|
35
|
+
* By default, Anthropic uses the standard format (same as default),
|
|
36
|
+
* but this method is here to show providers can customize if needed.
|
|
36
37
|
*
|
|
37
38
|
* @param data - The MCP URL response data
|
|
38
|
-
* @
|
|
39
|
-
* @param connectedAccountIds - Optional array of connected account IDs
|
|
40
|
-
* @param userIds - Optional array of user IDs
|
|
41
|
-
* @returns Transformed MastraUrlMap
|
|
39
|
+
* @returns Standard MCP server response format
|
|
42
40
|
*/
|
|
43
|
-
wrapMcpServerResponse(data
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
url
|
|
49
|
-
};
|
|
50
|
-
return prev;
|
|
51
|
-
},
|
|
52
|
-
{}
|
|
53
|
-
);
|
|
54
|
-
} else if (userIds?.length && data.user_ids_url) {
|
|
55
|
-
return data.user_ids_url.reduce((prev, url, index) => {
|
|
56
|
-
prev[`${serverName}-${index}`] = {
|
|
57
|
-
url
|
|
58
|
-
};
|
|
59
|
-
return prev;
|
|
60
|
-
}, {});
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
[serverName]: {
|
|
64
|
-
url: data.mcp_url
|
|
65
|
-
}
|
|
66
|
-
};
|
|
41
|
+
wrapMcpServerResponse(data) {
|
|
42
|
+
return data.reduce((acc, item) => {
|
|
43
|
+
acc[item.name] = { url: item.url };
|
|
44
|
+
return acc;
|
|
45
|
+
}, {});
|
|
67
46
|
}
|
|
68
47
|
wrapTool(tool, executeTool) {
|
|
69
48
|
const mastraTool = (0, import_core2.createTool)({
|
package/dist/index.d.cts
CHANGED
|
@@ -23,16 +23,14 @@ declare class MastraProvider extends BaseAgenticProvider<MastraToolCollection, M
|
|
|
23
23
|
readonly name = "mastra";
|
|
24
24
|
constructor();
|
|
25
25
|
/**
|
|
26
|
-
* Transform MCP URL response into
|
|
27
|
-
*
|
|
26
|
+
* Transform MCP URL response into Anthropic-specific format.
|
|
27
|
+
* By default, Anthropic uses the standard format (same as default),
|
|
28
|
+
* but this method is here to show providers can customize if needed.
|
|
28
29
|
*
|
|
29
30
|
* @param data - The MCP URL response data
|
|
30
|
-
* @
|
|
31
|
-
* @param connectedAccountIds - Optional array of connected account IDs
|
|
32
|
-
* @param userIds - Optional array of user IDs
|
|
33
|
-
* @returns Transformed MastraUrlMap
|
|
31
|
+
* @returns Standard MCP server response format
|
|
34
32
|
*/
|
|
35
|
-
wrapMcpServerResponse(data: McpUrlResponse
|
|
33
|
+
wrapMcpServerResponse(data: McpUrlResponse): MastraUrlMap;
|
|
36
34
|
wrapTool(tool: Tool, executeTool: ExecuteToolFn): MastraTool;
|
|
37
35
|
wrapTools(tools: Tool[], executeTool: ExecuteToolFn): MastraToolCollection;
|
|
38
36
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,16 +23,14 @@ declare class MastraProvider extends BaseAgenticProvider<MastraToolCollection, M
|
|
|
23
23
|
readonly name = "mastra";
|
|
24
24
|
constructor();
|
|
25
25
|
/**
|
|
26
|
-
* Transform MCP URL response into
|
|
27
|
-
*
|
|
26
|
+
* Transform MCP URL response into Anthropic-specific format.
|
|
27
|
+
* By default, Anthropic uses the standard format (same as default),
|
|
28
|
+
* but this method is here to show providers can customize if needed.
|
|
28
29
|
*
|
|
29
30
|
* @param data - The MCP URL response data
|
|
30
|
-
* @
|
|
31
|
-
* @param connectedAccountIds - Optional array of connected account IDs
|
|
32
|
-
* @param userIds - Optional array of user IDs
|
|
33
|
-
* @returns Transformed MastraUrlMap
|
|
31
|
+
* @returns Standard MCP server response format
|
|
34
32
|
*/
|
|
35
|
-
wrapMcpServerResponse(data: McpUrlResponse
|
|
33
|
+
wrapMcpServerResponse(data: McpUrlResponse): MastraUrlMap;
|
|
36
34
|
wrapTool(tool: Tool, executeTool: ExecuteToolFn): MastraTool;
|
|
37
35
|
wrapTools(tools: Tool[], executeTool: ExecuteToolFn): MastraToolCollection;
|
|
38
36
|
}
|
package/dist/index.js
CHANGED
|
@@ -10,39 +10,18 @@ var MastraProvider = class extends BaseAgenticProvider {
|
|
|
10
10
|
super();
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Transform MCP URL response into
|
|
14
|
-
*
|
|
13
|
+
* Transform MCP URL response into Anthropic-specific format.
|
|
14
|
+
* By default, Anthropic uses the standard format (same as default),
|
|
15
|
+
* but this method is here to show providers can customize if needed.
|
|
15
16
|
*
|
|
16
17
|
* @param data - The MCP URL response data
|
|
17
|
-
* @
|
|
18
|
-
* @param connectedAccountIds - Optional array of connected account IDs
|
|
19
|
-
* @param userIds - Optional array of user IDs
|
|
20
|
-
* @returns Transformed MastraUrlMap
|
|
18
|
+
* @returns Standard MCP server response format
|
|
21
19
|
*/
|
|
22
|
-
wrapMcpServerResponse(data
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
url
|
|
28
|
-
};
|
|
29
|
-
return prev;
|
|
30
|
-
},
|
|
31
|
-
{}
|
|
32
|
-
);
|
|
33
|
-
} else if (userIds?.length && data.user_ids_url) {
|
|
34
|
-
return data.user_ids_url.reduce((prev, url, index) => {
|
|
35
|
-
prev[`${serverName}-${index}`] = {
|
|
36
|
-
url
|
|
37
|
-
};
|
|
38
|
-
return prev;
|
|
39
|
-
}, {});
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
[serverName]: {
|
|
43
|
-
url: data.mcp_url
|
|
44
|
-
}
|
|
45
|
-
};
|
|
20
|
+
wrapMcpServerResponse(data) {
|
|
21
|
+
return data.reduce((acc, item) => {
|
|
22
|
+
acc[item.name] = { url: item.url };
|
|
23
|
+
return acc;
|
|
24
|
+
}, {});
|
|
46
25
|
}
|
|
47
26
|
wrapTool(tool, executeTool) {
|
|
48
27
|
const mastraTool = createTool({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@composio/mastra",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"description": "Agentic Provider for mastra in Composio SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"author": "",
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@composio/core": "0.1.
|
|
29
|
+
"@composio/core": "0.1.28",
|
|
30
30
|
"@mastra/core": "^0.10.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"tsup": "^8.4.0",
|
|
34
34
|
"typescript": "^5.8.3",
|
|
35
35
|
"vitest": "^3.1.4",
|
|
36
|
-
"@composio/core": "0.1.
|
|
36
|
+
"@composio/core": "0.1.28"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsup",
|