Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Finish adding all the toolsets
haxzie committed
Apr 16, 2025 at 16:23 UTC
cb13a64bb5d5e7349cd2b304733e92ae0ac48c21
25 files changed
+1169
-54
README.md
+13
@@ -11,6 +11,19 @@ The core Composio SDK which allows users to interact with the Composio Platform.
11
- **ConnectedAccounts**: Manage third-party service connections. Includes functionality to create, list, refresh, and manage the status of connected accounts.
12
- **ActionExecution**: Track and manage the execution of actions within the platform.
13
14
+
15
+## Creating a new toolset
16
+To create a new Toolset, you need to extend the `BaseComposioToolset<YourToolType>` and implement the `_wrapTool` method to return the tool type of your choice.
17
+
18
+To Quickly create a toolset project, execute the following command from the root of the project
19
+```
20
+pnpm run create-toolset <your toolset name>
21
+```
22
+eg:
23
+```
24
+pnpm run create-toolset langchain
25
+```
26
+
27
## Internal
28
What's not included from @composio/client
29
- [ ] Zod Schemas for type checking
package.json
+1
@@ -6,6 +6,7 @@
6
"packages/*"
7
],
8
"scripts": {
9
+ "create-toolset": "bash scripts/create-toolset.sh",
10
"test": "echo \"Error: no test specified\" && exit 1"
11
},
12
"packageManager": "pnpm@10.8.0"
packages/core/package.json
+2
-1
@@ -19,6 +19,7 @@
19
},
20
"dependencies": {
21
"@composio/client": "0.1.0-alpha.1",
22
- "@composio/openai-toolset": "workspace:^"
22
+ "@composio/openai-toolset": "workspace:^",
23
+ "zod": "^3.24.2"
24
}
25
}
packages/core/src/composio.ts
+4
-6
@@ -131,9 +131,8 @@ export class Composio<TTool, T extends BaseComposioToolset<TTool>> {
131
* Generic function to get all the tools
132
* @returns {Promise<T[]>} Promise with list of tools
133
*/
134
- async getTool(id: string): Promise<WrappedTool<T>> {
135
- const tool = await this.tools.get(id);
136
- return this.toolset._wrapTool(tool) as WrappedTool<T>;
134
+ async getTool(slug: string): Promise<WrappedTool<T>> {
135
+ return this.toolset.getTool(slug) as Promise<WrappedTool<T>>;
136
}
137
138
/**
@@ -141,8 +140,7 @@ export class Composio<TTool, T extends BaseComposioToolset<TTool>> {
140
* @param query - Query parameters for the tools
141
* @returns {Promise<T[]>} Promise with list of tools
142
*/
144
- async getTools(query?: ToolListParams): Promise<WrappedTool<T>[]> {
145
- const tools = await this.tools.list(query);
146
- return tools.items.map((tool) => this.toolset._wrapTool(tool as Tool)) as WrappedTool<T>[];
143
+ async getTools(query?: ToolListParams): Promise<WrappedTool<T>[] | Record<string, WrappedTool<T>>> {
144
+ return this.toolset.getTools(query) as Promise<WrappedTool<T>[]>;
145
}
146
}
packages/core/src/index.ts
+8
-4
@@ -1,7 +1,11 @@
1
+// Core exports
2
import { Composio } from "./composio";
2
-import type { ComposioToolset } from "./toolset/ComposioToolset";
3
-import type { BaseComposioToolset } from "./toolset/BaseToolset";
4
-import type { Tool } from "./types/tool.types";
3
+import { ComposioToolset } from "./toolset/ComposioToolset";
4
+import { BaseComposioToolset } from "./toolset/BaseToolset";
5
+import type { Tool, ToolListParamsSchema, ToolListParams } from "./types/tool.types";
6
import type { Toolset } from "./types/toolset.types.";
7
7
-export { Composio, ComposioToolset, BaseComposioToolset, Tool, Toolset };
8
+// Utils exports
9
+import { jsonSchemaToModel } from "./utils/JsonSchema";
10
+
11
+export { Composio, ComposioToolset, BaseComposioToolset, Tool, ToolListParamsSchema, ToolListParams, Toolset, jsonSchemaToModel };
packages/core/src/toolset/BaseToolset.ts
+22
-1
@@ -1,5 +1,5 @@
1
import { Toolset } from "../types/toolset.types.";
2
-import { Tool, BaseTool } from "../types/tool.types";
2
+import { Tool, BaseTool, ToolListParams } from "../types/tool.types";
3
import { Composio } from "../composio";
4
5
/**
@@ -33,6 +33,27 @@ export abstract class BaseComposioToolset<TTool = BaseTool> implements Toolset<T
33
this.client = client;
34
}
35
36
+
37
+ /**
38
+ * Get all the tools from the client.
39
+ * @param params - The parameters for the tool list.
40
+ * @returns The tools.
41
+ */
42
+ async getTools(params?: ToolListParams): Promise<TTool[] | Record<string, TTool>> {
43
+ const tools = await this.client?.tools.list(params);
44
+ return tools?.items.map((tool) => this._wrapTool(tool as Tool)) ?? [];
45
+ }
46
+
47
+ /**
48
+ * Get a tool from the client.
49
+ * @param slug - The slug of the tool.
50
+ * @returns The tool.
51
+ */
52
+ async getTool(slug: string): Promise<TTool> {
53
+ const tool = await this.client?.tools.get(slug);
54
+ return this._wrapTool(tool as Tool);
55
+ }
56
+
57
/**
58
* Wrap a tool in the toolset.
59
* @param tool - The tool to wrap.
packages/core/src/types/Tool.types.ts
+14
-2
@@ -1,4 +1,5 @@
1
-import { ToolListResponse, ToolRetrieveResponse } from "@composio/client/resources/tools";
1
+import { ToolRetrieveResponse } from "@composio/client/resources/tools";
2
+import { z } from "zod";
3
4
export type Tool = ToolRetrieveResponse;
5
@@ -9,4 +10,15 @@ export interface BaseTool {
10
output_parameters?: Record<string, any>;
11
}
12
12
-export type ToolType<T extends BaseTool> = T;
\ No newline at end of file
13
+export type ToolType<T extends BaseTool> = T;
14
+
15
+
16
+export const ToolListParamsSchema = z.object({
17
+ cursor: z.string().optional(),
18
+ important: z.string().optional(),
19
+ limit: z.string().optional(),
20
+ search: z.string().optional(),
21
+ toolkit_slug: z.string().optional(),
22
+});
23
+
24
+export type ToolListParams = z.infer<typeof ToolListParamsSchema>;
\ No newline at end of file
packages/core/src/utils/JsonSchema.ts
new
+234
@@ -0,0 +1,234 @@
1
+import z from "zod";
2
+
3
+type SchemaTypeToTsType = {
4
+ [key: string]: unknown;
5
+};
6
+
7
+const PYDANTIC_TYPE_TO_TS_TYPE: SchemaTypeToTsType = {
8
+ string: String,
9
+ integer: Number,
10
+ number: Number,
11
+ boolean: Boolean,
12
+ null: null,
13
+};
14
+
15
+export function jsonSchemaToTsType(
16
+ jsonSchema: Record<string, unknown>
17
+): unknown {
18
+ if (!jsonSchema.type) {
19
+ jsonSchema.type = "string";
20
+ }
21
+ const type = jsonSchema.type as string;
22
+
23
+ if (type === "array") {
24
+ const itemsSchema = jsonSchema.items;
25
+ if (itemsSchema) {
26
+ const ItemType = jsonSchemaToTsType(
27
+ itemsSchema as Record<string, unknown>
28
+ );
29
+ return ItemType;
30
+ }
31
+ return Array;
32
+ }
33
+
34
+ if (type === "object") {
35
+ const properties = jsonSchema.properties;
36
+ if (properties) {
37
+ const nestedModel = jsonSchemaToModel(jsonSchema);
38
+ return nestedModel;
39
+ }
40
+ return Object;
41
+ }
42
+
43
+ const tsType = PYDANTIC_TYPE_TO_TS_TYPE[type];
44
+ if (tsType !== undefined) {
45
+ return tsType;
46
+ }
47
+
48
+ throw new Error(`Unsupported JSON schema type: ${type}`);
49
+}
50
+
51
+export function jsonSchemaToTsField(
52
+ name: string,
53
+ jsonSchema: Record<string, unknown>,
54
+ required: string[]
55
+): [unknown, Record<string, unknown>] {
56
+ const description = jsonSchema.description;
57
+ const examples = jsonSchema.examples || [];
58
+ return [
59
+ jsonSchemaToTsType(jsonSchema),
60
+ {
61
+ description: description,
62
+ examples: examples,
63
+ required: required.includes(name),
64
+ default: required.includes(name) ? undefined : null,
65
+ },
66
+ ];
67
+}
68
+
69
+function jsonSchemaPropertiesToTSTypes(value: {
70
+ type: string;
71
+ description?: string;
72
+ examples?: string[];
73
+ items?: Record<string, unknown>;
74
+}): z.ZodTypeAny {
75
+ if (!value.type) {
76
+ return z.object({});
77
+ }
78
+
79
+ let zodType;
80
+ switch (value.type) {
81
+ case "string":
82
+ zodType = z
83
+ .string()
84
+ .describe(
85
+ (value.description || "") +
86
+ (value.examples ? `\nExamples: ${value.examples.join(", ")}` : "")
87
+ );
88
+ break;
89
+ case "number":
90
+ zodType = z
91
+ .number()
92
+ .describe(
93
+ (value.description || "") +
94
+ (value.examples ? `\nExamples: ${value.examples.join(", ")}` : "")
95
+ );
96
+ break;
97
+ case "integer":
98
+ zodType = z
99
+ .number()
100
+ .int()
101
+ .describe(
102
+ (value.description || "") +
103
+ (value.examples ? `\nExamples: ${value.examples.join(", ")}` : "")
104
+ );
105
+ break;
106
+ case "boolean":
107
+ zodType = z
108
+ .boolean()
109
+ .describe(
110
+ (value.description || "") +
111
+ (value.examples ? `\nExamples: ${value.examples.join(", ")}` : "")
112
+ );
113
+ break;
114
+ case "array":
115
+ zodType = z
116
+ .array(
117
+ jsonSchemaPropertiesToTSTypes(
118
+ value.items as {
119
+ type: string;
120
+ description?: string;
121
+ examples?: string[];
122
+ items?: Record<string, unknown>;
123
+ }
124
+ )
125
+ )
126
+ .describe(
127
+ (value.description || "") +
128
+ (value.examples ? `\nExamples: ${value.examples.join(", ")}` : "")
129
+ );
130
+ break;
131
+ case "object":
132
+ zodType = jsonSchemaToModel(value).describe(
133
+ (value.description || "") +
134
+ (value.examples ? `\nExamples: ${value.examples.join(", ")}` : "")
135
+ );
136
+ break;
137
+ case "null":
138
+ zodType = z.null().describe(value.description || "");
139
+ break;
140
+ default:
141
+ throw new Error(`Unsupported JSON schema type: ${value.type}`);
142
+ }
143
+
144
+ return zodType;
145
+}
146
+
147
+export function jsonSchemaToModel(
148
+ jsonSchema: Record<string, unknown>
149
+): z.ZodObject<Record<string, z.ZodTypeAny>> {
150
+ const properties = jsonSchema.properties as Record<string, unknown>;
151
+ const requiredFields = (jsonSchema.required as string[]) || [];
152
+ if (!properties) {
153
+ return z.object({});
154
+ }
155
+
156
+ const zodSchema: Record<string, z.ZodTypeAny> = {};
157
+ for (const [key, _] of Object.entries(properties)) {
158
+ const value = _ as Record<string, unknown>;
159
+ let zodType;
160
+ if (value.anyOf) {
161
+ const anyOfTypes = (value.anyOf as Record<string, unknown>[]).map(
162
+ (schema) =>
163
+ jsonSchemaPropertiesToTSTypes(
164
+ schema as {
165
+ type: string;
166
+ description?: string;
167
+ examples?: string[];
168
+ items?: Record<string, unknown>;
169
+ }
170
+ )
171
+ );
172
+ zodType = z
173
+ .union(anyOfTypes as [z.ZodTypeAny, z.ZodTypeAny, ...z.ZodTypeAny[]])
174
+ .describe(
175
+ ((value.description as string) || "") +
176
+ (value.examples
177
+ ? `\nExamples: ${(value.examples as string[]).join(", ")}`
178
+ : "")
179
+ );
180
+ } else if (value.allOf) {
181
+ const allOfTypes = (value.allOf as Record<string, unknown>[]).map(
182
+ (schema) =>
183
+ jsonSchemaPropertiesToTSTypes(
184
+ schema as {
185
+ type: string;
186
+ description?: string;
187
+ examples?: string[];
188
+ items?: Record<string, unknown>;
189
+ }
190
+ )
191
+ );
192
+ zodType = z
193
+ .intersection(
194
+ allOfTypes[0],
195
+ allOfTypes
196
+ .slice(1)
197
+ .reduce(
198
+ (acc: z.ZodTypeAny, schema: z.ZodTypeAny) => acc.and(schema),
199
+ allOfTypes[0]
200
+ )
201
+ )
202
+ .describe(
203
+ ((value.description as string) || "") +
204
+ (value.examples
205
+ ? `\nExamples: ${(value.examples as string[]).join(", ")}`
206
+ : "")
207
+ );
208
+ } else {
209
+ if (!value.type) {
210
+ value.type = "string";
211
+ }
212
+ zodType = jsonSchemaPropertiesToTSTypes(
213
+ value as {
214
+ type: string;
215
+ description?: string;
216
+ examples?: string[];
217
+ items?: Record<string, unknown>;
218
+ }
219
+ );
220
+ }
221
+
222
+ if (value.description) {
223
+ zodType = zodType.describe(value.description as string);
224
+ }
225
+
226
+ if (requiredFields.includes(key)) {
227
+ zodSchema[key] = zodType;
228
+ } else {
229
+ zodSchema[key] = zodType.optional();
230
+ }
231
+ }
232
+
233
+ return z.object(zodSchema);
234
+}
\ No newline at end of file
packages/examples/sample/src/index.ts
+6
-12
@@ -1,17 +1,11 @@
1
import { Composio } from "@composio/core";
2
import { OpenAIToolset } from "@composio/openai-toolset";
3
4
-/**
5
- * General example
6
- */
7
-async function constructorExample() {
8
- const composio = new Composio({
9
- apiKey: process.env.COMPOSIO_API_KEY,
10
- toolset: new OpenAIToolset(),
11
- });
4
13
- const tool = await composio.tools.get("HACKERNEWS_SEARCH_POSTS");
14
- const sampleTool = await composio.getTool("HACKERNEWS_SEARCH_POSTS");
15
-}
5
+const composio = new Composio({
6
+ apiKey: process.env.COMPOSIO_API_KEY,
7
+ toolset: new OpenAIToolset(),
8
+});
9
17
-constructorExample();
10
+const tool = await composio.getTool("HACKERNEWS_SEARCH_POSTS");
11
+console.log(tool);
packages/toolsets/cloudflare/package.json
new
+22
@@ -0,0 +1,22 @@
1
+{
2
+ "name": "@composio/cloudflare-toolset",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "build": "tsup",
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC",
13
+ "packageManager": "pnpm@10.8.0",
14
+ "devDependencies": {
15
+ "tsup": "^8.4.0",
16
+ "typescript": "^5.8.3"
17
+ },
18
+ "dependencies": {
19
+ "@cloudflare/workers-types": "^4.20250416.0",
20
+ "@composio/core": "workspace:^"
21
+ }
22
+}
packages/toolsets/cloudflare/src/index.ts
new
+79
@@ -0,0 +1,79 @@
1
+import { AiTextGenerationToolInput } from "@cloudflare/workers-types";
2
+import { BaseComposioToolset, Tool, ToolListParams } from "@composio/core";
3
+
4
+export class CloudflareToolset extends BaseComposioToolset<AiTextGenerationToolInput> {
5
+ static FRAMEWORK_NAME = "cloudflare";
6
+ private DEFAULT_ENTITY_ID = "default";
7
+ static fileName: string = "toolsets/cloudflare/src/index.ts";
8
+
9
+ /**
10
+ * Abstract method to wrap a tool in the toolset.
11
+ * This method is implemented by the toolset.
12
+ * @param tool - The tool to wrap.
13
+ * @returns The wrapped tool.
14
+ */
15
+ _wrapTool(tool: Tool): AiTextGenerationToolInput {
16
+ const formattedSchema: AiTextGenerationToolInput["function"] = {
17
+ name: tool.name!,
18
+ description: tool.description!,
19
+ parameters: tool.input_parameters as unknown as {
20
+ type: "object";
21
+ properties: {
22
+ [key: string]: {
23
+ type: string;
24
+ description?: string;
25
+ };
26
+ };
27
+ required: string[];
28
+ },
29
+ };
30
+ const cloudflareTool: AiTextGenerationToolInput = {
31
+ type: "function",
32
+ function: formattedSchema,
33
+ };
34
+ return cloudflareTool;
35
+ }
36
+
37
+ /**
38
+ * Get all the tools from the Cloudflare API.
39
+ * @param {ToolListParams} query - The query parameters for the tools.
40
+ * @returns {Promise<Record<string, AiTextGenerationToolInput>>} The tools from the Cloudflare API.
41
+ */
42
+ override async getTools(query?: ToolListParams): Promise<Record<string, AiTextGenerationToolInput>> {
43
+ if (!this.client) {
44
+ throw new Error("Client not set");
45
+ }
46
+
47
+ const tools = await this.client.tools.list(query);
48
+ return tools.items.reduce((tools, tool) => ({
49
+ ...tools,
50
+ [tool.name]: this._wrapTool(tool as Tool),
51
+ }), {});
52
+ }
53
+
54
+
55
+ /**
56
+ * Execute a tool call.
57
+ * @param tool - The tool to execute.
58
+ * @param userId - The user id.
59
+ * @returns The results of the tool call.
60
+ */
61
+ async executeToolCall(tool: { name: string; arguments: unknown }, userId?: string): Promise<string> {
62
+ if (!this.client) {
63
+ throw new Error("Client not set");
64
+ }
65
+
66
+ const toolSchema = await this.client.tools.get(tool.name);
67
+ const args = typeof tool.arguments === "string"
68
+ ? JSON.parse(tool.arguments)
69
+ : tool.arguments;
70
+ const results = await this.client?.tools.execute(toolSchema.name, {
71
+ arguments: args,
72
+ entity_id: this.DEFAULT_ENTITY_ID,
73
+ connected_account_id: this.client?.getConnectedAccountId(toolSchema.name),
74
+ });
75
+
76
+ return JSON.stringify(results);
77
+ }
78
+
79
+}
packages/toolsets/cloudflare/tsconfig.json
new
+15
@@ -0,0 +1,15 @@
1
+{
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "declaration": true,
6
+ "declarationDir": "./dist",
7
+ "outDir": "./dist",
8
+ "rootDir": "./src",
9
+ "strict": true,
10
+ "esModuleInterop": true,
11
+ "moduleResolution": "node",
12
+ "skipLibCheck": true
13
+ },
14
+ "include": ["src"]
15
+}
packages/toolsets/cloudflare/tsup.config.ts
new
+10
@@ -0,0 +1,10 @@
1
+import { defineConfig } from 'tsup';
2
+
3
+export default defineConfig({
4
+ entry: ['src/index.ts'],
5
+ format: ['esm', 'cjs'],
6
+ dts: true,
7
+ clean: true,
8
+ minify: false,
9
+ outDir: 'dist',
10
+});
packages/toolsets/langchain/package.json
new
+22
@@ -0,0 +1,22 @@
1
+{
2
+ "name": "@composio/langchain-toolset",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "build": "tsup",
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC",
13
+ "packageManager": "pnpm@10.8.0",
14
+ "devDependencies": {
15
+ "tsup": "^8.4.0",
16
+ "typescript": "^5.8.3"
17
+ },
18
+ "dependencies": {
19
+ "@composio/core": "workspace:^",
20
+ "@langchain/core": "^0.3.44"
21
+ }
22
+}
packages/toolsets/langchain/src/index.ts
new
+44
@@ -0,0 +1,44 @@
1
+import { BaseComposioToolset, jsonSchemaToModel, Tool } from "@composio/core";
2
+import { DynamicStructuredTool } from "@langchain/core/tools";
3
+
4
+
5
+
6
+export class LangchainToolset extends BaseComposioToolset<DynamicStructuredTool> {
7
+ static FRAMEWORK_NAME = "langchain";
8
+ private DEFAULT_ENTITY_ID = "default";
9
+ static fileName: string = "toolsets/langchain/src/index.ts";
10
+
11
+ /**
12
+ * Abstract method to wrap a tool in the toolset.
13
+ * This method is implemented by the toolset.
14
+ * @param tool - The tool to wrap.
15
+ * @returns The wrapped tool.
16
+ */
17
+ _wrapTool = (tool: Tool): DynamicStructuredTool => {
18
+ const action = tool.name
19
+ const description = tool.description;
20
+ const appName = tool.toolkit.name?.toLowerCase();
21
+
22
+ const func = async (...kwargs: unknown[]): Promise<unknown> => {
23
+ const connectedAccountId = this.client?.getConnectedAccountId(appName)
24
+ return JSON.stringify(
25
+ await this.client?.tools.execute(tool.name, {
26
+ arguments: kwargs[0] as Record<string, unknown>,
27
+ entity_id: this.DEFAULT_ENTITY_ID,
28
+ connected_account_id: connectedAccountId,
29
+ })
30
+ );
31
+ };
32
+
33
+ const parameters = jsonSchemaToModel(tool.input_parameters);
34
+
35
+ // @TODO: Add escriiption an other stuff here
36
+
37
+ return new DynamicStructuredTool({
38
+ name: action,
39
+ description,
40
+ schema: parameters,
41
+ func: func,
42
+ });
43
+ }
44
+}
packages/toolsets/langchain/src/utils/schema.ts
packages/toolsets/langchain/tsconfig.json
new
+15
@@ -0,0 +1,15 @@
1
+{
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "declaration": true,
6
+ "declarationDir": "./dist",
7
+ "outDir": "./dist",
8
+ "rootDir": "./src",
9
+ "strict": true,
10
+ "esModuleInterop": true,
11
+ "moduleResolution": "node",
12
+ "skipLibCheck": true
13
+ },
14
+ "include": ["src"]
15
+}
packages/toolsets/langchain/tsup.config.ts
new
+10
@@ -0,0 +1,10 @@
1
+import { defineConfig } from 'tsup';
2
+
3
+export default defineConfig({
4
+ entry: ['src/index.ts'],
5
+ format: ['esm', 'cjs'],
6
+ dts: true,
7
+ clean: true,
8
+ minify: false,
9
+ outDir: 'dist',
10
+});
packages/toolsets/openai/src/index.ts
+5
-26
@@ -1,4 +1,4 @@
1
-import { BaseComposioToolset, Composio, Toolset } from "@composio/core";
1
+import { BaseComposioToolset } from "@composio/core";
2
import { Tool } from "@composio/core";
3
import { OpenAI } from "openai";
4
import { Stream } from "openai/streaming";
@@ -7,6 +7,10 @@ export class OpenAIToolset extends BaseComposioToolset<OpenAI.ChatCompletionTool
7
static readonly FRAMEWORK_NAME = "openai";
8
private static readonly FILE_NAME = "toolsets/openai/src/index.ts";
9
10
+ constructor() {
11
+ super();
12
+ }
13
+
14
/**
15
* Absract method to wrap a tool in the toolset.
16
* This method is implemented by the toolset.
@@ -25,31 +29,6 @@ export class OpenAIToolset extends BaseComposioToolset<OpenAI.ChatCompletionTool
29
};
30
};
31
28
- /**
29
- * Get all the tools from the client.
30
- * @returns {Promise<OpenAI.ChatCompletionTool[]>} The tools.
31
- */
32
- async getTools (): Promise<OpenAI.ChatCompletionTool[]> {
33
- if (!this.client) {
34
- throw new Error("Client not set");
35
- }
36
- const tools = await this.client.tools.list();
37
- return tools.items.map((tool) => this._wrapTool(tool as Tool));
38
- }
39
-
40
- /**
41
- * Get a tool from the client.
42
- * @param id - The id of the tool.
43
- * @returns {Promise<OpenAI.ChatCompletionTool>} The tool.
44
- */
45
- async getTool (id: string): Promise<OpenAI.ChatCompletionTool> {
46
- if (!this.client) {
47
- throw new Error("Client not set");
48
- }
49
- const tool = await this.client.tools.get(id);
50
- return this._wrapTool(tool as Tool);
51
- }
52
-
32
/**
33
* @TODO include the connectedAccountId / app name in the tool call
34
* @param tool
packages/toolsets/vercel/package.json
new
+22
@@ -0,0 +1,22 @@
1
+{
2
+ "name": "@composio/vercel-toolset",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "build": "tsup",
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC",
13
+ "packageManager": "pnpm@10.8.0",
14
+ "devDependencies": {
15
+ "tsup": "^8.4.0",
16
+ "typescript": "^5.8.3"
17
+ },
18
+ "dependencies": {
19
+ "@composio/core": "workspace:^",
20
+ "ai": "^4.3.8"
21
+ }
22
+}
packages/toolsets/vercel/src/index.ts
new
+68
@@ -0,0 +1,68 @@
1
+import { BaseComposioToolset, Tool as ComposioTool, ToolListParams } from "@composio/core";
2
+import type { Tool as VercelTool } from "ai";
3
+import { jsonSchema, tool } from "ai";
4
+
5
+export class VercelToolset extends BaseComposioToolset<VercelTool> {
6
+
7
+ private static readonly FILE_NAME = "toolsets/vercel/src/index.ts";
8
+ static readonly FRAMEWORK_NAME = "vercel";
9
+
10
+ /**
11
+ * Get all the tools from the client.
12
+ * Override the default implementation to return a record of tools.
13
+ *
14
+ * @param params - The parameters for the tool list.
15
+ * @returns The tools.
16
+ */
17
+ override async getTools(params?: ToolListParams): Promise<Record<string, VercelTool>> {
18
+ if (!this.client) {
19
+ throw new Error("Client not initialized");
20
+ }
21
+ const tools = await this.client.tools.list(params);
22
+ return tools.items.reduce((tools, tool) => ({ ...tools, [tool.name]: this._wrapTool(tool as ComposioTool) }), {});
23
+ }
24
+
25
+ /**
26
+ * Execute a tool call.
27
+ * @param tool - The tool to execute.
28
+ * @param userId - The user id.
29
+ * @returns {Promise<string>} The result of the tool call.
30
+ */
31
+ async executeToolCall(
32
+ tool: { name: string; arguments: unknown },
33
+ userId?: string
34
+ ): Promise<string> {
35
+ if (!this.client) {
36
+ throw new Error("Client not initialized");
37
+ }
38
+
39
+ const toolSchema = await this.client.tools.get(tool.name);
40
+ const appName = toolSchema?.name.toLowerCase();
41
+ const args = typeof tool.arguments === "string" ? JSON.parse(tool.arguments) : tool.arguments;
42
+
43
+ const results = await this.client.tools.execute(toolSchema.name, {
44
+ arguments: args,
45
+ entity_id: userId ?? this.client.userId,
46
+ connected_account_id: this.client.getConnectedAccountId(appName)
47
+ });
48
+
49
+ return JSON.stringify(results);
50
+ }
51
+
52
+ _wrapTool(composioTool: ComposioTool): VercelTool {
53
+ return tool({
54
+ description: composioTool.description,
55
+ // @ts-ignore the type are JSONSchemV7. Internally it's resolved
56
+ parameters: jsonSchema(composioTool.input_parameters),
57
+ execute: async (params) => {
58
+ return await this.executeToolCall(
59
+ {
60
+ name: composioTool.name,
61
+ arguments: JSON.stringify(params),
62
+ },
63
+ this.client?.userId
64
+ );
65
+ },
66
+ });
67
+ }
68
+}
\ No newline at end of file
packages/toolsets/vercel/tsconfig.json
new
+15
@@ -0,0 +1,15 @@
1
+{
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "declaration": true,
6
+ "declarationDir": "./dist",
7
+ "outDir": "./dist",
8
+ "rootDir": "./src",
9
+ "strict": true,
10
+ "esModuleInterop": true,
11
+ "moduleResolution": "node",
12
+ "skipLibCheck": true
13
+ },
14
+ "include": ["src"]
15
+}
packages/toolsets/vercel/tsup.config.ts
new
+10
@@ -0,0 +1,10 @@
1
+import { defineConfig } from 'tsup';
2
+
3
+export default defineConfig({
4
+ entry: ['src/index.ts'],
5
+ format: ['esm', 'cjs'],
6
+ dts: true,
7
+ clean: true,
8
+ minify: false,
9
+ outDir: 'dist',
10
+});
pnpm-lock.yaml
+421
-2
@@ -16,6 +16,9 @@ importers:
16
'@composio/openai-toolset':
17
specifier: workspace:^
18
version: link:../toolsets/openai
19
+ zod:
20
+ specifier: ^3.24.2
21
+ version: 3.24.2
22
devDependencies:
23
rolldown:
24
specifier: 1.0.0-beta.7
@@ -46,6 +49,38 @@ importers:
49
specifier: ^5.8.3
50
version: 5.8.3
51
52
+ packages/toolsets/cloudflare:
53
+ dependencies:
54
+ '@cloudflare/workers-types':
55
+ specifier: ^4.20250416.0
56
+ version: 4.20250416.0
57
+ '@composio/core':
58
+ specifier: workspace:^
59
+ version: link:../../core
60
+ devDependencies:
61
+ tsup:
62
+ specifier: ^8.4.0
63
+ version: 8.4.0(tsx@4.19.3)(typescript@5.8.3)
64
+ typescript:
65
+ specifier: ^5.8.3
66
+ version: 5.8.3
67
+
68
+ packages/toolsets/langchain:
69
+ dependencies:
70
+ '@composio/core':
71
+ specifier: workspace:^
72
+ version: link:../../core
73
+ '@langchain/core':
74
+ specifier: ^0.3.44
75
+ version: 0.3.44(openai@4.94.0(zod@3.24.2))
76
+ devDependencies:
77
+ tsup:
78
+ specifier: ^8.4.0
79
+ version: 8.4.0(tsx@4.19.3)(typescript@5.8.3)
80
+ typescript:
81
+ specifier: ^5.8.3
82
+ version: 5.8.3
83
+
84
packages/toolsets/openai:
85
dependencies:
86
'@composio/core':
@@ -53,7 +88,23 @@ importers:
88
version: link:../../core
89
openai:
90
specifier: ^4.94.0
56
- version: 4.94.0
91
+ version: 4.94.0(zod@3.24.2)
92
+ devDependencies:
93
+ tsup:
94
+ specifier: ^8.4.0
95
+ version: 8.4.0(tsx@4.19.3)(typescript@5.8.3)
96
+ typescript:
97
+ specifier: ^5.8.3
98
+ version: 5.8.3
99
+
100
+ packages/toolsets/vercel:
101
+ dependencies:
102
+ '@composio/core':
103
+ specifier: workspace:^
104
+ version: link:../../core
105
+ ai:
106
+ specifier: ^4.3.8
107
+ version: 4.3.8(react@19.1.0)(zod@3.24.2)
108
devDependencies:
109
tsup:
110
specifier: ^8.4.0
@@ -64,6 +115,38 @@ importers:
115
116
packages:
117
118
+ '@ai-sdk/provider-utils@2.2.7':
119
+ resolution: {integrity: sha512-kM0xS3GWg3aMChh9zfeM+80vEZfXzR3JEUBdycZLtbRZ2TRT8xOj3WodGHPb06sUK5yD7pAXC/P7ctsi2fvUGQ==}
120
+ engines: {node: '>=18'}
121
+ peerDependencies:
122
+ zod: ^3.23.8
123
+
124
+ '@ai-sdk/provider@1.1.3':
125
+ resolution: {integrity: sha512-qZMxYJ0qqX/RfnuIaab+zp8UAeJn/ygXXAffR5I4N0n1IrvA6qBsjc8hXLmBiMV2zoXlifkacF7sEFnYnjBcqg==}
126
+ engines: {node: '>=18'}
127
+
128
+ '@ai-sdk/react@1.2.9':
129
+ resolution: {integrity: sha512-/VYm8xifyngaqFDLXACk/1czDRCefNCdALUyp+kIX6DUIYUWTM93ISoZ+qJ8+3E+FiJAKBQz61o8lIIl+vYtzg==}
130
+ engines: {node: '>=18'}
131
+ peerDependencies:
132
+ react: ^18 || ^19 || ^19.0.0-rc
133
+ zod: ^3.23.8
134
+ peerDependenciesMeta:
135
+ zod:
136
+ optional: true
137
+
138
+ '@ai-sdk/ui-utils@1.2.8':
139
+ resolution: {integrity: sha512-nls/IJCY+ks3Uj6G/agNhXqQeLVqhNfoJbuNgCny+nX2veY5ADB91EcZUqVeQ/ionul2SeUswPY6Q/DxteY29Q==}
140
+ engines: {node: '>=18'}
141
+ peerDependencies:
142
+ zod: ^3.23.8
143
+
144
+ '@cfworker/json-schema@4.1.1':
145
+ resolution: {integrity: sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og==}
146
+
147
+ '@cloudflare/workers-types@4.20250416.0':
148
+ resolution: {integrity: sha512-i37TX0Clp+MrPdXMBdvKZM7JghCrWD9GtG7E+8ANOAPmtZjUkZfEy9qq46IG3XlNpagPaWDkY3SgJ3s01gPxCw==}
149
+
150
'@composio/client@0.1.0-alpha.1':
151
resolution: {integrity: sha512-cWN3Kffl1zkJ9LVHXtIAZplyUP1fktNIXgPhKL9RMRrUlQyuwpA8k2so4nlxg4f1C77NZSM+9/gbNOLNRWx21g==}
152
@@ -248,9 +331,17 @@ packages:
331
'@jridgewell/trace-mapping@0.3.25':
332
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
333
334
+ '@langchain/core@0.3.44':
335
+ resolution: {integrity: sha512-3BsSFf7STvPPZyl2kMANgtVnCUvDdyP4k+koP+nY2Tczd5V+RFkuazIn/JOj/xxy/neZjr4PxFU4BFyF1aKXOA==}
336
+ engines: {node: '>=18'}
337
+
338
'@napi-rs/wasm-runtime@0.2.8':
339
resolution: {integrity: sha512-OBlgKdX7gin7OIq4fadsjpg+cp2ZphvAIKucHsNfTdJiqdOmOEwQd/bHi0VwNrcw5xpBJyUw6cK/QilCqy1BSg==}
340
341
+ '@opentelemetry/api@1.9.0':
342
+ resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==}
343
+ engines: {node: '>=8.0.0'}
344
+
345
'@oxc-project/types@0.61.2':
346
resolution: {integrity: sha512-rfuwJwvwn9MRthHNXlSo9Eka/u7gC0MhnWAoX3BhE1+rwPOl22nq0K0Y997Hof0tHCOuD7H3/Z8HTfCVhB4c5Q==}
347
@@ -424,6 +515,9 @@ packages:
515
'@types/bun@1.2.9':
516
resolution: {integrity: sha512-epShhLGQYc4Bv/aceHbmBhOz1XgUnuTZgcxjxk+WXwNyDXavv5QHD1QEFV0FwbTSQtNq6g4ZcV6y0vZakTjswg==}
517
518
+ '@types/diff-match-patch@1.0.36':
519
+ resolution: {integrity: sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg==}
520
+
521
'@types/estree@1.0.7':
522
resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==}
523
@@ -436,6 +530,12 @@ packages:
530
'@types/node@22.14.0':
531
resolution: {integrity: sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==}
532
533
+ '@types/retry@0.12.0':
534
+ resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==}
535
+
536
+ '@types/uuid@10.0.0':
537
+ resolution: {integrity: sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==}
538
+
539
'@types/ws@8.18.1':
540
resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}
541
@@ -452,6 +552,16 @@ packages:
552
resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==}
553
engines: {node: '>= 8.0.0'}
554
555
+ ai@4.3.8:
556
+ resolution: {integrity: sha512-94iuXn+/I1X6v8I+9nycuHCv3RjtI9UqALw3UfANwaxOGEPtITfImfQg4DAR+3asnJViJ/IdCpWbTyzVXjHWPQ==}
557
+ engines: {node: '>=18'}
558
+ peerDependencies:
559
+ react: ^18 || ^19 || ^19.0.0-rc
560
+ zod: ^3.23.8
561
+ peerDependenciesMeta:
562
+ react:
563
+ optional: true
564
+
565
ansi-regex@5.0.1:
566
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
567
engines: {node: '>=8'}
@@ -464,6 +574,10 @@ packages:
574
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
575
engines: {node: '>=8'}
576
577
+ ansi-styles@5.2.0:
578
+ resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==}
579
+ engines: {node: '>=10'}
580
+
581
ansi-styles@6.2.1:
582
resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}
583
engines: {node: '>=12'}
@@ -477,6 +591,9 @@ packages:
591
balanced-match@1.0.2:
592
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
593
594
+ base64-js@1.5.1:
595
+ resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
596
+
597
brace-expansion@2.0.1:
598
resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
599
@@ -497,6 +614,18 @@ packages:
614
resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==}
615
engines: {node: '>= 0.4'}
616
617
+ camelcase@6.3.0:
618
+ resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==}
619
+ engines: {node: '>=10'}
620
+
621
+ chalk@4.1.2:
622
+ resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
623
+ engines: {node: '>=10'}
624
+
625
+ chalk@5.4.1:
626
+ resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==}
627
+ engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
628
+
629
chokidar@4.0.3:
630
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
631
engines: {node: '>= 14.16.0'}
@@ -520,6 +649,9 @@ packages:
649
resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==}
650
engines: {node: ^14.18.0 || >=16.10.0}
651
652
+ console-table-printer@2.12.1:
653
+ resolution: {integrity: sha512-wKGOQRRvdnd89pCeH96e2Fn4wkbenSP6LMHfjfyNLMbGuHEFbMqQNuxXqd0oXG9caIOQ1FTvc5Uijp9/4jujnQ==}
654
+
655
cross-spawn@7.0.6:
656
resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
657
engines: {node: '>= 8'}
@@ -533,10 +665,21 @@ packages:
665
supports-color:
666
optional: true
667
668
+ decamelize@1.2.0:
669
+ resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==}
670
+ engines: {node: '>=0.10.0'}
671
+
672
delayed-stream@1.0.0:
673
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
674
engines: {node: '>=0.4.0'}
675
676
+ dequal@2.0.3:
677
+ resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
678
+ engines: {node: '>=6'}
679
+
680
+ diff-match-patch@1.0.5:
681
+ resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==}
682
+
683
dunder-proto@1.0.1:
684
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
685
engines: {node: '>= 0.4'}
@@ -575,6 +718,9 @@ packages:
718
resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==}
719
engines: {node: '>=6'}
720
721
+ eventemitter3@4.0.7:
722
+ resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==}
723
+
724
fdir@6.4.3:
725
resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==}
726
peerDependencies:
@@ -625,6 +771,10 @@ packages:
771
resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
772
engines: {node: '>= 0.4'}
773
774
+ has-flag@4.0.0:
775
+ resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
776
+ engines: {node: '>=8'}
777
+
778
has-symbols@1.1.0:
779
resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}
780
engines: {node: '>= 0.4'}
@@ -654,6 +804,25 @@ packages:
804
resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==}
805
engines: {node: '>=10'}
806
807
+ js-tiktoken@1.0.19:
808
+ resolution: {integrity: sha512-XC63YQeEcS47Y53gg950xiZ4IWmkfMe4p2V9OSaBt26q+p47WHn18izuXzSclCI73B7yGqtfRsT6jcZQI0y08g==}
809
+
810
+ json-schema@0.4.0:
811
+ resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==}
812
+
813
+ jsondiffpatch@0.6.0:
814
+ resolution: {integrity: sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ==}
815
+ engines: {node: ^18.0.0 || >=20.0.0}
816
+ hasBin: true
817
+
818
+ langsmith@0.3.16:
819
+ resolution: {integrity: sha512-P3Y0YGHzixgnHuuir2mHZCw6heIeZMFLEmQqVrspy9w57+zwk4PJV6+wP6JrNd/gvt5oKHoN11368GnjO8lE5g==}
820
+ peerDependencies:
821
+ openai: '*'
822
+ peerDependenciesMeta:
823
+ openai:
824
+ optional: true
825
+
826
lilconfig@3.1.3:
827
resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==}
828
engines: {node: '>=14'}
@@ -694,9 +863,18 @@ packages:
863
ms@2.1.3:
864
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
865
866
+ mustache@4.2.0:
867
+ resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==}
868
+ hasBin: true
869
+
870
mz@2.7.0:
871
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
872
873
+ nanoid@3.3.11:
874
+ resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}
875
+ engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
876
+ hasBin: true
877
+
878
node-domexception@1.0.0:
879
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
880
engines: {node: '>=10.5.0'}
@@ -726,6 +904,22 @@ packages:
904
zod:
905
optional: true
906
907
+ p-finally@1.0.0:
908
+ resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==}
909
+ engines: {node: '>=4'}
910
+
911
+ p-queue@6.6.2:
912
+ resolution: {integrity: sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==}
913
+ engines: {node: '>=8'}
914
+
915
+ p-retry@4.6.2:
916
+ resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==}
917
+ engines: {node: '>=8'}
918
+
919
+ p-timeout@3.2.0:
920
+ resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==}
921
+ engines: {node: '>=8'}
922
+
923
package-json-from-dist@1.0.1:
924
resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}
925
@@ -770,6 +964,10 @@ packages:
964
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
965
engines: {node: '>=6'}
966
967
+ react@19.1.0:
968
+ resolution: {integrity: sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==}
969
+ engines: {node: '>=0.10.0'}
970
+
971
readdirp@4.1.2:
972
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
973
engines: {node: '>= 14.18.0'}
@@ -781,6 +979,10 @@ packages:
979
resolve-pkg-maps@1.0.0:
980
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
981
982
+ retry@0.13.1:
983
+ resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==}
984
+ engines: {node: '>= 4'}
985
+
986
rolldown@1.0.0-beta.7:
987
resolution: {integrity: sha512-IUa/9lZVqgFilYggiY7jxUbmvU4Q8wVvVqsru+AeMldBccBEhTYZ6/XP6cWsznb8Fv49zfYGaeEpJ5WeVdo6Mg==}
988
hasBin: true
@@ -795,6 +997,14 @@ packages:
997
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
998
hasBin: true
999
1000
+ secure-json-parse@2.7.0:
1001
+ resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==}
1002
+
1003
+ semver@7.7.1:
1004
+ resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==}
1005
+ engines: {node: '>=10'}
1006
+ hasBin: true
1007
+
1008
shebang-command@2.0.0:
1009
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
1010
engines: {node: '>=8'}
@@ -807,6 +1017,9 @@ packages:
1017
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
1018
engines: {node: '>=14'}
1019
1020
+ simple-wcswidth@1.0.1:
1021
+ resolution: {integrity: sha512-xMO/8eNREtaROt7tJvWJqHBDTMFN4eiQ5I4JRMuilwfnFcV5W9u7RUkueNkdw0jPqGMX36iCywelS5yilTuOxg==}
1022
+
1023
source-map@0.8.0-beta.0:
1024
resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==}
1025
engines: {node: '>= 8'}
@@ -832,6 +1045,15 @@ packages:
1045
engines: {node: '>=16 || 14 >=14.17'}
1046
hasBin: true
1047
1048
+ supports-color@7.2.0:
1049
+ resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
1050
+ engines: {node: '>=8'}
1051
+
1052
+ swr@2.3.3:
1053
+ resolution: {integrity: sha512-dshNvs3ExOqtZ6kJBaAsabhPdHyeY4P2cKwRCniDVifBMoG/SVI7tfLWqPXriVspf2Rg4tPzXJTnwaihIeFw2A==}
1054
+ peerDependencies:
1055
+ react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
1056
+
1057
thenify-all@1.6.0:
1058
resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==}
1059
engines: {node: '>=0.8'}
@@ -839,6 +1061,10 @@ packages:
1061
thenify@3.3.1:
1062
resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==}
1063
1064
+ throttleit@2.1.0:
1065
+ resolution: {integrity: sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==}
1066
+ engines: {node: '>=18'}
1067
+
1068
tinyexec@0.3.2:
1069
resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==}
1070
@@ -897,6 +1123,15 @@ packages:
1123
undici-types@6.21.0:
1124
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
1125
1126
+ use-sync-external-store@1.5.0:
1127
+ resolution: {integrity: sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==}
1128
+ peerDependencies:
1129
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
1130
+
1131
+ uuid@10.0.0:
1132
+ resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==}
1133
+ hasBin: true
1134
+
1135
valibot@1.0.0:
1136
resolution: {integrity: sha512-1Hc0ihzWxBar6NGeZv7fPLY0QuxFMyxwYR2sF1Blu7Wq7EnremwY2W02tit2ij2VJT8HcSkHAQqmFfl77f73Yw==}
1137
peerDependencies:
@@ -934,8 +1169,48 @@ packages:
1169
resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
1170
engines: {node: '>=12'}
1171
1172
+ zod-to-json-schema@3.24.5:
1173
+ resolution: {integrity: sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==}
1174
+ peerDependencies:
1175
+ zod: ^3.24.1
1176
+
1177
+ zod@3.24.2:
1178
+ resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==}
1179
+
1180
snapshots:
1181
1182
+ '@ai-sdk/provider-utils@2.2.7(zod@3.24.2)':
1183
+ dependencies:
1184
+ '@ai-sdk/provider': 1.1.3
1185
+ nanoid: 3.3.11
1186
+ secure-json-parse: 2.7.0
1187
+ zod: 3.24.2
1188
+
1189
+ '@ai-sdk/provider@1.1.3':
1190
+ dependencies:
1191
+ json-schema: 0.4.0
1192
+
1193
+ '@ai-sdk/react@1.2.9(react@19.1.0)(zod@3.24.2)':
1194
+ dependencies:
1195
+ '@ai-sdk/provider-utils': 2.2.7(zod@3.24.2)
1196
+ '@ai-sdk/ui-utils': 1.2.8(zod@3.24.2)
1197
+ react: 19.1.0
1198
+ swr: 2.3.3(react@19.1.0)
1199
+ throttleit: 2.1.0
1200
+ optionalDependencies:
1201
+ zod: 3.24.2
1202
+
1203
+ '@ai-sdk/ui-utils@1.2.8(zod@3.24.2)':
1204
+ dependencies:
1205
+ '@ai-sdk/provider': 1.1.3
1206
+ '@ai-sdk/provider-utils': 2.2.7(zod@3.24.2)
1207
+ zod: 3.24.2
1208
+ zod-to-json-schema: 3.24.5(zod@3.24.2)
1209
+
1210
+ '@cfworker/json-schema@4.1.1': {}
1211
+
1212
+ '@cloudflare/workers-types@4.20250416.0': {}
1213
+
1214
'@composio/client@0.1.0-alpha.1': {}
1215
1216
'@emnapi/core@1.4.0':
@@ -1055,6 +1330,23 @@ snapshots:
1330
'@jridgewell/resolve-uri': 3.1.2
1331
'@jridgewell/sourcemap-codec': 1.5.0
1332
1333
+ '@langchain/core@0.3.44(openai@4.94.0(zod@3.24.2))':
1334
+ dependencies:
1335
+ '@cfworker/json-schema': 4.1.1
1336
+ ansi-styles: 5.2.0
1337
+ camelcase: 6.3.0
1338
+ decamelize: 1.2.0
1339
+ js-tiktoken: 1.0.19
1340
+ langsmith: 0.3.16(openai@4.94.0(zod@3.24.2))
1341
+ mustache: 4.2.0
1342
+ p-queue: 6.6.2
1343
+ p-retry: 4.6.2
1344
+ uuid: 10.0.0
1345
+ zod: 3.24.2
1346
+ zod-to-json-schema: 3.24.5(zod@3.24.2)
1347
+ transitivePeerDependencies:
1348
+ - openai
1349
+
1350
'@napi-rs/wasm-runtime@0.2.8':
1351
dependencies:
1352
'@emnapi/core': 1.4.0
@@ -1062,6 +1354,8 @@ snapshots:
1354
'@tybys/wasm-util': 0.9.0
1355
optional: true
1356
1357
+ '@opentelemetry/api@1.9.0': {}
1358
+
1359
'@oxc-project/types@0.61.2': {}
1360
1361
'@pkgjs/parseargs@0.11.0':
@@ -1174,6 +1468,8 @@ snapshots:
1468
dependencies:
1469
bun-types: 1.2.9
1470
1471
+ '@types/diff-match-patch@1.0.36': {}
1472
+
1473
'@types/estree@1.0.7': {}
1474
1475
'@types/node-fetch@2.6.12':
@@ -1189,6 +1485,10 @@ snapshots:
1485
dependencies:
1486
undici-types: 6.21.0
1487
1488
+ '@types/retry@0.12.0': {}
1489
+
1490
+ '@types/uuid@10.0.0': {}
1491
+
1492
'@types/ws@8.18.1':
1493
dependencies:
1494
'@types/node': 22.14.0
@@ -1205,6 +1505,18 @@ snapshots:
1505
dependencies:
1506
humanize-ms: 1.2.1
1507
1508
+ ai@4.3.8(react@19.1.0)(zod@3.24.2):
1509
+ dependencies:
1510
+ '@ai-sdk/provider': 1.1.3
1511
+ '@ai-sdk/provider-utils': 2.2.7(zod@3.24.2)
1512
+ '@ai-sdk/react': 1.2.9(react@19.1.0)(zod@3.24.2)
1513
+ '@ai-sdk/ui-utils': 1.2.8(zod@3.24.2)
1514
+ '@opentelemetry/api': 1.9.0
1515
+ jsondiffpatch: 0.6.0
1516
+ zod: 3.24.2
1517
+ optionalDependencies:
1518
+ react: 19.1.0
1519
+
1520
ansi-regex@5.0.1: {}
1521
1522
ansi-regex@6.1.0: {}
@@ -1213,6 +1525,8 @@ snapshots:
1525
dependencies:
1526
color-convert: 2.0.1
1527
1528
+ ansi-styles@5.2.0: {}
1529
+
1530
ansi-styles@6.2.1: {}
1531
1532
any-promise@1.3.0: {}
@@ -1221,6 +1535,8 @@ snapshots:
1535
1536
balanced-match@1.0.2: {}
1537
1538
+ base64-js@1.5.1: {}
1539
+
1540
brace-expansion@2.0.1:
1541
dependencies:
1542
balanced-match: 1.0.2
@@ -1242,6 +1558,15 @@ snapshots:
1558
es-errors: 1.3.0
1559
function-bind: 1.1.2
1560
1561
+ camelcase@6.3.0: {}
1562
+
1563
+ chalk@4.1.2:
1564
+ dependencies:
1565
+ ansi-styles: 4.3.0
1566
+ supports-color: 7.2.0
1567
+
1568
+ chalk@5.4.1: {}
1569
+
1570
chokidar@4.0.3:
1571
dependencies:
1572
readdirp: 4.1.2
@@ -1260,6 +1585,10 @@ snapshots:
1585
1586
consola@3.4.2: {}
1587
1588
+ console-table-printer@2.12.1:
1589
+ dependencies:
1590
+ simple-wcswidth: 1.0.1
1591
+
1592
cross-spawn@7.0.6:
1593
dependencies:
1594
path-key: 3.1.1
@@ -1270,8 +1599,14 @@ snapshots:
1599
dependencies:
1600
ms: 2.1.3
1601
1602
+ decamelize@1.2.0: {}
1603
+
1604
delayed-stream@1.0.0: {}
1605
1606
+ dequal@2.0.3: {}
1607
+
1608
+ diff-match-patch@1.0.5: {}
1609
+
1610
dunder-proto@1.0.1:
1611
dependencies:
1612
call-bind-apply-helpers: 1.0.2
@@ -1329,6 +1664,8 @@ snapshots:
1664
1665
event-target-shim@5.0.1: {}
1666
1667
+ eventemitter3@4.0.7: {}
1668
+
1669
fdir@6.4.3(picomatch@4.0.2):
1670
optionalDependencies:
1671
picomatch: 4.0.2
@@ -1390,6 +1727,8 @@ snapshots:
1727
1728
gopd@1.2.0: {}
1729
1730
+ has-flag@4.0.0: {}
1731
+
1732
has-symbols@1.1.0: {}
1733
1734
has-tostringtag@1.0.2:
@@ -1416,6 +1755,30 @@ snapshots:
1755
1756
joycon@3.1.1: {}
1757
1758
+ js-tiktoken@1.0.19:
1759
+ dependencies:
1760
+ base64-js: 1.5.1
1761
+
1762
+ json-schema@0.4.0: {}
1763
+
1764
+ jsondiffpatch@0.6.0:
1765
+ dependencies:
1766
+ '@types/diff-match-patch': 1.0.36
1767
+ chalk: 5.4.1
1768
+ diff-match-patch: 1.0.5
1769
+
1770
+ langsmith@0.3.16(openai@4.94.0(zod@3.24.2)):
1771
+ dependencies:
1772
+ '@types/uuid': 10.0.0
1773
+ chalk: 4.1.2
1774
+ console-table-printer: 2.12.1
1775
+ p-queue: 6.6.2
1776
+ p-retry: 4.6.2
1777
+ semver: 7.7.1
1778
+ uuid: 10.0.0
1779
+ optionalDependencies:
1780
+ openai: 4.94.0(zod@3.24.2)
1781
+
1782
lilconfig@3.1.3: {}
1783
1784
lines-and-columns@1.2.4: {}
@@ -1442,12 +1805,16 @@ snapshots:
1805
1806
ms@2.1.3: {}
1807
1808
+ mustache@4.2.0: {}
1809
+
1810
mz@2.7.0:
1811
dependencies:
1812
any-promise: 1.3.0
1813
object-assign: 4.1.1
1814
thenify-all: 1.6.0
1815
1816
+ nanoid@3.3.11: {}
1817
+
1818
node-domexception@1.0.0: {}
1819
1820
node-fetch@2.7.0:
@@ -1456,7 +1823,7 @@ snapshots:
1823
1824
object-assign@4.1.1: {}
1825
1459
- openai@4.94.0:
1826
+ openai@4.94.0(zod@3.24.2):
1827
dependencies:
1828
'@types/node': 18.19.86
1829
'@types/node-fetch': 2.6.12
@@ -1465,9 +1832,27 @@ snapshots:
1832
form-data-encoder: 1.7.2
1833
formdata-node: 4.4.1
1834
node-fetch: 2.7.0
1835
+ optionalDependencies:
1836
+ zod: 3.24.2
1837
transitivePeerDependencies:
1838
- encoding
1839
1840
+ p-finally@1.0.0: {}
1841
+
1842
+ p-queue@6.6.2:
1843
+ dependencies:
1844
+ eventemitter3: 4.0.7
1845
+ p-timeout: 3.2.0
1846
+
1847
+ p-retry@4.6.2:
1848
+ dependencies:
1849
+ '@types/retry': 0.12.0
1850
+ retry: 0.13.1
1851
+
1852
+ p-timeout@3.2.0:
1853
+ dependencies:
1854
+ p-finally: 1.0.0
1855
+
1856
package-json-from-dist@1.0.1: {}
1857
1858
path-key@3.1.1: {}
@@ -1491,12 +1876,16 @@ snapshots:
1876
1877
punycode@2.3.1: {}
1878
1879
+ react@19.1.0: {}
1880
+
1881
readdirp@4.1.2: {}
1882
1883
resolve-from@5.0.0: {}
1884
1885
resolve-pkg-maps@1.0.0: {}
1886
1887
+ retry@0.13.1: {}
1888
+
1889
rolldown@1.0.0-beta.7(typescript@5.8.3):
1890
dependencies:
1891
'@oxc-project/types': 0.61.2
@@ -1544,6 +1933,10 @@ snapshots:
1933
'@rollup/rollup-win32-x64-msvc': 4.39.0
1934
fsevents: 2.3.3
1935
1936
+ secure-json-parse@2.7.0: {}
1937
+
1938
+ semver@7.7.1: {}
1939
+
1940
shebang-command@2.0.0:
1941
dependencies:
1942
shebang-regex: 3.0.0
@@ -1552,6 +1945,8 @@ snapshots:
1945
1946
signal-exit@4.1.0: {}
1947
1948
+ simple-wcswidth@1.0.1: {}
1949
+
1950
source-map@0.8.0-beta.0:
1951
dependencies:
1952
whatwg-url: 7.1.0
@@ -1586,6 +1981,16 @@ snapshots:
1981
pirates: 4.0.7
1982
ts-interface-checker: 0.1.13
1983
1984
+ supports-color@7.2.0:
1985
+ dependencies:
1986
+ has-flag: 4.0.0
1987
+
1988
+ swr@2.3.3(react@19.1.0):
1989
+ dependencies:
1990
+ dequal: 2.0.3
1991
+ react: 19.1.0
1992
+ use-sync-external-store: 1.5.0(react@19.1.0)
1993
+
1994
thenify-all@1.6.0:
1995
dependencies:
1996
thenify: 3.3.1
@@ -1594,6 +1999,8 @@ snapshots:
1999
dependencies:
2000
any-promise: 1.3.0
2001
2002
+ throttleit@2.1.0: {}
2003
+
2004
tinyexec@0.3.2: {}
2005
2006
tinyglobby@0.2.12:
@@ -1653,6 +2060,12 @@ snapshots:
2060
2061
undici-types@6.21.0: {}
2062
2063
+ use-sync-external-store@1.5.0(react@19.1.0):
2064
+ dependencies:
2065
+ react: 19.1.0
2066
+
2067
+ uuid@10.0.0: {}
2068
+
2069
valibot@1.0.0(typescript@5.8.3):
2070
optionalDependencies:
2071
typescript: 5.8.3
@@ -1689,3 +2102,9 @@ snapshots:
2102
ansi-styles: 6.2.1
2103
string-width: 5.1.2
2104
strip-ansi: 7.1.0
2105
+
2106
+ zod-to-json-schema@3.24.5(zod@3.24.2):
2107
+ dependencies:
2108
+ zod: 3.24.2
2109
+
2110
+ zod@3.24.2: {}
scripts/create-toolset.sh
new
+107
@@ -0,0 +1,107 @@
1
+#!/bin/bash
2
+
3
+# Check if toolset name is provided
4
+if [ -z "$1" ]; then
5
+ echo "Please provide a toolset name"
6
+ echo "Usage: npm run create-toolset <toolset-name>"
7
+ exit 1
8
+fi
9
+
10
+TOOLSET_NAME=$1
11
+TOOLSET_PATH="packages/toolsets/$TOOLSET_NAME"
12
+CAPITAL_TOOLSET_NAME="$(tr '[:lower:]' '[:upper:]' <<< ${TOOLSET_NAME:0:1})${TOOLSET_NAME:1}"
13
+
14
+# Create directory structure
15
+mkdir -p "$TOOLSET_PATH/src"
16
+
17
+# Create package.json
18
+cat > "$TOOLSET_PATH/package.json" << EOL
19
+{
20
+ "name": "@composio/${TOOLSET_NAME}-toolset",
21
+ "version": "1.0.0",
22
+ "description": "",
23
+ "main": "index.js",
24
+ "scripts": {
25
+ "build": "tsup",
26
+ "test": "echo \\"Error: no test specified\\" && exit 1"
27
+ },
28
+ "keywords": [],
29
+ "author": "",
30
+ "license": "ISC",
31
+ "packageManager": "pnpm@10.8.0",
32
+ "devDependencies": {
33
+ "tsup": "^8.4.0",
34
+ "typescript": "^5.8.3"
35
+ },
36
+ "dependencies": {
37
+ "@composio/core": "workspace:^"
38
+ }
39
+}
40
+EOL
41
+
42
+# Create tsconfig.json
43
+cat > "$TOOLSET_PATH/tsconfig.json" << EOL
44
+{
45
+ "compilerOptions": {
46
+ "target": "ESNext",
47
+ "module": "ESNext",
48
+ "declaration": true,
49
+ "declarationDir": "./dist",
50
+ "outDir": "./dist",
51
+ "rootDir": "./src",
52
+ "strict": true,
53
+ "esModuleInterop": true,
54
+ "moduleResolution": "node",
55
+ "skipLibCheck": true
56
+ },
57
+ "include": ["src"]
58
+}
59
+EOL
60
+
61
+# Create tsup.config.ts
62
+cat > "$TOOLSET_PATH/tsup.config.ts" << EOL
63
+import { defineConfig } from 'tsup';
64
+
65
+export default defineConfig({
66
+ entry: ['src/index.ts'],
67
+ format: ['esm', 'cjs'],
68
+ dts: true,
69
+ clean: true,
70
+ minify: false,
71
+ outDir: 'dist',
72
+});
73
+EOL
74
+
75
+# Create src/index.ts
76
+cat > "$TOOLSET_PATH/src/index.ts" << EOL
77
+import { BaseComposioToolset, Tool } from "@composio/core";
78
+
79
+interface ToolType {
80
+ // Add your tool type here
81
+}
82
+
83
+export class ${CAPITAL_TOOLSET_NAME}Toolset extends BaseComposioToolset<ToolType> {
84
+ static FRAMEWORK_NAME = "${TOOLSET_NAME}";
85
+ private DEFAULT_ENTITY_ID = "default";
86
+ static fileName: string = "toolsets/${TOOLSET_NAME}/src/index.ts";
87
+
88
+ /**
89
+ * Abstract method to wrap a tool in the toolset.
90
+ * This method is implemented by the toolset.
91
+ * @param tool - The tool to wrap.
92
+ * @returns The wrapped tool.
93
+ */
94
+ _wrapTool = (tool: Tool): ToolType => {
95
+ return tool as ToolType;
96
+ }
97
+}
98
+EOL
99
+
100
+# Make the script executable
101
+chmod +x "$TOOLSET_PATH"
102
+
103
+# Install dependencies using pnpm
104
+cd "$TOOLSET_PATH" && pnpm install
105
+
106
+echo "✨ Created new toolset at $TOOLSET_PATH"
107
+echo "✨ Dependencies installed successfully"
\ No newline at end of file