@composio/vercel 0.1.23 → 0.1.25
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 +30 -0
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +33 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -179,6 +179,36 @@ var VercelProvider = class extends import_core.BaseAgenticProvider {
|
|
|
179
179
|
return acc;
|
|
180
180
|
}, {});
|
|
181
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Transform MCP URL response into Vercel-specific format.
|
|
184
|
+
* Vercel uses the standard format by default.
|
|
185
|
+
*
|
|
186
|
+
* @param data - The MCP URL response data
|
|
187
|
+
* @param serverName - Name of the MCP server
|
|
188
|
+
* @param connectedAccountIds - Optional array of connected account IDs
|
|
189
|
+
* @param userIds - Optional array of user IDs
|
|
190
|
+
* @param toolkits - Optional array of toolkit names
|
|
191
|
+
* @returns Standard MCP server response format
|
|
192
|
+
*/
|
|
193
|
+
wrapMcpServerResponse(data, serverName, connectedAccountIds, userIds, toolkits) {
|
|
194
|
+
if (connectedAccountIds?.length && data.connected_account_urls) {
|
|
195
|
+
return data.connected_account_urls.map((url, index) => ({
|
|
196
|
+
url: new URL(url),
|
|
197
|
+
name: `${serverName}-${connectedAccountIds[index]}`,
|
|
198
|
+
toolkit: toolkits?.[index]
|
|
199
|
+
}));
|
|
200
|
+
} else if (userIds?.length && data.user_ids_url) {
|
|
201
|
+
return data.user_ids_url.map((url, index) => ({
|
|
202
|
+
url: new URL(url),
|
|
203
|
+
name: `${serverName}-${userIds[index]}`,
|
|
204
|
+
toolkit: toolkits?.[index]
|
|
205
|
+
}));
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
url: new URL(data.mcp_url),
|
|
209
|
+
name: serverName
|
|
210
|
+
};
|
|
211
|
+
}
|
|
182
212
|
};
|
|
183
213
|
// Annotate the CommonJS export names for ESM import in node:
|
|
184
214
|
0 && (module.exports = {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseAgenticProvider, Tool as Tool$1, ExecuteToolFn } from '@composio/core';
|
|
1
|
+
import { BaseAgenticProvider, Tool as Tool$1, ExecuteToolFn, McpUrlResponse, McpServerGetResponse } from '@composio/core';
|
|
2
2
|
import { Tool } from 'ai';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -153,6 +153,18 @@ declare class VercelProvider extends BaseAgenticProvider<VercelToolCollection, T
|
|
|
153
153
|
* ```
|
|
154
154
|
*/
|
|
155
155
|
wrapTools(tools: Tool$1[], executeTool: ExecuteToolFn): VercelToolCollection;
|
|
156
|
+
/**
|
|
157
|
+
* Transform MCP URL response into Vercel-specific format.
|
|
158
|
+
* Vercel uses the standard format by default.
|
|
159
|
+
*
|
|
160
|
+
* @param data - The MCP URL response data
|
|
161
|
+
* @param serverName - Name of the MCP server
|
|
162
|
+
* @param connectedAccountIds - Optional array of connected account IDs
|
|
163
|
+
* @param userIds - Optional array of user IDs
|
|
164
|
+
* @param toolkits - Optional array of toolkit names
|
|
165
|
+
* @returns Standard MCP server response format
|
|
166
|
+
*/
|
|
167
|
+
wrapMcpServerResponse(data: McpUrlResponse, serverName: string, connectedAccountIds?: string[], userIds?: string[], toolkits?: string[]): McpServerGetResponse;
|
|
156
168
|
}
|
|
157
169
|
|
|
158
|
-
export { VercelProvider };
|
|
170
|
+
export { VercelProvider, type VercelToolCollection };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseAgenticProvider, Tool as Tool$1, ExecuteToolFn } from '@composio/core';
|
|
1
|
+
import { BaseAgenticProvider, Tool as Tool$1, ExecuteToolFn, McpUrlResponse, McpServerGetResponse } from '@composio/core';
|
|
2
2
|
import { Tool } from 'ai';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -153,6 +153,18 @@ declare class VercelProvider extends BaseAgenticProvider<VercelToolCollection, T
|
|
|
153
153
|
* ```
|
|
154
154
|
*/
|
|
155
155
|
wrapTools(tools: Tool$1[], executeTool: ExecuteToolFn): VercelToolCollection;
|
|
156
|
+
/**
|
|
157
|
+
* Transform MCP URL response into Vercel-specific format.
|
|
158
|
+
* Vercel uses the standard format by default.
|
|
159
|
+
*
|
|
160
|
+
* @param data - The MCP URL response data
|
|
161
|
+
* @param serverName - Name of the MCP server
|
|
162
|
+
* @param connectedAccountIds - Optional array of connected account IDs
|
|
163
|
+
* @param userIds - Optional array of user IDs
|
|
164
|
+
* @param toolkits - Optional array of toolkit names
|
|
165
|
+
* @returns Standard MCP server response format
|
|
166
|
+
*/
|
|
167
|
+
wrapMcpServerResponse(data: McpUrlResponse, serverName: string, connectedAccountIds?: string[], userIds?: string[], toolkits?: string[]): McpServerGetResponse;
|
|
156
168
|
}
|
|
157
169
|
|
|
158
|
-
export { VercelProvider };
|
|
170
|
+
export { VercelProvider, type VercelToolCollection };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
BaseAgenticProvider
|
|
4
|
+
} from "@composio/core";
|
|
3
5
|
import { jsonSchema, tool } from "ai";
|
|
4
6
|
var VercelProvider = class extends BaseAgenticProvider {
|
|
5
7
|
name = "vercel";
|
|
@@ -155,6 +157,36 @@ var VercelProvider = class extends BaseAgenticProvider {
|
|
|
155
157
|
return acc;
|
|
156
158
|
}, {});
|
|
157
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Transform MCP URL response into Vercel-specific format.
|
|
162
|
+
* Vercel uses the standard format by default.
|
|
163
|
+
*
|
|
164
|
+
* @param data - The MCP URL response data
|
|
165
|
+
* @param serverName - Name of the MCP server
|
|
166
|
+
* @param connectedAccountIds - Optional array of connected account IDs
|
|
167
|
+
* @param userIds - Optional array of user IDs
|
|
168
|
+
* @param toolkits - Optional array of toolkit names
|
|
169
|
+
* @returns Standard MCP server response format
|
|
170
|
+
*/
|
|
171
|
+
wrapMcpServerResponse(data, serverName, connectedAccountIds, userIds, toolkits) {
|
|
172
|
+
if (connectedAccountIds?.length && data.connected_account_urls) {
|
|
173
|
+
return data.connected_account_urls.map((url, index) => ({
|
|
174
|
+
url: new URL(url),
|
|
175
|
+
name: `${serverName}-${connectedAccountIds[index]}`,
|
|
176
|
+
toolkit: toolkits?.[index]
|
|
177
|
+
}));
|
|
178
|
+
} else if (userIds?.length && data.user_ids_url) {
|
|
179
|
+
return data.user_ids_url.map((url, index) => ({
|
|
180
|
+
url: new URL(url),
|
|
181
|
+
name: `${serverName}-${userIds[index]}`,
|
|
182
|
+
toolkit: toolkits?.[index]
|
|
183
|
+
}));
|
|
184
|
+
}
|
|
185
|
+
return {
|
|
186
|
+
url: new URL(data.mcp_url),
|
|
187
|
+
name: serverName
|
|
188
|
+
};
|
|
189
|
+
}
|
|
158
190
|
};
|
|
159
191
|
export {
|
|
160
192
|
VercelProvider
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@composio/vercel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"author": "",
|
|
23
23
|
"license": "ISC",
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@composio/core": "0.1.
|
|
25
|
+
"@composio/core": "0.1.25",
|
|
26
26
|
"ai": "^4.3.8"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"tsup": "^8.4.0",
|
|
30
30
|
"typescript": "^5.8.3",
|
|
31
31
|
"vitest": "^3.1.4",
|
|
32
|
-
"@composio/core": "0.1.
|
|
32
|
+
"@composio/core": "0.1.25"
|
|
33
33
|
},
|
|
34
34
|
"gitHead": "4fae6e54d5c150fba955cc5fa314281da5a1e064",
|
|
35
35
|
"scripts": {
|