@composio/google 0.1.27 → 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 CHANGED
@@ -51,34 +51,18 @@ var GoogleProvider = class extends import_core.BaseNonAgenticProvider {
51
51
  super();
52
52
  }
53
53
  /**
54
- * Transform MCP URL response into Google-specific format.
55
- * Google uses the standard format by default.
54
+ * Transform MCP URL response into Anthropic-specific format.
55
+ * By default, Anthropic uses the standard format (same as default),
56
+ * but this method is here to show providers can customize if needed.
56
57
  *
57
58
  * @param data - The MCP URL response data
58
- * @param serverName - Name of the MCP server
59
- * @param connectedAccountIds - Optional array of connected account IDs
60
- * @param userIds - Optional array of user IDs
61
- * @param toolkits - Optional array of toolkit names
62
59
  * @returns Standard MCP server response format
63
60
  */
64
- wrapMcpServerResponse(data, serverName, connectedAccountIds, userIds, toolkits) {
65
- if (connectedAccountIds?.length && data.connected_account_urls) {
66
- return data.connected_account_urls.map((url, index) => ({
67
- url: new URL(url),
68
- name: `${serverName}-${connectedAccountIds[index]}`,
69
- toolkit: toolkits?.[index]
70
- }));
71
- } else if (userIds?.length && data.user_ids_url) {
72
- return data.user_ids_url.map((url, index) => ({
73
- url: new URL(url),
74
- name: `${serverName}-${userIds[index]}`,
75
- toolkit: toolkits?.[index]
76
- }));
77
- }
78
- return {
79
- url: new URL(data.mcp_url),
80
- name: serverName
81
- };
61
+ wrapMcpServerResponse(data) {
62
+ return data.map((item) => ({
63
+ url: new URL(item.url),
64
+ name: item.name
65
+ }));
82
66
  }
83
67
  /**
84
68
  * Wraps a Composio tool in the Google GenAI function declaration format.
package/dist/index.d.cts CHANGED
@@ -57,17 +57,14 @@ declare class GoogleProvider extends BaseNonAgenticProvider<GoogleGenAIToolColle
57
57
  */
58
58
  constructor();
59
59
  /**
60
- * Transform MCP URL response into Google-specific format.
61
- * Google uses the standard format by default.
60
+ * Transform MCP URL response into Anthropic-specific format.
61
+ * By default, Anthropic uses the standard format (same as default),
62
+ * but this method is here to show providers can customize if needed.
62
63
  *
63
64
  * @param data - The MCP URL response data
64
- * @param serverName - Name of the MCP server
65
- * @param connectedAccountIds - Optional array of connected account IDs
66
- * @param userIds - Optional array of user IDs
67
- * @param toolkits - Optional array of toolkit names
68
65
  * @returns Standard MCP server response format
69
66
  */
70
- wrapMcpServerResponse(data: McpUrlResponse, serverName: string, connectedAccountIds?: string[], userIds?: string[], toolkits?: string[]): McpServerGetResponse;
67
+ wrapMcpServerResponse(data: McpUrlResponse): McpServerGetResponse;
71
68
  /**
72
69
  * Wraps a Composio tool in the Google GenAI function declaration format.
73
70
  *
package/dist/index.d.ts CHANGED
@@ -57,17 +57,14 @@ declare class GoogleProvider extends BaseNonAgenticProvider<GoogleGenAIToolColle
57
57
  */
58
58
  constructor();
59
59
  /**
60
- * Transform MCP URL response into Google-specific format.
61
- * Google uses the standard format by default.
60
+ * Transform MCP URL response into Anthropic-specific format.
61
+ * By default, Anthropic uses the standard format (same as default),
62
+ * but this method is here to show providers can customize if needed.
62
63
  *
63
64
  * @param data - The MCP URL response data
64
- * @param serverName - Name of the MCP server
65
- * @param connectedAccountIds - Optional array of connected account IDs
66
- * @param userIds - Optional array of user IDs
67
- * @param toolkits - Optional array of toolkit names
68
65
  * @returns Standard MCP server response format
69
66
  */
70
- wrapMcpServerResponse(data: McpUrlResponse, serverName: string, connectedAccountIds?: string[], userIds?: string[], toolkits?: string[]): McpServerGetResponse;
67
+ wrapMcpServerResponse(data: McpUrlResponse): McpServerGetResponse;
71
68
  /**
72
69
  * Wraps a Composio tool in the Google GenAI function declaration format.
73
70
  *
package/dist/index.js CHANGED
@@ -29,34 +29,18 @@ var GoogleProvider = class extends BaseNonAgenticProvider {
29
29
  super();
30
30
  }
31
31
  /**
32
- * Transform MCP URL response into Google-specific format.
33
- * Google uses the standard format by default.
32
+ * Transform MCP URL response into Anthropic-specific format.
33
+ * By default, Anthropic uses the standard format (same as default),
34
+ * but this method is here to show providers can customize if needed.
34
35
  *
35
36
  * @param data - The MCP URL response data
36
- * @param serverName - Name of the MCP server
37
- * @param connectedAccountIds - Optional array of connected account IDs
38
- * @param userIds - Optional array of user IDs
39
- * @param toolkits - Optional array of toolkit names
40
37
  * @returns Standard MCP server response format
41
38
  */
42
- wrapMcpServerResponse(data, serverName, connectedAccountIds, userIds, toolkits) {
43
- if (connectedAccountIds?.length && data.connected_account_urls) {
44
- return data.connected_account_urls.map((url, index) => ({
45
- url: new URL(url),
46
- name: `${serverName}-${connectedAccountIds[index]}`,
47
- toolkit: toolkits?.[index]
48
- }));
49
- } else if (userIds?.length && data.user_ids_url) {
50
- return data.user_ids_url.map((url, index) => ({
51
- url: new URL(url),
52
- name: `${serverName}-${userIds[index]}`,
53
- toolkit: toolkits?.[index]
54
- }));
55
- }
56
- return {
57
- url: new URL(data.mcp_url),
58
- name: serverName
59
- };
39
+ wrapMcpServerResponse(data) {
40
+ return data.map((item) => ({
41
+ url: new URL(item.url),
42
+ name: item.name
43
+ }));
60
44
  }
61
45
  /**
62
46
  * Wraps a Composio tool in the Google GenAI function declaration format.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composio/google",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "Google GenAI Provider for Composio SDK",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -28,13 +28,13 @@
28
28
  "author": "",
29
29
  "license": "ISC",
30
30
  "peerDependencies": {
31
- "@composio/core": "0.1.27",
31
+ "@composio/core": "0.1.28",
32
32
  "@google/genai": "^1.1.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "tsup": "^8.4.0",
36
36
  "typescript": "^5.8.3",
37
- "@composio/core": "0.1.27"
37
+ "@composio/core": "0.1.28"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "tsup",