@composio/vercel 0.1.12-alpha.0 → 0.1.12-alpha.10

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.
Files changed (2) hide show
  1. package/package.json +13 -15
  2. package/src/index.ts +0 -48
package/package.json CHANGED
@@ -1,13 +1,11 @@
1
1
  {
2
2
  "name": "@composio/vercel",
3
- "version": "0.1.12-alpha.0",
3
+ "version": "0.1.12-alpha.10",
4
4
  "description": "",
5
- "main": "src/index.ts",
5
+ "main": "dist/index.js",
6
6
  "type": "module",
7
7
  "publishConfig": {
8
- "access": "public",
9
- "main": "dist/index.js",
10
- "types": "dist/index.d.ts"
8
+ "access": "public"
11
9
  },
12
10
  "exports": {
13
11
  ".": {
@@ -20,23 +18,23 @@
20
18
  "README.md",
21
19
  "dist"
22
20
  ],
23
- "scripts": {
24
- "build": "tsup",
25
- "test": "vitest run"
26
- },
27
21
  "keywords": [],
28
22
  "author": "",
29
23
  "license": "ISC",
30
- "packageManager": "pnpm@10.8.0",
31
24
  "peerDependencies": {
32
- "@composio/core": "0.1.12-alpha.0",
25
+ "@composio/core": "0.1.12-alpha.10",
33
26
  "ai": "^4.3.8"
34
27
  },
35
28
  "devDependencies": {
36
- "@composio/core": "0.1.12-alpha.0",
37
29
  "tsup": "^8.4.0",
38
30
  "typescript": "^5.8.3",
39
- "vitest": "^3.1.3"
31
+ "vitest": "^3.1.3",
32
+ "@composio/core": "0.1.12-alpha.10"
33
+ },
34
+ "gitHead": "4fae6e54d5c150fba955cc5fa314281da5a1e064",
35
+ "scripts": {
36
+ "build": "tsup",
37
+ "test": "vitest run"
40
38
  },
41
- "gitHead": "fb9c8e7b65030f35e004dba81ae971bcbaed2dfd"
42
- }
39
+ "types": "dist/index.d.ts"
40
+ }
package/src/index.ts DELETED
@@ -1,48 +0,0 @@
1
- /**
2
- * Vercel AI Provider
3
- * To be used with the Vercel AI SDK
4
- *
5
- * Author: Musthaq Ahamad <musthaq@composio.dev>
6
- * Legacy Reference: https://github.com/ComposioHQ/composio/blob/master/js/src/frameworks/vercel.ts
7
- *
8
- * This provider provides a set of tools for interacting with Vercel AI SDK.
9
- *
10
- * @packageDocumentation
11
- * @module providers/vercel
12
- */
13
- import { BaseAgenticProvider, Tool as ComposioTool, ExecuteToolFn } from '@composio/core';
14
- import type { Tool as VercelTool } from 'ai';
15
- import { jsonSchema, tool } from 'ai';
16
-
17
- type VercelToolCollection = Record<string, VercelTool>;
18
- export class VercelProvider extends BaseAgenticProvider<VercelToolCollection, VercelTool> {
19
- readonly name = 'vercel';
20
-
21
- /**
22
- * Wrap a Composio tool in a Vercel tool.
23
- * @param {ComposioTool} composioTool - The Composio tool to wrap.
24
- * @returns {VercelTool} The wrapped Vercel tool.
25
- */
26
- wrapTool(composioTool: ComposioTool, executeTool: ExecuteToolFn): VercelTool {
27
- return tool({
28
- description: composioTool.description,
29
- parameters: jsonSchema(composioTool.inputParameters ?? {}),
30
- execute: async params => {
31
- const input = typeof params === 'string' ? JSON.parse(params) : params;
32
- return await executeTool(composioTool.slug, input);
33
- },
34
- });
35
- }
36
-
37
- /**
38
- * Wrap a list of Composio tools as a Vercel tool collection.
39
- * @param {ComposioTool[]} tools - The list of Composio tools to wrap.
40
- * @returns {VercelToolCollection} The wrapped Vercel tool collection.
41
- */
42
- wrapTools(tools: ComposioTool[], executeTool: ExecuteToolFn): VercelToolCollection {
43
- return tools.reduce((acc, tool) => {
44
- acc[tool.slug] = this.wrapTool(tool, executeTool);
45
- return acc;
46
- }, {} as VercelToolCollection);
47
- }
48
- }