Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Pinned version
haxzie committed
Apr 16, 2025 at 12:35 UTC
e2f66084e5c630a009a4847fbf7e5ced49982efd
10 files changed
+438
-92
packages/core/src/composio.ts
+20
-16
@@ -7,10 +7,10 @@ import { Toolset, WrappedTool } from "./types/toolset.types.";
7
import { Tool } from "./types/tool.types";
8
import { AuthConfigs } from "./models/AuthConfigs";
9
import { ConnectedAccounts } from "./models/ConnectedAccounts";
10
-import { ActionExecutions } from "./models/ActionExecution";
10
+import { ToolListParams } from "@composio/client/resources/tools";
11
12
export type ComposioConfig<
13
- TTool extends Tool,
13
+ TTool,
14
TToolset extends Toolset<TTool>
15
> = {
16
apiKey?: string;
@@ -25,7 +25,10 @@ export type ComposioConfig<
25
* This is the core class for Composio.
26
* It is used to initialize the Composio SDK and provide a global configuration.
27
*/
28
-export class Composio<TTool extends Tool, TToolset extends Toolset<TTool>> {
28
+export class Composio<
29
+ TTool,
30
+ TToolset extends Toolset<TTool> = Toolset<TTool>
31
+> {
32
/**
33
* The Composio API client.
34
* @type {ComposioClient}
@@ -37,13 +40,12 @@ export class Composio<TTool extends Tool, TToolset extends Toolset<TTool>> {
40
/**
41
* Core models for Composio.
42
*/
40
- tools: Tools<TTool, TToolset>;
43
+ tools: Tools;
44
toolkits: Toolkits;
45
triggers: Triggers;
46
toolset: TToolset;
47
authConfigs: AuthConfigs;
48
connectedAccounts: ConnectedAccounts;
46
- ActionExecution: ActionExecutions;
49
50
/**
51
* @param {Object} config Configuration for the Composio SDK.
@@ -82,16 +84,16 @@ export class Composio<TTool extends Tool, TToolset extends Toolset<TTool>> {
84
*/
85
const defaultToolset = new ComposioToolset();
86
this.toolset = config.toolset ?? (defaultToolset as unknown as TToolset);
87
+ this.toolset.setClient(this);
88
89
/**
90
* Initialize all the models with composio client.
91
*/
89
- this.tools = new Tools(this.client, this.toolset);
92
+ this.tools = new Tools(this.client);
93
this.toolkits = new Toolkits(this.client);
94
this.triggers = new Triggers(this.client);
95
this.authConfigs = new AuthConfigs(this.client);
96
this.connectedAccounts = new ConnectedAccounts(this.client);
94
- this.ActionExecution = new ActionExecutions(this.client);
97
}
98
99
/**
@@ -111,16 +113,18 @@ export class Composio<TTool extends Tool, TToolset extends Toolset<TTool>> {
113
* Generic function to get all the tools
114
* @returns {Promise<T[]>} Promise with list of tools
115
*/
114
- getTool(id: string): Promise<WrappedTool<TToolset>> {
115
- return this.tools.get(id);
116
+ async getTool(id: string): Promise<WrappedTool<TToolset>> {
117
+ const tool = await this.tools.get(id);
118
+ return this.toolset._wrapTool(tool) as WrappedTool<TToolset>;
119
}
120
118
- getTools(): Promise<WrappedTool<TToolset>[]> {
119
- return this.tools.list();
120
- }
121
-
122
- getEntity(): Promise<void> {
123
- console.log("Entity");
124
- return Promise.resolve();
121
+ /**
122
+ * Generic function to get all the tools
123
+ * @param query - Query parameters for the tools
124
+ * @returns {Promise<T[]>} Promise with list of tools
125
+ */
126
+ async getTools(query?: ToolListParams): Promise<WrappedTool<TToolset>[]> {
127
+ const tools = await this.tools.list(query);
128
+ return tools.items.map((tool) => this.toolset._wrapTool(tool as Tool)) as WrappedTool<TToolset>[];
129
}
130
}
packages/core/src/models/Tools.ts
+14
-29
@@ -1,65 +1,50 @@
1
import ComposioSDK from "@composio/client";
2
import { Tool } from "../types/tool.types";
3
-import { Toolset, WrappedTool } from "../types/toolset.types.";
3
import {
4
ToolExecuteParams,
5
ToolExecuteResponse,
6
ToolGetInputParams,
7
ToolGetInputResponse,
8
ToolListParams,
9
+ ToolListResponse,
10
ToolRetrieveEnumResponse,
11
} from "@composio/client/resources/tools";
12
13
/**
14
* This class is used to manage tools in the Composio SDK.
15
* It provides methods to list, get, and execute tools.
16
- * It also provides a method to wrap tools using the toolset.
16
*/
18
-export class Tools<TTool extends Tool, TToolset extends Toolset<TTool>> {
17
+export class Tools {
18
private client: ComposioSDK;
20
- private toolset: TToolset;
19
22
- constructor(client: ComposioSDK, toolset: TToolset) {
20
+ constructor(client: ComposioSDK) {
21
this.client = client;
24
- this.toolset = toolset;
25
- }
26
-
27
- /**
28
- * This method helps us to safely wrap the tool in the toolset.
29
- *
30
- * @param {Tool} tool Tool to be wrapped by the toolset
31
- * @returns {ReturnType<WrappedTool<TToolset>>} Wrapped tool
32
- */
33
- private wrap(tool: Tool): WrappedTool<TToolset> {
34
- return this.toolset._wrapTool(tool) as WrappedTool<TToolset>;
22
}
23
24
/**
25
* Lists all tools available in the Composio SDK.
26
* This method fetches the tools from the Composio API and wraps them using the toolset.
40
- * @returns {Promise<WrappedTool<TToolset>[]>} List of tools
27
+ * @returns {Tools[]>} List of tools
28
*/
42
- async list(query: ToolListParams = {}): Promise<WrappedTool<TToolset>[]> {
43
- try {
29
+ async list(query: ToolListParams = {}): Promise<ToolListResponse> {
30
const tools = await this.client.tools.list(query);
31
if (!tools) {
46
- return [];
32
+ return {
33
+ items: [],
34
+ next_cursor: null,
35
+ total_pages: 0,
36
+ };
37
}
48
- return tools.items.map((tool) => this.wrap(tool));
49
- } catch (error) {
50
- console.error("Error fetching tools:", error);
51
- return [];
52
- }
38
+ return tools;
39
}
40
41
/**
42
* Retrieves a tool by its Slug.
43
* @param slug The ID of the tool to be retrieved
58
- * @returns {Promise<WrappedTool<TToolset>>} The tool object wrapped by the toolset
44
+ * @returns {Promise<Tool>} The tool
45
*/
60
- async get(slug: string): Promise<WrappedTool<TToolset>> {
61
- const tool = await this.client.tools.retrieve(slug);
62
- return this.wrap(tool);
46
+ async get(slug: string): Promise<Tool> {
47
+ return this.client.tools.retrieve(slug);
48
}
49
50
/**
packages/core/src/toolset/BaseToolset.ts
+10
-15
@@ -1,5 +1,6 @@
1
import { Toolset } from "../types/toolset.types.";
2
import { Tool } from "../types/tool.types";
3
+import { Composio } from "../composio";
4
5
/**
6
* Base toolset implementation with proper generic defaults
@@ -16,8 +17,14 @@ import { Tool } from "../types/tool.types";
17
* }
18
* ```
19
*/
19
-export abstract class BaseComposioToolset<TTool extends Tool> implements Toolset<TTool> {
20
-
20
+export abstract class BaseComposioToolset<TTool> implements Toolset<TTool> {
21
+
22
+ /**
23
+ * Sets the client for the toolset
24
+ * @param client
25
+ */
26
+ abstract setClient(client: Composio<TTool, Toolset<TTool>>): void;
27
+
28
/**
29
* Wraps the tool to a specific type
30
* This method should be implemented by the extended class to wrap the tool to a specific type.
@@ -26,17 +33,5 @@ export abstract class BaseComposioToolset<TTool extends Tool> implements Toolset
33
*/
34
abstract _wrapTool: (tool: Tool) => TTool;
35
29
- getTools(): TTool[] {
30
- return [];
31
- }
32
-
33
- // pre process the tool before executing it
34
- preProcessTool(tool: TTool): TTool {
35
- return tool;
36
- }
37
-
38
- // post process the tool after executing it
39
- postProcessTool(tool: TTool): TTool {
40
- return tool;
41
- }
36
+ // @TODO add pre-process and post-process methods
37
}
\ No newline at end of file
packages/core/src/toolset/ComposioToolset.ts
+22
-3
@@ -1,5 +1,7 @@
1
+import { Composio } from "../composio";
2
import { Tool } from "../types/tool.types";
3
import { BaseComposioToolset } from "./BaseToolset";
4
+import { Toolset } from "../types/toolset.types.";
5
6
/**
7
* This is a default toolset implementation for Composio.
@@ -7,8 +9,25 @@ import { BaseComposioToolset } from "./BaseToolset";
9
*
10
* This class shouldn't be used directly or to be extended.
11
*/
10
-export class ComposioToolset extends BaseComposioToolset<Tool> {
11
- _wrapTool = (tool: Tool): Tool => {
12
- return tool;
12
+
13
+interface CustomTool {
14
+ name: string;
15
+}
16
+export class ComposioToolset extends BaseComposioToolset<CustomTool> {
17
+ private client: Composio<CustomTool, Toolset<CustomTool>> | undefined;
18
+
19
+ setClient(client: Composio<CustomTool, Toolset<CustomTool>>) {
20
+ this.client = client;
21
+ }
22
+
23
+ _wrapTool = (tool: Tool): CustomTool => {
24
+ return tool as unknown as CustomTool;
25
};
26
}
27
+
28
+const composio = new Composio({
29
+ apiKey: process.env.COMPOSIO_API_KEY,
30
+ toolset: new ComposioToolset(),
31
+});
32
+
33
+
packages/core/src/types/Tool.types.ts
+1
-1
@@ -1,3 +1,3 @@
1
import { ToolListResponse, ToolRetrieveResponse } from "@composio/client/resources/tools";
2
3
-export type Tool = ToolRetrieveResponse | ToolListResponse.Item;
\ No newline at end of file
3
+export type Tool = ToolRetrieveResponse;
\ No newline at end of file
packages/core/src/types/Toolset.types..ts
+3
-1
@@ -1,11 +1,13 @@
1
+import { Composio } from "../composio";
2
import { Tool } from "./tool.types";
3
4
/**
5
* Base toolset implementation, which needs to be implemented by the extended class.
6
* This class is used to create a base toolset by implementing this class.
7
*/
7
-export interface Toolset<TTool extends Tool> {
8
+export interface Toolset<TTool> {
9
_wrapTool: (tool: Tool) => TTool;
10
+ setClient: (client: Composio<TTool, Toolset<TTool>>) => void;
11
}
12
13
packages/examples/sample/src/index.ts
-6
@@ -11,13 +11,7 @@ async function constructorExample() {
11
});
12
13
const tool = await composio.tools.get("HACKERNEWS_SEARCH_POSTS");
14
-
14
const sampleTool = await composio.getTool("HACKERNEWS_SEARCH_POSTS");
16
- sampleTool.execute({});
17
-
18
- composio.toolset.handleToolCall(tool);
19
-
20
- tool.execute({});
15
}
16
17
constructorExample();
packages/toolsets/openai/package.json
+2
-1
@@ -12,7 +12,8 @@
12
"license": "ISC",
13
"packageManager": "pnpm@10.8.0",
14
"dependencies": {
15
- "@composio/core": "workspace:*"
15
+ "@composio/core": "workspace:*",
16
+ "openai": "^4.94.0"
17
},
18
"devDependencies": {
19
"tsup": "^8.4.0",
packages/toolsets/openai/src/index.ts
+74
-20
@@ -1,26 +1,80 @@
1
-import { BaseComposioToolset } from "@composio/core";
1
+import { BaseComposioToolset, Composio, Toolset } from "@composio/core";
2
import { Tool } from "@composio/core";
3
+import { OpenAI } from "openai";
4
4
-export interface OpenAITool extends Tool {
5
- execute: (args: any) => Promise<any>;
6
-}
7
-export class OpenAIToolset extends BaseComposioToolset<OpenAITool> {
8
- handleToolCall = async (tool: OpenAITool) => {
9
- console.log(`Handling OpenAI tool call: ${tool.name}`);
10
- // Here you would implement the logic to handle the tool call
11
- // For example, calling an API or performing some computation
12
- return tool.execute({});
13
- };
5
+export class OpenAIToolset extends BaseComposioToolset<OpenAI.ChatCompletionTool> {
6
+ static readonly FRAMEWORK_NAME = "openai";
7
+ static readonly DEFAULT_USER_ID = "default";
8
+ private static readonly FILE_NAME = "toolsets/openai/src/index.ts";
9
+ private client: Composio<OpenAI.ChatCompletionTool, Toolset<OpenAI.ChatCompletionTool>> | undefined;
10
+
11
+ setClient(client: Composio<OpenAI.ChatCompletionTool, Toolset<OpenAI.ChatCompletionTool>>) {
12
+ this.client = client;
13
+ }
14
15
- _wrapTool = (tool: Tool): OpenAITool => {
15
+ _wrapTool = (tool: Tool): OpenAI.ChatCompletionTool => {
16
+ const formattedSchema: OpenAI.FunctionDefinition = {
17
+ name: tool.name!,
18
+ description: tool.description!,
19
+ parameters: tool.input_parameters!,
20
+ };
21
return {
17
- ...tool,
18
- execute: async (args: any) => {
19
- console.log(`Executing OpenAI tool: ${tool.name}`);
20
- // Here you would implement the actual execution logic
21
- // For example, calling an API or performing some computation
22
- return Promise.resolve(args);
23
- },
22
+ type: "function",
23
+ function: formattedSchema,
24
};
25
};
26
-}
26
+
27
+ /**
28
+ * @TODO include the connectedAccountId / app name in the tool call
29
+ * @param tool
30
+ * @param userId
31
+ * @returns
32
+ */
33
+ async executeToolCall(
34
+ tool: OpenAI.ChatCompletionMessageToolCall,
35
+ userId?: string
36
+ ): Promise<string> {
37
+
38
+ if (!this.client) {
39
+ throw new Error("Client not set");
40
+ }
41
+
42
+ const toolSchema = await this.client.tools.get(tool.function.name);
43
+ const results = await this.client.tools.execute(toolSchema.name, {
44
+ arguments: JSON.parse(tool.function.arguments),
45
+ entity_id: userId,
46
+ });
47
+
48
+ return JSON.stringify(results);
49
+ }
50
+
51
+ /**
52
+ *
53
+ * @param tool
54
+ * @returns
55
+ */
56
+ handleToolCall = async (chatCompletion: OpenAI.ChatCompletion, userId?: string) => {
57
+ const outputs: string[] = [];
58
+ for (const message of chatCompletion.choices) {
59
+ if (message.message.tool_calls) {
60
+ outputs.push(
61
+ await this.executeToolCall(message.message.tool_calls[0], userId)
62
+ );
63
+ }
64
+ }
65
+ return outputs;
66
+ };
67
+
68
+
69
+ handleAssistantMessage(run: OpenAI.Beta.Threads.Run, userId?: string) {
70
+ const threadId = run.thread_id;
71
+ }
72
+
73
+ async *waitAndHandleAssistantStreamToolCalls() {
74
+
75
+ }
76
+
77
+ async waitAndHandleAssistantToolCalls() {
78
+
79
+ }
80
+}
\ No newline at end of file
pnpm-lock.yaml
+292
@@ -48,6 +48,9 @@ importers:
48
'@composio/core':
49
specifier: workspace:*
50
version: link:../../core
51
+ openai:
52
+ specifier: ^4.94.0
53
+ version: 4.94.0
54
devDependencies:
55
tsup:
56
specifier: ^8.4.0
@@ -421,6 +424,12 @@ packages:
424
'@types/estree@1.0.7':
425
resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==}
426
427
+ '@types/node-fetch@2.6.12':
428
+ resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==}
429
+
430
+ '@types/node@18.19.86':
431
+ resolution: {integrity: sha512-fifKayi175wLyKyc5qUfyENhQ1dCNI1UNjp653d8kuYcPQN5JhX3dGuP/XmvPTg/xRBn1VTLpbmi+H/Mr7tLfQ==}
432
+
433
'@types/node@22.14.0':
434
resolution: {integrity: sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==}
435
@@ -432,6 +441,14 @@ packages:
441
peerDependencies:
442
valibot: ^1.0.0
443
444
+ abort-controller@3.0.0:
445
+ resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
446
+ engines: {node: '>=6.5'}
447
+
448
+ agentkeepalive@4.6.0:
449
+ resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==}
450
+ engines: {node: '>= 8.0.0'}
451
+
452
ansi-regex@5.0.1:
453
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
454
engines: {node: '>=8'}
@@ -451,6 +468,9 @@ packages:
468
any-promise@1.3.0:
469
resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==}
470
471
+ asynckit@0.4.0:
472
+ resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
473
+
474
balanced-match@1.0.2:
475
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
476
@@ -470,6 +490,10 @@ packages:
490
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
491
engines: {node: '>=8'}
492
493
+ call-bind-apply-helpers@1.0.2:
494
+ resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==}
495
+ engines: {node: '>= 0.4'}
496
+
497
chokidar@4.0.3:
498
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
499
engines: {node: '>= 14.16.0'}
@@ -481,6 +505,10 @@ packages:
505
color-name@1.1.4:
506
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
507
508
+ combined-stream@1.0.8:
509
+ resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
510
+ engines: {node: '>= 0.8'}
511
+
512
commander@4.1.1:
513
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
514
engines: {node: '>= 6'}
@@ -502,6 +530,14 @@ packages:
530
supports-color:
531
optional: true
532
533
+ delayed-stream@1.0.0:
534
+ resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
535
+ engines: {node: '>=0.4.0'}
536
+
537
+ dunder-proto@1.0.1:
538
+ resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
539
+ engines: {node: '>= 0.4'}
540
+
541
eastasianwidth@0.2.0:
542
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
543
@@ -511,11 +547,31 @@ packages:
547
emoji-regex@9.2.2:
548
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
549
550
+ es-define-property@1.0.1:
551
+ resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
552
+ engines: {node: '>= 0.4'}
553
+
554
+ es-errors@1.3.0:
555
+ resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
556
+ engines: {node: '>= 0.4'}
557
+
558
+ es-object-atoms@1.1.1:
559
+ resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}
560
+ engines: {node: '>= 0.4'}
561
+
562
+ es-set-tostringtag@2.1.0:
563
+ resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==}
564
+ engines: {node: '>= 0.4'}
565
+
566
esbuild@0.25.2:
567
resolution: {integrity: sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==}
568
engines: {node: '>=18'}
569
hasBin: true
570
571
+ event-target-shim@5.0.1:
572
+ resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==}
573
+ engines: {node: '>=6'}
574
+
575
fdir@6.4.3:
576
resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==}
577
peerDependencies:
@@ -528,11 +584,33 @@ packages:
584
resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
585
engines: {node: '>=14'}
586
587
+ form-data-encoder@1.7.2:
588
+ resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==}
589
+
590
+ form-data@4.0.2:
591
+ resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==}
592
+ engines: {node: '>= 6'}
593
+
594
+ formdata-node@4.4.1:
595
+ resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==}
596
+ engines: {node: '>= 12.20'}
597
+
598
fsevents@2.3.3:
599
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
600
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
601
os: [darwin]
602
603
+ function-bind@1.1.2:
604
+ resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
605
+
606
+ get-intrinsic@1.3.0:
607
+ resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==}
608
+ engines: {node: '>= 0.4'}
609
+
610
+ get-proto@1.0.1:
611
+ resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==}
612
+ engines: {node: '>= 0.4'}
613
+
614
get-tsconfig@4.10.0:
615
resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==}
616
@@ -540,6 +618,25 @@ packages:
618
resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}
619
hasBin: true
620
621
+ gopd@1.2.0:
622
+ resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
623
+ engines: {node: '>= 0.4'}
624
+
625
+ has-symbols@1.1.0:
626
+ resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}
627
+ engines: {node: '>= 0.4'}
628
+
629
+ has-tostringtag@1.0.2:
630
+ resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
631
+ engines: {node: '>= 0.4'}
632
+
633
+ hasown@2.0.2:
634
+ resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
635
+ engines: {node: '>= 0.4'}
636
+
637
+ humanize-ms@1.2.1:
638
+ resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==}
639
+
640
is-fullwidth-code-point@3.0.0:
641
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
642
engines: {node: '>=8'}
@@ -571,6 +668,18 @@ packages:
668
lru-cache@10.4.3:
669
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
670
671
+ math-intrinsics@1.1.0:
672
+ resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
673
+ engines: {node: '>= 0.4'}
674
+
675
+ mime-db@1.52.0:
676
+ resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
677
+ engines: {node: '>= 0.6'}
678
+
679
+ mime-types@2.1.35:
680
+ resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
681
+ engines: {node: '>= 0.6'}
682
+
683
minimatch@9.0.5:
684
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
685
engines: {node: '>=16 || 14 >=14.17'}
@@ -585,10 +694,35 @@ packages:
694
mz@2.7.0:
695
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
696
697
+ node-domexception@1.0.0:
698
+ resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
699
+ engines: {node: '>=10.5.0'}
700
+
701
+ node-fetch@2.7.0:
702
+ resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}
703
+ engines: {node: 4.x || >=6.0.0}
704
+ peerDependencies:
705
+ encoding: ^0.1.0
706
+ peerDependenciesMeta:
707
+ encoding:
708
+ optional: true
709
+
710
object-assign@4.1.1:
711
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
712
engines: {node: '>=0.10.0'}
713
714
+ openai@4.94.0:
715
+ resolution: {integrity: sha512-WVmr9HWcwfouLJ7R3UHd2A93ClezTPuJljQxkCYQAL15Sjyt+FBNoqEz5MHSdH/ebQrVyvRhFyn/bvdqtSPyIA==}
716
+ hasBin: true
717
+ peerDependencies:
718
+ ws: ^8.18.0
719
+ zod: ^3.23.8
720
+ peerDependenciesMeta:
721
+ ws:
722
+ optional: true
723
+ zod:
724
+ optional: true
725
+
726
package-json-from-dist@1.0.1:
727
resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}
728
@@ -709,6 +843,9 @@ packages:
843
resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==}
844
engines: {node: '>=12.0.0'}
845
846
+ tr46@0.0.3:
847
+ resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
848
+
849
tr46@1.0.1:
850
resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==}
851
@@ -751,6 +888,9 @@ packages:
888
engines: {node: '>=14.17'}
889
hasBin: true
890
891
+ undici-types@5.26.5:
892
+ resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
893
+
894
undici-types@6.21.0:
895
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
896
@@ -762,9 +902,19 @@ packages:
902
typescript:
903
optional: true
904
905
+ web-streams-polyfill@4.0.0-beta.3:
906
+ resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==}
907
+ engines: {node: '>= 14'}
908
+
909
+ webidl-conversions@3.0.1:
910
+ resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
911
+
912
webidl-conversions@4.0.2:
913
resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}
914
915
+ whatwg-url@5.0.0:
916
+ resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
917
+
918
whatwg-url@7.1.0:
919
resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==}
920
@@ -1023,6 +1173,15 @@ snapshots:
1173
1174
'@types/estree@1.0.7': {}
1175
1176
+ '@types/node-fetch@2.6.12':
1177
+ dependencies:
1178
+ '@types/node': 22.14.0
1179
+ form-data: 4.0.2
1180
+
1181
+ '@types/node@18.19.86':
1182
+ dependencies:
1183
+ undici-types: 5.26.5
1184
+
1185
'@types/node@22.14.0':
1186
dependencies:
1187
undici-types: 6.21.0
@@ -1035,6 +1194,14 @@ snapshots:
1194
dependencies:
1195
valibot: 1.0.0(typescript@5.8.3)
1196
1197
+ abort-controller@3.0.0:
1198
+ dependencies:
1199
+ event-target-shim: 5.0.1
1200
+
1201
+ agentkeepalive@4.6.0:
1202
+ dependencies:
1203
+ humanize-ms: 1.2.1
1204
+
1205
ansi-regex@5.0.1: {}
1206
1207
ansi-regex@6.1.0: {}
@@ -1047,6 +1214,8 @@ snapshots:
1214
1215
any-promise@1.3.0: {}
1216
1217
+ asynckit@0.4.0: {}
1218
+
1219
balanced-match@1.0.2: {}
1220
1221
brace-expansion@2.0.1:
@@ -1065,6 +1234,11 @@ snapshots:
1234
1235
cac@6.7.14: {}
1236
1237
+ call-bind-apply-helpers@1.0.2:
1238
+ dependencies:
1239
+ es-errors: 1.3.0
1240
+ function-bind: 1.1.2
1241
+
1242
chokidar@4.0.3:
1243
dependencies:
1244
readdirp: 4.1.2
@@ -1075,6 +1249,10 @@ snapshots:
1249
1250
color-name@1.1.4: {}
1251
1252
+ combined-stream@1.0.8:
1253
+ dependencies:
1254
+ delayed-stream: 1.0.0
1255
+
1256
commander@4.1.1: {}
1257
1258
consola@3.4.2: {}
@@ -1089,12 +1267,35 @@ snapshots:
1267
dependencies:
1268
ms: 2.1.3
1269
1270
+ delayed-stream@1.0.0: {}
1271
+
1272
+ dunder-proto@1.0.1:
1273
+ dependencies:
1274
+ call-bind-apply-helpers: 1.0.2
1275
+ es-errors: 1.3.0
1276
+ gopd: 1.2.0
1277
+
1278
eastasianwidth@0.2.0: {}
1279
1280
emoji-regex@8.0.0: {}
1281
1282
emoji-regex@9.2.2: {}
1283
1284
+ es-define-property@1.0.1: {}
1285
+
1286
+ es-errors@1.3.0: {}
1287
+
1288
+ es-object-atoms@1.1.1:
1289
+ dependencies:
1290
+ es-errors: 1.3.0
1291
+
1292
+ es-set-tostringtag@2.1.0:
1293
+ dependencies:
1294
+ es-errors: 1.3.0
1295
+ get-intrinsic: 1.3.0
1296
+ has-tostringtag: 1.0.2
1297
+ hasown: 2.0.2
1298
+
1299
esbuild@0.25.2:
1300
optionalDependencies:
1301
'@esbuild/aix-ppc64': 0.25.2
@@ -1123,6 +1324,8 @@ snapshots:
1324
'@esbuild/win32-ia32': 0.25.2
1325
'@esbuild/win32-x64': 0.25.2
1326
1327
+ event-target-shim@5.0.1: {}
1328
+
1329
fdir@6.4.3(picomatch@4.0.2):
1330
optionalDependencies:
1331
picomatch: 4.0.2
@@ -1132,9 +1335,43 @@ snapshots:
1335
cross-spawn: 7.0.6
1336
signal-exit: 4.1.0
1337
1338
+ form-data-encoder@1.7.2: {}
1339
+
1340
+ form-data@4.0.2:
1341
+ dependencies:
1342
+ asynckit: 0.4.0
1343
+ combined-stream: 1.0.8
1344
+ es-set-tostringtag: 2.1.0
1345
+ mime-types: 2.1.35
1346
+
1347
+ formdata-node@4.4.1:
1348
+ dependencies:
1349
+ node-domexception: 1.0.0
1350
+ web-streams-polyfill: 4.0.0-beta.3
1351
+
1352
fsevents@2.3.3:
1353
optional: true
1354
1355
+ function-bind@1.1.2: {}
1356
+
1357
+ get-intrinsic@1.3.0:
1358
+ dependencies:
1359
+ call-bind-apply-helpers: 1.0.2
1360
+ es-define-property: 1.0.1
1361
+ es-errors: 1.3.0
1362
+ es-object-atoms: 1.1.1
1363
+ function-bind: 1.1.2
1364
+ get-proto: 1.0.1
1365
+ gopd: 1.2.0
1366
+ has-symbols: 1.1.0
1367
+ hasown: 2.0.2
1368
+ math-intrinsics: 1.1.0
1369
+
1370
+ get-proto@1.0.1:
1371
+ dependencies:
1372
+ dunder-proto: 1.0.1
1373
+ es-object-atoms: 1.1.1
1374
+
1375
get-tsconfig@4.10.0:
1376
dependencies:
1377
resolve-pkg-maps: 1.0.0
@@ -1148,6 +1385,22 @@ snapshots:
1385
package-json-from-dist: 1.0.1
1386
path-scurry: 1.11.1
1387
1388
+ gopd@1.2.0: {}
1389
+
1390
+ has-symbols@1.1.0: {}
1391
+
1392
+ has-tostringtag@1.0.2:
1393
+ dependencies:
1394
+ has-symbols: 1.1.0
1395
+
1396
+ hasown@2.0.2:
1397
+ dependencies:
1398
+ function-bind: 1.1.2
1399
+
1400
+ humanize-ms@1.2.1:
1401
+ dependencies:
1402
+ ms: 2.1.3
1403
+
1404
is-fullwidth-code-point@3.0.0: {}
1405
1406
isexe@2.0.0: {}
@@ -1170,6 +1423,14 @@ snapshots:
1423
1424
lru-cache@10.4.3: {}
1425
1426
+ math-intrinsics@1.1.0: {}
1427
+
1428
+ mime-db@1.52.0: {}
1429
+
1430
+ mime-types@2.1.35:
1431
+ dependencies:
1432
+ mime-db: 1.52.0
1433
+
1434
minimatch@9.0.5:
1435
dependencies:
1436
brace-expansion: 2.0.1
@@ -1184,8 +1445,26 @@ snapshots:
1445
object-assign: 4.1.1
1446
thenify-all: 1.6.0
1447
1448
+ node-domexception@1.0.0: {}
1449
+
1450
+ node-fetch@2.7.0:
1451
+ dependencies:
1452
+ whatwg-url: 5.0.0
1453
+
1454
object-assign@4.1.1: {}
1455
1456
+ openai@4.94.0:
1457
+ dependencies:
1458
+ '@types/node': 18.19.86
1459
+ '@types/node-fetch': 2.6.12
1460
+ abort-controller: 3.0.0
1461
+ agentkeepalive: 4.6.0
1462
+ form-data-encoder: 1.7.2
1463
+ formdata-node: 4.4.1
1464
+ node-fetch: 2.7.0
1465
+ transitivePeerDependencies:
1466
+ - encoding
1467
+
1468
package-json-from-dist@1.0.1: {}
1469
1470
path-key@3.1.1: {}
@@ -1319,6 +1598,8 @@ snapshots:
1598
fdir: 6.4.3(picomatch@4.0.2)
1599
picomatch: 4.0.2
1600
1601
+ tr46@0.0.3: {}
1602
+
1603
tr46@1.0.1:
1604
dependencies:
1605
punycode: 2.3.1
@@ -1365,14 +1646,25 @@ snapshots:
1646
1647
typescript@5.8.3: {}
1648
1649
+ undici-types@5.26.5: {}
1650
+
1651
undici-types@6.21.0: {}
1652
1653
valibot@1.0.0(typescript@5.8.3):
1654
optionalDependencies:
1655
typescript: 5.8.3
1656
1657
+ web-streams-polyfill@4.0.0-beta.3: {}
1658
+
1659
+ webidl-conversions@3.0.1: {}
1660
+
1661
webidl-conversions@4.0.2: {}
1662
1663
+ whatwg-url@5.0.0:
1664
+ dependencies:
1665
+ tr46: 0.0.3
1666
+ webidl-conversions: 3.0.1
1667
+
1668
whatwg-url@7.1.0:
1669
dependencies:
1670
lodash.sortby: 4.7.0