@composio/core 0.1.0-rc.7 → 0.1.4-alpha.0

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.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import ComposioClient from '@composio/client';
2
2
  import { z, ZodObject, ZodString, ZodNumber, ZodBoolean, ZodOptional } from 'zod';
3
- import { ToolProxyParams, ToolProxyResponse, ToolListParams as ToolListParams$1, ToolRetrieveEnumResponse, ToolGetInputParams, ToolGetInputResponse } from '@composio/client/resources/tools';
3
+ import { ToolProxyParams, ToolProxyResponse, ToolRetrieveEnumResponse, ToolGetInputParams, ToolGetInputResponse } from '@composio/client/resources/tools';
4
4
  import { RequestOptions } from '@composio/client/internal/request-options';
5
- import { ToolkitListParams, ToolkitListResponse, ToolkitRetrieveResponse, ToolkitRetrieveCategoriesResponse } from '@composio/client/resources/toolkits';
6
5
  import { TriggerInstanceListActiveParams, TriggerInstanceUpsertParams, TriggerInstanceUpsertResponse, TriggerInstanceRemoveUpsertResponse, TriggerInstanceUpdateStatusParams, TriggersTypeListParams, TriggersTypeListResponse, TriggersTypeRetrieveResponse, TriggersTypeRetrieveEnumResponse } from '@composio/client/resources/index';
7
6
  import { AuthConfigListParams, AuthConfigListResponse, AuthConfigCreateParams, AuthConfigCreateResponse, AuthConfigRetrieveResponse, AuthConfigUpdateParams, AuthConfigUpdateResponse, AuthConfigDeleteResponse, AuthConfigUpdateStatusResponse } from '@composio/client/resources/auth-configs';
8
7
  import { ConnectedAccountListParams, ConnectedAccountListResponse, ConnectedAccountCreateParams, ConnectedAccountCreateResponse, ConnectedAccountRetrieveResponse as ConnectedAccountRetrieveResponse$1, ConnectedAccountDeleteResponse, ConnectedAccountRefreshResponse, ConnectedAccountUpdateStatusParams, ConnectedAccountUpdateStatusResponse } from '@composio/client/resources/connected-accounts';
@@ -76,24 +75,61 @@ declare const ToolListParamsSchema: z.ZodObject<{
76
75
  important: z.ZodOptional<z.ZodString>;
77
76
  limit: z.ZodOptional<z.ZodString>;
78
77
  search: z.ZodOptional<z.ZodString>;
79
- toolkitSlug: z.ZodOptional<z.ZodString>;
80
- toolSlugs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
78
+ toolkits: z.ZodOptional<z.ZodString>;
79
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
81
80
  }, "strip", z.ZodTypeAny, {
82
81
  cursor?: string | undefined;
83
82
  important?: string | undefined;
84
83
  limit?: string | undefined;
85
84
  search?: string | undefined;
86
- toolkitSlug?: string | undefined;
87
- toolSlugs?: string[] | undefined;
85
+ toolkits?: string | undefined;
86
+ tools?: string[] | undefined;
88
87
  }, {
89
88
  cursor?: string | undefined;
90
89
  important?: string | undefined;
91
90
  limit?: string | undefined;
92
91
  search?: string | undefined;
93
- toolkitSlug?: string | undefined;
94
- toolSlugs?: string[] | undefined;
92
+ toolkits?: string | undefined;
93
+ tools?: string[] | undefined;
95
94
  }>;
96
95
  type ToolListParams = z.infer<typeof ToolListParamsSchema>;
96
+ /**
97
+ * CustomAuthParams is the parameters for the custom authentication.
98
+ */
99
+ declare const CustomAuthParamsSchema: z.ZodObject<{
100
+ baseURL: z.ZodOptional<z.ZodString>;
101
+ body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
102
+ parameters: z.ZodArray<z.ZodObject<{
103
+ in: z.ZodEnum<["query", "header"]>;
104
+ name: z.ZodString;
105
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
106
+ }, "strip", z.ZodTypeAny, {
107
+ name: string;
108
+ value: string | number;
109
+ in: "query" | "header";
110
+ }, {
111
+ name: string;
112
+ value: string | number;
113
+ in: "query" | "header";
114
+ }>, "many">;
115
+ }, "strip", z.ZodTypeAny, {
116
+ parameters: {
117
+ name: string;
118
+ value: string | number;
119
+ in: "query" | "header";
120
+ }[];
121
+ baseURL?: string | undefined;
122
+ body?: Record<string, unknown> | undefined;
123
+ }, {
124
+ parameters: {
125
+ name: string;
126
+ value: string | number;
127
+ in: "query" | "header";
128
+ }[];
129
+ baseURL?: string | undefined;
130
+ body?: Record<string, unknown> | undefined;
131
+ }>;
132
+ type CustomAuthParams = z.infer<typeof CustomAuthParamsSchema>;
97
133
  /**
98
134
  * ToolExecuteParams is the parameters for the tool execution.
99
135
  */
@@ -264,22 +300,112 @@ declare class CustomTools {
264
300
  executeCustomTool(slug: string, inputParams: Record<string, unknown>, metadata: ExecuteMetadata): Promise<ToolExecuteResponse>;
265
301
  }
266
302
 
267
- declare abstract class BaseNonAgenticToolset<TToolCollection, TTool> {
268
- protected composio: Composio<BaseComposioToolset<TToolCollection, TTool>> | undefined;
269
- setComposio(composio: Composio<BaseComposioToolset<TToolCollection, TTool>>): void;
270
- abstract getTools(userId: string, params: ToolListParams, options?: ToolOptions): Promise<TToolCollection>;
271
- abstract getToolBySlug(userId: string, slug: string, options?: ToolOptions): Promise<TTool>;
303
+ /**
304
+ * Base toolset implementation, which needs to be implemented by the extended class.
305
+ * This class is used to create a base toolset by implementing this class.
306
+ * This class also extends InstrumentedInstance, so that the telemetry can be instrumented for the toolset.
307
+ */
308
+ interface Toolset<TTool, TToolCollection> {
309
+ wrapTool: (tool: Tool) => TTool;
310
+ getTools: (params?: ToolListParams) => Promise<TToolCollection>;
311
+ }
312
+ type ExecuteToolFnOptions = {
313
+ connectedAccountId?: string;
314
+ customAuthParams?: CustomAuthParams;
315
+ };
316
+ /**
317
+ * This type is used to infer the wrapped tool type from the toolset.
318
+ * It checks if the toolset has a method `_wrapTool` and infers the return type.
319
+ */
320
+ type ExecuteToolFn = (toolSlug: string, input: Record<string, unknown>) => Promise<ToolExecuteResponse>;
321
+ type GlobalExecuteToolFn = (slug: string, body: ToolExecuteParams, modifiers?: ExecuteToolModifiers) => Promise<ToolExecuteResponse>;
322
+
323
+ /**
324
+ * @internal
325
+ * Base class for all toolsets.
326
+ * This class is not meant to be used directly, but rather to be extended by different toolset implementations.
327
+ */
328
+ declare abstract class BaseToolset {
329
+ /**
330
+ * @public
331
+ * The name of the toolset.
332
+ * Used to identify the toolset in the telemetry.
333
+ */
334
+ abstract readonly name: string;
335
+ /**
336
+ * @internal
337
+ * Whether the toolset is agentic.
338
+ * This is set automatically set by the core SDK implementation for different toolset types.
339
+ */
340
+ abstract readonly _isAgentic: boolean;
341
+ /**
342
+ * @internal
343
+ * The function to execute a tool.
344
+ * This is set automatically injected by the core SDK.
345
+ */
346
+ private _globalExecuteToolFn;
347
+ /**
348
+ * @internal
349
+ * Set the function to execute a tool.
350
+ * This is set automatically injected by the core SDK.
351
+ */
352
+ _setExecuteToolFn(executeToolFn: GlobalExecuteToolFn): void;
353
+ /**
354
+ * @public
355
+ * Gloabl function to execute a tool.
356
+ * This function is used by toolset providers to implement helper functions to execute tools.
357
+ * This is a 1:1 mapping of the `execute` method in the `Tools` class.
358
+ * @param {string} toolSlug - The slug of the tool to execute.
359
+ * @param {Record<string, unknown>} input - The input to the tool.
360
+ * @returns {Promise<string>} The result of the tool execution.
361
+ */
362
+ executeTool(toolSlug: string, body: ToolExecuteParams, modifers?: ExecuteToolModifiers): Promise<ToolExecuteResponse>;
363
+ }
364
+ /**
365
+ * @public
366
+ * Base class for all non-agentic toolsets.
367
+ * This class is not meant to be used directly, but rather to be extended by concrete toolset implementations.
368
+ */
369
+ declare abstract class BaseNonAgenticToolset<TToolCollection, TTool> extends BaseToolset {
370
+ readonly _isAgentic = false;
371
+ /**
372
+ * Wrap a tool in the provider specific format.
373
+ * @param tool - The tool to wrap.
374
+ * @returns The wrapped tool.
375
+ */
272
376
  abstract wrapTool(tool: Tool): TTool;
273
- protected getComposio(): Composio<BaseComposioToolset<TToolCollection, TTool>>;
377
+ /**
378
+ * Wrap a list of tools in the provider specific format.
379
+ * @param tools - The tools to wrap.
380
+ * @returns The wrapped tools.
381
+ */
382
+ abstract wrapTools(tools: Tool[]): TToolCollection;
274
383
  }
275
- declare abstract class BaseAgenticToolset<TToolCollection, TTool> {
276
- protected composio: Composio<BaseComposioToolset<TToolCollection, TTool>> | undefined;
277
- setComposio(composio: Composio<BaseComposioToolset<TToolCollection, TTool>>): void;
278
- abstract getToolBySlug(userId: string, slug: string, options?: AgenticToolOptions): Promise<TTool>;
279
- abstract getTools(userId: string, params: ToolListParams, options?: AgenticToolOptions): Promise<TToolCollection>;
280
- abstract wrapTool(userId: string, tool: Tool, modifers?: ExecuteToolModifiers): TTool;
281
- protected getComposio(): Composio<BaseComposioToolset<TToolCollection, TTool>>;
384
+ /**
385
+ * @public
386
+ * Base class for all agentic toolsets.
387
+ * This class is not meant to be used directly, but rather to be extended by concrete toolset implementations.
388
+ */
389
+ declare abstract class BaseAgenticToolset<TToolCollection, TTool> extends BaseToolset {
390
+ readonly _isAgentic = true;
391
+ /**
392
+ * Wrap a tool in the provider specific format.
393
+ * @param tool - The tool to wrap.
394
+ * @returns The wrapped tool.
395
+ */
396
+ abstract wrapTool(tool: Tool, executeTool: ExecuteToolFn): TTool;
397
+ /**
398
+ * Wrap a list of tools in the provider specific format.
399
+ * @param tools - The tools to wrap.
400
+ * @returns The wrapped tools.
401
+ */
402
+ abstract wrapTools(tools: Tool[], executeTool: ExecuteToolFn): TToolCollection;
282
403
  }
404
+ /**
405
+ * @internal
406
+ * Base type for all toolsets.
407
+ * This type is used to infer the type of the toolset from the toolset implementation.
408
+ */
283
409
  type BaseComposioToolset<TToolCollection, TTool> = BaseNonAgenticToolset<TToolCollection, TTool> | BaseAgenticToolset<TToolCollection, TTool>;
284
410
 
285
411
  /**
@@ -366,7 +492,7 @@ declare class Tools<TToolCollection, TTool, TToolset extends BaseComposioToolset
366
492
  * This method fetches the tools from the Composio API and wraps them using the toolset.
367
493
  * @returns {ToolList} List of tools
368
494
  */
369
- getComposioTools(userId: string, query?: ToolListParams$1, modifier?: TransformToolSchemaModifier): Promise<ToolList>;
495
+ getComposioTools(userId: string, query?: ToolListParams, modifier?: TransformToolSchemaModifier): Promise<ToolList>;
370
496
  /**
371
497
  * Retrieves a tool by its Slug.
372
498
  * @param slug The ID of the tool to be retrieved
@@ -374,7 +500,15 @@ declare class Tools<TToolCollection, TTool, TToolset extends BaseComposioToolset
374
500
  */
375
501
  getComposioToolBySlug(userId: string, slug: string, modifier?: TransformToolSchemaModifier): Promise<Tool>;
376
502
  get(userId: string, slug: string, options?: ToolsetOptions<TToolset>): Promise<TTool>;
377
- get(userId: string, filters: ToolListParams$1, options?: ToolsetOptions<TToolset>): Promise<TToolCollection>;
503
+ get(userId: string, filters: ToolListParams, options?: ToolsetOptions<TToolset>): Promise<TToolCollection>;
504
+ /**
505
+ * Creates a function that executes a tool.
506
+ * This function is used by agentic the toolsets to execute the tool
507
+ * @param {string} userId - The user id
508
+ * @param {ExecuteToolModifiers} modifiers - The modifiers to be applied to the tool
509
+ * @returns {ExecuteToolFn} The execute tool function
510
+ */
511
+ private createExecuteToolFn;
378
512
  /**
379
513
  * Exectes a given tool with the provided parameters.
380
514
  *
@@ -417,6 +551,608 @@ declare class Tools<TToolCollection, TTool, TToolset extends BaseComposioToolset
417
551
  createCustomTool(body: CustomToolOptions): Promise<Tool>;
418
552
  }
419
553
 
554
+ declare const ToolkitsListParamsSchema: z.ZodObject<{
555
+ category: z.ZodOptional<z.ZodString>;
556
+ isLocal: z.ZodOptional<z.ZodBoolean>;
557
+ managedBy: z.ZodOptional<z.ZodEnum<["all", "composio_managed", "project_managed"]>>;
558
+ sortBy: z.ZodOptional<z.ZodEnum<["usage", "alphabetically"]>>;
559
+ }, "strip", z.ZodTypeAny, {
560
+ category?: string | undefined;
561
+ isLocal?: boolean | undefined;
562
+ managedBy?: "all" | "composio_managed" | "project_managed" | undefined;
563
+ sortBy?: "usage" | "alphabetically" | undefined;
564
+ }, {
565
+ category?: string | undefined;
566
+ isLocal?: boolean | undefined;
567
+ managedBy?: "all" | "composio_managed" | "project_managed" | undefined;
568
+ sortBy?: "usage" | "alphabetically" | undefined;
569
+ }>;
570
+ type ToolkitListParams = z.infer<typeof ToolkitsListParamsSchema>;
571
+ declare const ToolKitListResponseSchema: z.ZodObject<{
572
+ items: z.ZodArray<z.ZodObject<{
573
+ name: z.ZodString;
574
+ slug: z.ZodString;
575
+ meta: z.ZodObject<{
576
+ categories: z.ZodArray<z.ZodObject<{
577
+ id: z.ZodString;
578
+ name: z.ZodString;
579
+ }, "strip", z.ZodTypeAny, {
580
+ name: string;
581
+ id: string;
582
+ }, {
583
+ name: string;
584
+ id: string;
585
+ }>, "many">;
586
+ createdAt: z.ZodString;
587
+ description: z.ZodString;
588
+ logo: z.ZodString;
589
+ toolsCount: z.ZodNumber;
590
+ triggersCount: z.ZodNumber;
591
+ updatedAt: z.ZodString;
592
+ }, "strip", z.ZodTypeAny, {
593
+ logo: string;
594
+ description: string;
595
+ categories: {
596
+ name: string;
597
+ id: string;
598
+ }[];
599
+ createdAt: string;
600
+ toolsCount: number;
601
+ triggersCount: number;
602
+ updatedAt: string;
603
+ }, {
604
+ logo: string;
605
+ description: string;
606
+ categories: {
607
+ name: string;
608
+ id: string;
609
+ }[];
610
+ createdAt: string;
611
+ toolsCount: number;
612
+ triggersCount: number;
613
+ updatedAt: string;
614
+ }>;
615
+ isLocalToolkit: z.ZodBoolean;
616
+ authSchemes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
617
+ composioManagedAuthSchemes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
618
+ noAuth: z.ZodOptional<z.ZodBoolean>;
619
+ }, "strip", z.ZodTypeAny, {
620
+ slug: string;
621
+ name: string;
622
+ meta: {
623
+ logo: string;
624
+ description: string;
625
+ categories: {
626
+ name: string;
627
+ id: string;
628
+ }[];
629
+ createdAt: string;
630
+ toolsCount: number;
631
+ triggersCount: number;
632
+ updatedAt: string;
633
+ };
634
+ isLocalToolkit: boolean;
635
+ authSchemes?: string[] | undefined;
636
+ composioManagedAuthSchemes?: string[] | undefined;
637
+ noAuth?: boolean | undefined;
638
+ }, {
639
+ slug: string;
640
+ name: string;
641
+ meta: {
642
+ logo: string;
643
+ description: string;
644
+ categories: {
645
+ name: string;
646
+ id: string;
647
+ }[];
648
+ createdAt: string;
649
+ toolsCount: number;
650
+ triggersCount: number;
651
+ updatedAt: string;
652
+ };
653
+ isLocalToolkit: boolean;
654
+ authSchemes?: string[] | undefined;
655
+ composioManagedAuthSchemes?: string[] | undefined;
656
+ noAuth?: boolean | undefined;
657
+ }>, "many">;
658
+ nextCursor: z.ZodNullable<z.ZodString>;
659
+ totalPages: z.ZodNumber;
660
+ }, "strip", z.ZodTypeAny, {
661
+ items: {
662
+ slug: string;
663
+ name: string;
664
+ meta: {
665
+ logo: string;
666
+ description: string;
667
+ categories: {
668
+ name: string;
669
+ id: string;
670
+ }[];
671
+ createdAt: string;
672
+ toolsCount: number;
673
+ triggersCount: number;
674
+ updatedAt: string;
675
+ };
676
+ isLocalToolkit: boolean;
677
+ authSchemes?: string[] | undefined;
678
+ composioManagedAuthSchemes?: string[] | undefined;
679
+ noAuth?: boolean | undefined;
680
+ }[];
681
+ nextCursor: string | null;
682
+ totalPages: number;
683
+ }, {
684
+ items: {
685
+ slug: string;
686
+ name: string;
687
+ meta: {
688
+ logo: string;
689
+ description: string;
690
+ categories: {
691
+ name: string;
692
+ id: string;
693
+ }[];
694
+ createdAt: string;
695
+ toolsCount: number;
696
+ triggersCount: number;
697
+ updatedAt: string;
698
+ };
699
+ isLocalToolkit: boolean;
700
+ authSchemes?: string[] | undefined;
701
+ composioManagedAuthSchemes?: string[] | undefined;
702
+ noAuth?: boolean | undefined;
703
+ }[];
704
+ nextCursor: string | null;
705
+ totalPages: number;
706
+ }>;
707
+ type ToolKitListResponse = z.infer<typeof ToolKitListResponseSchema>;
708
+ declare const ToolkitRetrieveResponseSchema: z.ZodObject<{
709
+ name: z.ZodString;
710
+ slug: z.ZodString;
711
+ meta: z.ZodObject<{
712
+ categories: z.ZodArray<z.ZodObject<{
713
+ id: z.ZodString;
714
+ name: z.ZodString;
715
+ }, "strip", z.ZodTypeAny, {
716
+ name: string;
717
+ id: string;
718
+ }, {
719
+ name: string;
720
+ id: string;
721
+ }>, "many">;
722
+ createdAt: z.ZodString;
723
+ description: z.ZodString;
724
+ logo: z.ZodString;
725
+ toolsCount: z.ZodNumber;
726
+ triggersCount: z.ZodNumber;
727
+ updatedAt: z.ZodString;
728
+ }, "strip", z.ZodTypeAny, {
729
+ logo: string;
730
+ description: string;
731
+ categories: {
732
+ name: string;
733
+ id: string;
734
+ }[];
735
+ createdAt: string;
736
+ toolsCount: number;
737
+ triggersCount: number;
738
+ updatedAt: string;
739
+ }, {
740
+ logo: string;
741
+ description: string;
742
+ categories: {
743
+ name: string;
744
+ id: string;
745
+ }[];
746
+ createdAt: string;
747
+ toolsCount: number;
748
+ triggersCount: number;
749
+ updatedAt: string;
750
+ }>;
751
+ isLocalToolkit: z.ZodBoolean;
752
+ composioManagedAuthSchemes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
753
+ authConfigDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
754
+ name: z.ZodString;
755
+ mode: z.ZodString;
756
+ fields: z.ZodArray<z.ZodObject<{
757
+ authConfigCreation: z.ZodObject<{
758
+ optional: z.ZodArray<z.ZodObject<{
759
+ name: z.ZodString;
760
+ displayName: z.ZodString;
761
+ type: z.ZodString;
762
+ default: z.ZodOptional<z.ZodNullable<z.ZodString>>;
763
+ }, "strip", z.ZodTypeAny, {
764
+ name: string;
765
+ type: string;
766
+ displayName: string;
767
+ default?: string | null | undefined;
768
+ }, {
769
+ name: string;
770
+ type: string;
771
+ displayName: string;
772
+ default?: string | null | undefined;
773
+ }>, "many">;
774
+ required: z.ZodArray<z.ZodObject<{
775
+ name: z.ZodString;
776
+ displayName: z.ZodString;
777
+ type: z.ZodString;
778
+ default: z.ZodOptional<z.ZodNullable<z.ZodString>>;
779
+ }, "strip", z.ZodTypeAny, {
780
+ name: string;
781
+ type: string;
782
+ displayName: string;
783
+ default?: string | null | undefined;
784
+ }, {
785
+ name: string;
786
+ type: string;
787
+ displayName: string;
788
+ default?: string | null | undefined;
789
+ }>, "many">;
790
+ }, "strip", z.ZodTypeAny, {
791
+ required: {
792
+ name: string;
793
+ type: string;
794
+ displayName: string;
795
+ default?: string | null | undefined;
796
+ }[];
797
+ optional: {
798
+ name: string;
799
+ type: string;
800
+ displayName: string;
801
+ default?: string | null | undefined;
802
+ }[];
803
+ }, {
804
+ required: {
805
+ name: string;
806
+ type: string;
807
+ displayName: string;
808
+ default?: string | null | undefined;
809
+ }[];
810
+ optional: {
811
+ name: string;
812
+ type: string;
813
+ displayName: string;
814
+ default?: string | null | undefined;
815
+ }[];
816
+ }>;
817
+ connectedAccountInitiation: z.ZodObject<{
818
+ optional: z.ZodArray<z.ZodObject<{
819
+ name: z.ZodString;
820
+ displayName: z.ZodString;
821
+ type: z.ZodString;
822
+ default: z.ZodOptional<z.ZodNullable<z.ZodString>>;
823
+ }, "strip", z.ZodTypeAny, {
824
+ name: string;
825
+ type: string;
826
+ displayName: string;
827
+ default?: string | null | undefined;
828
+ }, {
829
+ name: string;
830
+ type: string;
831
+ displayName: string;
832
+ default?: string | null | undefined;
833
+ }>, "many">;
834
+ required: z.ZodArray<z.ZodObject<{
835
+ name: z.ZodString;
836
+ displayName: z.ZodString;
837
+ type: z.ZodString;
838
+ default: z.ZodOptional<z.ZodNullable<z.ZodString>>;
839
+ }, "strip", z.ZodTypeAny, {
840
+ name: string;
841
+ type: string;
842
+ displayName: string;
843
+ default?: string | null | undefined;
844
+ }, {
845
+ name: string;
846
+ type: string;
847
+ displayName: string;
848
+ default?: string | null | undefined;
849
+ }>, "many">;
850
+ }, "strip", z.ZodTypeAny, {
851
+ required: {
852
+ name: string;
853
+ type: string;
854
+ displayName: string;
855
+ default?: string | null | undefined;
856
+ }[];
857
+ optional: {
858
+ name: string;
859
+ type: string;
860
+ displayName: string;
861
+ default?: string | null | undefined;
862
+ }[];
863
+ }, {
864
+ required: {
865
+ name: string;
866
+ type: string;
867
+ displayName: string;
868
+ default?: string | null | undefined;
869
+ }[];
870
+ optional: {
871
+ name: string;
872
+ type: string;
873
+ displayName: string;
874
+ default?: string | null | undefined;
875
+ }[];
876
+ }>;
877
+ }, "strip", z.ZodTypeAny, {
878
+ authConfigCreation: {
879
+ required: {
880
+ name: string;
881
+ type: string;
882
+ displayName: string;
883
+ default?: string | null | undefined;
884
+ }[];
885
+ optional: {
886
+ name: string;
887
+ type: string;
888
+ displayName: string;
889
+ default?: string | null | undefined;
890
+ }[];
891
+ };
892
+ connectedAccountInitiation: {
893
+ required: {
894
+ name: string;
895
+ type: string;
896
+ displayName: string;
897
+ default?: string | null | undefined;
898
+ }[];
899
+ optional: {
900
+ name: string;
901
+ type: string;
902
+ displayName: string;
903
+ default?: string | null | undefined;
904
+ }[];
905
+ };
906
+ }, {
907
+ authConfigCreation: {
908
+ required: {
909
+ name: string;
910
+ type: string;
911
+ displayName: string;
912
+ default?: string | null | undefined;
913
+ }[];
914
+ optional: {
915
+ name: string;
916
+ type: string;
917
+ displayName: string;
918
+ default?: string | null | undefined;
919
+ }[];
920
+ };
921
+ connectedAccountInitiation: {
922
+ required: {
923
+ name: string;
924
+ type: string;
925
+ displayName: string;
926
+ default?: string | null | undefined;
927
+ }[];
928
+ optional: {
929
+ name: string;
930
+ type: string;
931
+ displayName: string;
932
+ default?: string | null | undefined;
933
+ }[];
934
+ };
935
+ }>, "many">;
936
+ proxy: z.ZodObject<{
937
+ baseUrul: z.ZodString;
938
+ }, "strip", z.ZodTypeAny, {
939
+ baseUrul: string;
940
+ }, {
941
+ baseUrul: string;
942
+ }>;
943
+ }, "strip", z.ZodTypeAny, {
944
+ name: string;
945
+ mode: string;
946
+ fields: {
947
+ authConfigCreation: {
948
+ required: {
949
+ name: string;
950
+ type: string;
951
+ displayName: string;
952
+ default?: string | null | undefined;
953
+ }[];
954
+ optional: {
955
+ name: string;
956
+ type: string;
957
+ displayName: string;
958
+ default?: string | null | undefined;
959
+ }[];
960
+ };
961
+ connectedAccountInitiation: {
962
+ required: {
963
+ name: string;
964
+ type: string;
965
+ displayName: string;
966
+ default?: string | null | undefined;
967
+ }[];
968
+ optional: {
969
+ name: string;
970
+ type: string;
971
+ displayName: string;
972
+ default?: string | null | undefined;
973
+ }[];
974
+ };
975
+ }[];
976
+ proxy: {
977
+ baseUrul: string;
978
+ };
979
+ }, {
980
+ name: string;
981
+ mode: string;
982
+ fields: {
983
+ authConfigCreation: {
984
+ required: {
985
+ name: string;
986
+ type: string;
987
+ displayName: string;
988
+ default?: string | null | undefined;
989
+ }[];
990
+ optional: {
991
+ name: string;
992
+ type: string;
993
+ displayName: string;
994
+ default?: string | null | undefined;
995
+ }[];
996
+ };
997
+ connectedAccountInitiation: {
998
+ required: {
999
+ name: string;
1000
+ type: string;
1001
+ displayName: string;
1002
+ default?: string | null | undefined;
1003
+ }[];
1004
+ optional: {
1005
+ name: string;
1006
+ type: string;
1007
+ displayName: string;
1008
+ default?: string | null | undefined;
1009
+ }[];
1010
+ };
1011
+ }[];
1012
+ proxy: {
1013
+ baseUrul: string;
1014
+ };
1015
+ }>, "many">>;
1016
+ }, "strip", z.ZodTypeAny, {
1017
+ slug: string;
1018
+ name: string;
1019
+ meta: {
1020
+ logo: string;
1021
+ description: string;
1022
+ categories: {
1023
+ name: string;
1024
+ id: string;
1025
+ }[];
1026
+ createdAt: string;
1027
+ toolsCount: number;
1028
+ triggersCount: number;
1029
+ updatedAt: string;
1030
+ };
1031
+ isLocalToolkit: boolean;
1032
+ composioManagedAuthSchemes?: string[] | undefined;
1033
+ authConfigDetails?: {
1034
+ name: string;
1035
+ mode: string;
1036
+ fields: {
1037
+ authConfigCreation: {
1038
+ required: {
1039
+ name: string;
1040
+ type: string;
1041
+ displayName: string;
1042
+ default?: string | null | undefined;
1043
+ }[];
1044
+ optional: {
1045
+ name: string;
1046
+ type: string;
1047
+ displayName: string;
1048
+ default?: string | null | undefined;
1049
+ }[];
1050
+ };
1051
+ connectedAccountInitiation: {
1052
+ required: {
1053
+ name: string;
1054
+ type: string;
1055
+ displayName: string;
1056
+ default?: string | null | undefined;
1057
+ }[];
1058
+ optional: {
1059
+ name: string;
1060
+ type: string;
1061
+ displayName: string;
1062
+ default?: string | null | undefined;
1063
+ }[];
1064
+ };
1065
+ }[];
1066
+ proxy: {
1067
+ baseUrul: string;
1068
+ };
1069
+ }[] | undefined;
1070
+ }, {
1071
+ slug: string;
1072
+ name: string;
1073
+ meta: {
1074
+ logo: string;
1075
+ description: string;
1076
+ categories: {
1077
+ name: string;
1078
+ id: string;
1079
+ }[];
1080
+ createdAt: string;
1081
+ toolsCount: number;
1082
+ triggersCount: number;
1083
+ updatedAt: string;
1084
+ };
1085
+ isLocalToolkit: boolean;
1086
+ composioManagedAuthSchemes?: string[] | undefined;
1087
+ authConfigDetails?: {
1088
+ name: string;
1089
+ mode: string;
1090
+ fields: {
1091
+ authConfigCreation: {
1092
+ required: {
1093
+ name: string;
1094
+ type: string;
1095
+ displayName: string;
1096
+ default?: string | null | undefined;
1097
+ }[];
1098
+ optional: {
1099
+ name: string;
1100
+ type: string;
1101
+ displayName: string;
1102
+ default?: string | null | undefined;
1103
+ }[];
1104
+ };
1105
+ connectedAccountInitiation: {
1106
+ required: {
1107
+ name: string;
1108
+ type: string;
1109
+ displayName: string;
1110
+ default?: string | null | undefined;
1111
+ }[];
1112
+ optional: {
1113
+ name: string;
1114
+ type: string;
1115
+ displayName: string;
1116
+ default?: string | null | undefined;
1117
+ }[];
1118
+ };
1119
+ }[];
1120
+ proxy: {
1121
+ baseUrul: string;
1122
+ };
1123
+ }[] | undefined;
1124
+ }>;
1125
+ type ToolkitRetrieveResponse = z.infer<typeof ToolkitRetrieveResponseSchema>;
1126
+ declare const ToolkitRetrieveCategoriesResponseSchema: z.ZodObject<{
1127
+ items: z.ZodArray<z.ZodObject<{
1128
+ id: z.ZodString;
1129
+ name: z.ZodString;
1130
+ }, "strip", z.ZodTypeAny, {
1131
+ name: string;
1132
+ id: string;
1133
+ }, {
1134
+ name: string;
1135
+ id: string;
1136
+ }>, "many">;
1137
+ nextCursor: z.ZodNullable<z.ZodString>;
1138
+ totalPages: z.ZodNumber;
1139
+ }, "strip", z.ZodTypeAny, {
1140
+ items: {
1141
+ name: string;
1142
+ id: string;
1143
+ }[];
1144
+ nextCursor: string | null;
1145
+ totalPages: number;
1146
+ }, {
1147
+ items: {
1148
+ name: string;
1149
+ id: string;
1150
+ }[];
1151
+ nextCursor: string | null;
1152
+ totalPages: number;
1153
+ }>;
1154
+ type ToolkitRetrieveCategoriesResponse = z.infer<typeof ToolkitRetrieveCategoriesResponseSchema>;
1155
+
420
1156
  /**
421
1157
  * Toolkits class
422
1158
  *
@@ -431,7 +1167,7 @@ declare class Toolkits {
431
1167
  * This method fetches the toolkits from the Composio API.
432
1168
  * @returns {Promise<Toolkit[]>} List of toolkits
433
1169
  */
434
- getToolkits(query: ToolkitListParams, options?: RequestOptions): Promise<ToolkitListResponse>;
1170
+ private getToolkits;
435
1171
  /**
436
1172
  * Fetches a toolkit by its Slug.
437
1173
  * This method retrieves the toolkit from the Composio API.
@@ -439,13 +1175,27 @@ declare class Toolkits {
439
1175
  * @param options - Request options
440
1176
  * @returns {Promise<ToolkitRetrieveResponse>} The toolkit object
441
1177
  */
442
- getToolkitBySlug(slug: string, options?: RequestOptions): Promise<ToolkitRetrieveResponse>;
1178
+ private getToolkitBySlug;
1179
+ /**
1180
+ * @overload
1181
+ * Fetches a toolkit by its Slug or a list of toolkits.
1182
+ * @param slug - The ID of the toolkit to be retrieved
1183
+ * @returns {Promise<ToolkitRetrieveResponse>} The toolkit object
1184
+ */
1185
+ get(slug: string): Promise<ToolkitRetrieveResponse>;
1186
+ /**
1187
+ * @overload
1188
+ * Fetches a list of toolkits.
1189
+ * @param query - The parameters to fetch the toolkits
1190
+ * @returns {Promise<ToolKitListResponse>} The list of toolkits
1191
+ */
1192
+ get(query: ToolkitListParams): Promise<ToolKitListResponse>;
443
1193
  /**
444
1194
  * Fetches all categories available in the Composio SDK
445
1195
  *
446
1196
  * @returns {Promise<ToolkitRetrieveCategoriesResponse>} List of categories
447
1197
  */
448
- listCategories(options?: RequestOptions): Promise<ToolkitRetrieveCategoriesResponse>;
1198
+ listCategories(): Promise<ToolkitRetrieveCategoriesResponse>;
449
1199
  }
450
1200
 
451
1201
  type TriggerStatusEnum = "enable" | "disable";
@@ -678,47 +1428,18 @@ declare const ConnectedAccountStatuses: {
678
1428
  readonly FAILED: "FAILED";
679
1429
  };
680
1430
  type ConnectedAccountStatus = (typeof ConnectedAccountStatuses)[keyof typeof ConnectedAccountStatuses];
681
- declare const CreateConnectedAccountParamsSchema: z.ZodObject<{
682
- authConfig: z.ZodObject<{
683
- id: z.ZodString;
684
- }, "strip", z.ZodTypeAny, {
685
- id: string;
686
- }, {
687
- id: string;
688
- }>;
689
- connection: z.ZodObject<{
690
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
691
- rediretUrl: z.ZodOptional<z.ZodString>;
692
- userId: z.ZodOptional<z.ZodString>;
693
- }, "strip", z.ZodTypeAny, {
694
- userId?: string | undefined;
695
- data?: Record<string, unknown> | undefined;
696
- rediretUrl?: string | undefined;
697
- }, {
698
- userId?: string | undefined;
699
- data?: Record<string, unknown> | undefined;
700
- rediretUrl?: string | undefined;
701
- }>;
1431
+ type CreateConnectedAccountOptions = z.infer<typeof CreateConnectedAccountOptionsSchema>;
1432
+ declare const CreateConnectedAccountOptionsSchema: z.ZodObject<{
1433
+ redirectUrl: z.ZodOptional<z.ZodString>;
1434
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
702
1435
  }, "strip", z.ZodTypeAny, {
703
- authConfig: {
704
- id: string;
705
- };
706
- connection: {
707
- userId?: string | undefined;
708
- data?: Record<string, unknown> | undefined;
709
- rediretUrl?: string | undefined;
710
- };
1436
+ data?: Record<string, unknown> | undefined;
1437
+ redirectUrl?: string | undefined;
711
1438
  }, {
712
- authConfig: {
713
- id: string;
714
- };
715
- connection: {
716
- userId?: string | undefined;
717
- data?: Record<string, unknown> | undefined;
718
- rediretUrl?: string | undefined;
719
- };
1439
+ data?: Record<string, unknown> | undefined;
1440
+ redirectUrl?: string | undefined;
720
1441
  }>;
721
- type CreateConnectedAccountParams = z.infer<typeof CreateConnectedAccountParamsSchema>;
1442
+ type CreateConnectedAccountOptionsSchema = z.infer<typeof CreateConnectedAccountOptionsSchema>;
722
1443
  declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
723
1444
  id: z.ZodString;
724
1445
  uuid: z.ZodString;
@@ -763,6 +1484,8 @@ declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
763
1484
  userId: string;
764
1485
  data: Record<string, unknown>;
765
1486
  id: string;
1487
+ createdAt: string;
1488
+ updatedAt: string;
766
1489
  authConfig: {
767
1490
  id: string;
768
1491
  authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
@@ -772,8 +1495,6 @@ declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
772
1495
  isDisabled: boolean;
773
1496
  uuid: string;
774
1497
  statusReason: string | null;
775
- createdAt: string;
776
- updatedAt: string;
777
1498
  testRequestEndpoint?: string | undefined;
778
1499
  }, {
779
1500
  params: Record<string, unknown>;
@@ -784,6 +1505,8 @@ declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
784
1505
  userId: string;
785
1506
  data: Record<string, unknown>;
786
1507
  id: string;
1508
+ createdAt: string;
1509
+ updatedAt: string;
787
1510
  authConfig: {
788
1511
  id: string;
789
1512
  authScheme: "NO_AUTH" | "OAUTH2" | "OAUTH1" | "OAUTH1A" | "API_KEY" | "BASIC" | "BILLCOM_AUTH" | "BEARER_TOKEN" | "GOOGLE_SERVICE_ACCOUNT" | "BASIC_WITH_JWT" | "COMPOSIO_LINK" | "CALCOM_AUTH" | "SNOWFLAKE";
@@ -793,8 +1516,6 @@ declare const ConnectedAccountRetrieveResponseSchema: z.ZodObject<{
793
1516
  isDisabled: boolean;
794
1517
  uuid: string;
795
1518
  statusReason: string | null;
796
- createdAt: string;
797
- updatedAt: string;
798
1519
  testRequestEndpoint?: string | undefined;
799
1520
  }>;
800
1521
  type ConnectedAccountRetrieveResponse = z.infer<typeof ConnectedAccountRetrieveResponseSchema>;
@@ -851,35 +1572,35 @@ declare class ConnectedAccounts {
851
1572
  * @param {RequestOptions} options - Request options
852
1573
  * @returns {Promise<ConnectedAccountListResponse>} List of connected accounts
853
1574
  */
854
- list(query?: ConnectedAccountListParams, options?: RequestOptions): Promise<ConnectedAccountListResponse>;
1575
+ list(query?: ConnectedAccountListParams): Promise<ConnectedAccountListResponse>;
855
1576
  /**
856
1577
  * Create a new connected account
857
1578
  * @param {ConnectedAccountCreateParams} data - Data for creating a new connected account
858
1579
  * @param {RequestOptions} options - Request options
859
1580
  * @returns {Promise<ConnectedAccountCreateResponse>} Created connected account
860
1581
  */
861
- create(data: ConnectedAccountCreateParams, options?: RequestOptions): Promise<ConnectedAccountCreateResponse>;
1582
+ create(data: ConnectedAccountCreateParams): Promise<ConnectedAccountCreateResponse>;
862
1583
  /**
863
1584
  * Get a connected account by nanoid
864
1585
  * @param {string} nanoid - Unique identifier of the connected account
865
1586
  * @param {RequestOptions} options - Request options
866
1587
  * @returns {Promise<ConnectedAccountRetrieveResponse>} Connected account details
867
1588
  */
868
- get(nanoid: string, options?: RequestOptions): Promise<ConnectedAccountRetrieveResponse$1>;
1589
+ get(nanoid: string): Promise<ConnectedAccountRetrieveResponse$1>;
869
1590
  /**
870
1591
  * Delete a connected account
871
1592
  * @param {string} nanoid - Unique identifier of the connected account to delete
872
1593
  * @param {RequestOptions} options - Request options
873
1594
  * @returns {Promise<ConnectedAccountDeleteResponse>} Response from deletion
874
1595
  */
875
- delete(nanoid: string, options?: RequestOptions): Promise<ConnectedAccountDeleteResponse>;
1596
+ delete(nanoid: string): Promise<ConnectedAccountDeleteResponse>;
876
1597
  /**
877
1598
  * Refresh a connected account's credentials
878
1599
  * @param {string} nanoid - Unique identifier of the connected account to refresh
879
1600
  * @param {RequestOptions} options - Request options
880
1601
  * @returns {Promise<ConnectedAccountRefreshResponse>} Refreshed connected account details
881
1602
  */
882
- refresh(nanoid: string, options?: RequestOptions): Promise<ConnectedAccountRefreshResponse>;
1603
+ refresh(nanoid: string): Promise<ConnectedAccountRefreshResponse>;
883
1604
  /**
884
1605
  * Update the status of a connected account
885
1606
  * @param {string} nanoid - Unique identifier of the connected account
@@ -887,21 +1608,21 @@ declare class ConnectedAccounts {
887
1608
  * @param {RequestOptions} options - Request options
888
1609
  * @returns {Promise<ConnectedAccountUpdateStatusResponse>} Updated connected account details
889
1610
  */
890
- updateStatus(nanoid: string, params: ConnectedAccountUpdateStatusParams, options?: RequestOptions): Promise<ConnectedAccountUpdateStatusResponse>;
1611
+ updateStatus(nanoid: string, params: ConnectedAccountUpdateStatusParams): Promise<ConnectedAccountUpdateStatusResponse>;
891
1612
  /**
892
1613
  * Enable a connected account
893
1614
  * @param {string} nanoid - Unique identifier of the connected account
894
1615
  * @param {RequestOptions} options - Request options
895
1616
  * @returns {Promise<ConnectedAccountUpdateStatusResponse>} Updated connected account details
896
1617
  */
897
- enable(nanoid: string, options?: RequestOptions): Promise<ConnectedAccountUpdateStatusResponse>;
1618
+ enable(nanoid: string): Promise<ConnectedAccountUpdateStatusResponse>;
898
1619
  /**
899
1620
  * Disable a connected account
900
1621
  * @param {string} nanoid - Unique identifier of the connected account
901
1622
  * @param {RequestOptions} options - Request options
902
1623
  * @returns {Promise<ConnectedAccountUpdateStatusResponse>} Updated connected account details
903
1624
  */
904
- disable(nanoid: string, options?: RequestOptions): Promise<ConnectedAccountUpdateStatusResponse>;
1625
+ disable(nanoid: string): Promise<ConnectedAccountUpdateStatusResponse>;
905
1626
  /**
906
1627
  * Compound function to create a new connected account.
907
1628
  * This function creates a new connected account and returns a connection request.
@@ -909,7 +1630,7 @@ declare class ConnectedAccounts {
909
1630
  * @param {CreateConnectedAccountParams} data - Data for creating a new connected account
910
1631
  * @returns {Promise<ConnectionRequest>} Connection request object
911
1632
  */
912
- createConnectedAccount(data: CreateConnectedAccountParams): Promise<ConnectionRequest>;
1633
+ createConnectedAccount(userId: string, authConfigId: string, options: CreateConnectedAccountOptions): Promise<ConnectionRequest>;
913
1634
  }
914
1635
 
915
1636
  type AcceptableJSONValue = Record<string, unknown> | Array<Record<string, unknown>> | string | number | boolean | null | undefined;
@@ -941,6 +1662,7 @@ declare abstract class BaseTelemetryTransport {
941
1662
  type OpenAiTool = OpenAI.ChatCompletionTool;
942
1663
  type OpenAiToolCollection = Array<OpenAiTool>;
943
1664
  declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection, OpenAiTool> {
1665
+ readonly name = "openai";
944
1666
  /**
945
1667
  * Absract method to wrap a tool in the toolset.
946
1668
  * This method is implemented by the toolset.
@@ -948,21 +1670,14 @@ declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection,
948
1670
  * @returns The wrapped tool.
949
1671
  */
950
1672
  wrapTool: (tool: Tool) => OpenAiTool;
951
- /**
952
- * Get all the tools from the Composio in OpenAI format.
953
- * @param params - The parameters for the tool list.
954
- * @param modifiers - Optional modifiers to transform tool schemas
955
- * @returns The tools.
956
- */
957
- getTools(userId: string, params?: ToolListParams, modifiers?: ToolOptions): Promise<OpenAiToolCollection>;
958
- getToolBySlug(userId: string, slug: string, modifiers?: ToolOptions): Promise<OpenAiTool>;
1673
+ wrapTools: (tools: Tool[]) => OpenAiToolCollection;
959
1674
  /**
960
1675
  * Execute a tool call.
961
1676
  * @param {OpenAI.ChatCompletionMessageToolCall} tool - The tool to execute.
962
1677
  * @param {string} userId - The user id.
963
1678
  * @returns {Promise<string>} The result of the tool call.
964
1679
  */
965
- executeToolCall(userId: string, tool: OpenAI.ChatCompletionMessageToolCall, modifiers?: ExecuteToolModifiers): Promise<string>;
1680
+ executeToolCall(userId: string, tool: OpenAI.ChatCompletionMessageToolCall, options: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<string>;
966
1681
  /**
967
1682
  * Handle the tool call from the assistant.
968
1683
  *
@@ -970,7 +1685,7 @@ declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection,
970
1685
  * @param {string} userId - The user id.
971
1686
  * @returns {Promise<string[]>} The results of the tool call.
972
1687
  */
973
- handleToolCall(userId: string, chatCompletion: OpenAI.ChatCompletion, modifiers?: ExecuteToolModifiers): Promise<string[]>;
1688
+ handleToolCall(userId: string, chatCompletion: OpenAI.ChatCompletion, options: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<string[]>;
974
1689
  /**
975
1690
  * Handles all the tool calls from the assistant.
976
1691
  *
@@ -978,7 +1693,7 @@ declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection,
978
1693
  * @param {string} userId - The user id.
979
1694
  * @returns {Promise<OpenAI.Beta.Threads.Runs.RunSubmitToolOutputsParams.ToolOutput[]>} The tool outputs.
980
1695
  */
981
- handleAssistantMessage(userId: string, run: OpenAI.Beta.Threads.Run, modifiers?: ExecuteToolModifiers): Promise<OpenAI.Beta.Threads.Runs.RunSubmitToolOutputsParams.ToolOutput[]>;
1696
+ handleAssistantMessage(userId: string, run: OpenAI.Beta.Threads.Run, options: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<OpenAI.Beta.Threads.Runs.RunSubmitToolOutputsParams.ToolOutput[]>;
982
1697
  /**
983
1698
  * Waits for the assistant stream and handles the tool calls.
984
1699
  *
@@ -988,7 +1703,7 @@ declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection,
988
1703
  * @param {string} userId - The user id.
989
1704
  * @returns {AsyncGenerator<OpenAI.Beta.Assistants.AssistantStreamEvent, void, unknown>} The run stream.
990
1705
  */
991
- waitAndHandleAssistantStreamToolCalls(userId: string, client: OpenAI, runStream: Stream<OpenAI.Beta.Assistants.AssistantStreamEvent>, thread: OpenAI.Beta.Threads.Thread, modifiers?: ExecuteToolModifiers): AsyncGenerator<OpenAI.Beta.Assistants.AssistantStreamEvent, void, unknown>;
1706
+ waitAndHandleAssistantStreamToolCalls(userId: string, client: OpenAI, runStream: Stream<OpenAI.Beta.Assistants.AssistantStreamEvent>, thread: OpenAI.Beta.Threads.Thread, options: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): AsyncGenerator<OpenAI.Beta.Assistants.AssistantStreamEvent, void, unknown>;
992
1707
  /**
993
1708
  * Waits for the assistant tool calls and handles them.
994
1709
  *
@@ -998,7 +1713,7 @@ declare class OpenAIToolset extends BaseNonAgenticToolset<OpenAiToolCollection,
998
1713
  * @param {string} userId - The user id.
999
1714
  * @returns {Promise<OpenAI.Beta.Threads.Run>} The run object.
1000
1715
  */
1001
- waitAndHandleAssistantToolCalls(userId: string, client: OpenAI, run: OpenAI.Beta.Threads.Run, thread: OpenAI.Beta.Threads.Thread, modifiers?: ExecuteToolModifiers): Promise<OpenAI.Beta.Threads.Runs.Run>;
1716
+ waitAndHandleAssistantToolCalls(userId: string, client: OpenAI, run: OpenAI.Beta.Threads.Run, thread: OpenAI.Beta.Threads.Thread, options: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<OpenAI.Beta.Threads.Runs.Run>;
1002
1717
  }
1003
1718
 
1004
1719
  type ComposioConfig<TToolset extends BaseComposioToolset<unknown, unknown> = OpenAIToolset> = {
@@ -1014,7 +1729,6 @@ type ComposioConfig<TToolset extends BaseComposioToolset<unknown, unknown> = Ope
1014
1729
  * It is used to initialize the Composio SDK and provide a global configuration.
1015
1730
  */
1016
1731
  declare class Composio<TToolset extends BaseComposioToolset<unknown, unknown> = OpenAIToolset> {
1017
- private readonly DEFAULT_USER_ID;
1018
1732
  /**
1019
1733
  * The Composio API client.
1020
1734
  * @type {ComposioClient}
@@ -1063,14 +1777,14 @@ declare class Composio<TToolset extends BaseComposioToolset<unknown, unknown> =
1063
1777
  * @param {ToolsetOptions<TToolset>} modifiers Modifiers to apply to the tools.
1064
1778
  * @returns {Promise<ReturnType<TToolset['getTools']>>} The tools from the toolset.
1065
1779
  */
1066
- getTools<T extends TToolset>(userId: string, filters: ToolListParams, modifiers?: ToolsetOptions<T>): Promise<ReturnType<T['getTools']>>;
1780
+ getTools<T extends TToolset>(userId: string, filters: ToolListParams, modifiers?: ToolsetOptions<T>): Promise<ReturnType<T['wrapTools']>>;
1067
1781
  /**
1068
1782
  * Fetch a tool from Composio by its slug.
1069
1783
  * @param {string} slug slug of the tool
1070
1784
  * @param {ToolsetOptions<TToolset>} modifiers to be applied to the tool
1071
1785
  * @returns {Promise<ReturnType<TToolset['getToolBySlug']>>} The tool from the toolset.
1072
1786
  */
1073
- getToolBySlug<T extends TToolset>(userId: string, slug: string, modifiers?: ToolsetOptions<T>): Promise<ReturnType<T['getToolBySlug']>>;
1787
+ getToolBySlug<T extends TToolset>(userId: string, slug: string, modifiers?: ToolsetOptions<T>): Promise<ReturnType<T['wrapTool']>>;
1074
1788
  }
1075
1789
 
1076
1790
  /**
@@ -1083,24 +1797,11 @@ interface CustomTool {
1083
1797
  name: string;
1084
1798
  }
1085
1799
  declare class ComposioToolset extends BaseNonAgenticToolset<Array<CustomTool>, CustomTool> {
1086
- readonly FILE_NAME: string;
1087
- constructor();
1800
+ readonly name = "ComposioToolset";
1088
1801
  wrapTool: (tool: Tool) => CustomTool;
1089
- getTools(userId: string, params?: ToolListParams, options?: ToolOptions): Promise<Array<CustomTool>>;
1090
- getToolBySlug(userId: string, slug: string, modifiers?: ToolOptions): Promise<CustomTool>;
1091
- test(): Promise<void>;
1802
+ wrapTools(tools: Tool[]): CustomTool[];
1092
1803
  }
1093
1804
 
1094
1805
  declare function jsonSchemaToModel(jsonSchema: Record<string, unknown>): z.ZodObject<Record<string, z.ZodTypeAny>>;
1095
1806
 
1096
- /**
1097
- * Base toolset implementation, which needs to be implemented by the extended class.
1098
- * This class is used to create a base toolset by implementing this class.
1099
- * This class also extends InstrumentedInstance, so that the telemetry can be instrumented for the toolset.
1100
- */
1101
- interface Toolset<TTool, TToolCollection> {
1102
- wrapTool: (tool: Tool) => TTool;
1103
- getTools: (params?: ToolListParams) => Promise<TToolCollection>;
1104
- }
1105
-
1106
- export { type AfterToolExecuteModifier, type AgenticToolOptions, BaseAgenticToolset, type BaseComposioToolset, BaseNonAgenticToolset, BaseTelemetryTransport, type BeforeToolExecuteModifier, Composio, ComposioToolset, type ExecuteMetadata, type ExecuteToolModifiers, OpenAIToolset, type Tool, type ToolListParams, ToolListParamsSchema, type ToolOptions, type Toolset, type TransformToolSchemaModifier, jsonSchemaToModel };
1807
+ export { type AfterToolExecuteModifier, type AgenticToolOptions, BaseAgenticToolset, type BaseComposioToolset, BaseNonAgenticToolset, BaseTelemetryTransport, type BeforeToolExecuteModifier, Composio, ComposioToolset, type ExecuteMetadata, type ExecuteToolFn, type ExecuteToolFnOptions, type ExecuteToolModifiers, OpenAIToolset, type Tool, type ToolExecuteParams, type ToolListParams, ToolListParamsSchema, type ToolOptions, type Toolset, type TransformToolSchemaModifier, jsonSchemaToModel };