@composio/core 0.2.3 → 0.2.5

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Sampark Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs CHANGED
@@ -2774,7 +2774,15 @@ var Tools = class {
2774
2774
  this.autoUploadDownloadFiles = config?.autoUploadDownloadFiles ?? true;
2775
2775
  this.toolkitVersions = config?.toolkitVersions ?? "latest";
2776
2776
  this.execute = this.execute.bind(this);
2777
- this.provider._setExecuteToolFn(this.execute);
2777
+ const providerExecuteToolFn = this.provider._isAgentic ? this.execute : (slug, body, modifiers) => this.execute(
2778
+ slug,
2779
+ {
2780
+ ...body,
2781
+ dangerouslySkipVersionCheck: body.dangerouslySkipVersionCheck ?? true
2782
+ },
2783
+ modifiers
2784
+ );
2785
+ this.provider._setExecuteToolFn(providerExecuteToolFn);
2778
2786
  this.getRawComposioToolBySlug = this.getRawComposioToolBySlug.bind(this);
2779
2787
  this.getRawComposioTools = this.getRawComposioTools.bind(this);
2780
2788
  telemetry.instrument(this, "Tools");
@@ -2796,7 +2804,7 @@ var Tools = class {
2796
2804
  inputParameters: tool.input_parameters,
2797
2805
  outputParameters: tool.output_parameters,
2798
2806
  availableVersions: tool.available_versions,
2799
- isDeprecated: tool.is_deprecated,
2807
+ isDeprecated: tool.deprecated?.is_deprecated ?? false,
2800
2808
  isNoAuth: tool.no_auth
2801
2809
  });
2802
2810
  }
@@ -5100,6 +5108,7 @@ var Triggers = class {
5100
5108
  cause: error,
5101
5109
  possibleFixes: [
5102
5110
  `Please check the trigger slug`,
5111
+ `Please check the provided version of toolkit has the trigger`,
5103
5112
  `Visit the toolkit page to see the available triggers`
5104
5113
  ]
5105
5114
  });
@@ -5157,7 +5166,8 @@ var Triggers = class {
5157
5166
  }
5158
5167
  const result = await this.client.triggerInstances.upsert(slug, {
5159
5168
  connected_account_id: connectedAccountId,
5160
- trigger_config: parsedBody.data.triggerConfig
5169
+ trigger_config: parsedBody.data.triggerConfig,
5170
+ toolkit_versions: this.toolkitVersions
5161
5171
  });
5162
5172
  return {
5163
5173
  triggerId: result.trigger_id
@@ -5228,21 +5238,23 @@ var Triggers = class {
5228
5238
  return transformTriggerTypeListResponse(result);
5229
5239
  }
5230
5240
  /**
5231
- * Retrieve a trigger type by its slug
5241
+ * Retrieve a trigger type by its slug for the provided version of the app
5242
+ * Use the global toolkit versions param when initializing composio to pass a toolkitversion
5232
5243
  *
5233
5244
  * @param {string} slug - The slug of the trigger type
5234
- * @param {RequestOptions} options - request options
5235
5245
  * @returns {Promise<TriggersTypeRetrieveResponse>} The trigger type object
5236
5246
  */
5237
5247
  async getType(slug) {
5238
- const result = await this.client.triggersTypes.retrieve(slug);
5248
+ const result = await this.client.triggersTypes.retrieve(slug, {
5249
+ // if the version is provided override the global version
5250
+ toolkit_versions: this.toolkitVersions
5251
+ });
5239
5252
  return transformTriggerTypeRetrieveResponse(result);
5240
5253
  }
5241
5254
  /**
5242
5255
  * Fetches the list of all the available trigger enums
5243
5256
  *
5244
5257
  * This method is used by the CLI where filters are not required.
5245
- * @param options
5246
5258
  * @returns
5247
5259
  */
5248
5260
  async listEnum() {
@@ -7356,7 +7368,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
7356
7368
  };
7357
7369
 
7358
7370
  // package.json
7359
- var version = "0.2.3";
7371
+ var version = "0.2.5";
7360
7372
 
7361
7373
  // src/models/Files.ts
7362
7374
  var Files = class {
package/dist/index.d.cts CHANGED
@@ -65053,10 +65053,10 @@ declare class Triggers<TProvider extends BaseComposioProvider<unknown, unknown,
65053
65053
  */
65054
65054
  listTypes(query?: TriggersTypeListParams): Promise<TriggersTypeListResponse>;
65055
65055
  /**
65056
- * Retrieve a trigger type by its slug
65056
+ * Retrieve a trigger type by its slug for the provided version of the app
65057
+ * Use the global toolkit versions param when initializing composio to pass a toolkitversion
65057
65058
  *
65058
65059
  * @param {string} slug - The slug of the trigger type
65059
- * @param {RequestOptions} options - request options
65060
65060
  * @returns {Promise<TriggersTypeRetrieveResponse>} The trigger type object
65061
65061
  */
65062
65062
  getType(slug: string): Promise<TriggersTypeRetrieveResponse>;
@@ -65064,7 +65064,6 @@ declare class Triggers<TProvider extends BaseComposioProvider<unknown, unknown,
65064
65064
  * Fetches the list of all the available trigger enums
65065
65065
  *
65066
65066
  * This method is used by the CLI where filters are not required.
65067
- * @param options
65068
65067
  * @returns
65069
65068
  */
65070
65069
  listEnum(): Promise<TriggersTypeRetrieveEnumResponse>;
package/dist/index.d.ts CHANGED
@@ -65053,10 +65053,10 @@ declare class Triggers<TProvider extends BaseComposioProvider<unknown, unknown,
65053
65053
  */
65054
65054
  listTypes(query?: TriggersTypeListParams): Promise<TriggersTypeListResponse>;
65055
65055
  /**
65056
- * Retrieve a trigger type by its slug
65056
+ * Retrieve a trigger type by its slug for the provided version of the app
65057
+ * Use the global toolkit versions param when initializing composio to pass a toolkitversion
65057
65058
  *
65058
65059
  * @param {string} slug - The slug of the trigger type
65059
- * @param {RequestOptions} options - request options
65060
65060
  * @returns {Promise<TriggersTypeRetrieveResponse>} The trigger type object
65061
65061
  */
65062
65062
  getType(slug: string): Promise<TriggersTypeRetrieveResponse>;
@@ -65064,7 +65064,6 @@ declare class Triggers<TProvider extends BaseComposioProvider<unknown, unknown,
65064
65064
  * Fetches the list of all the available trigger enums
65065
65065
  *
65066
65066
  * This method is used by the CLI where filters are not required.
65067
- * @param options
65068
65067
  * @returns
65069
65068
  */
65070
65069
  listEnum(): Promise<TriggersTypeRetrieveEnumResponse>;
package/dist/index.js CHANGED
@@ -2597,7 +2597,15 @@ var Tools = class {
2597
2597
  this.autoUploadDownloadFiles = config?.autoUploadDownloadFiles ?? true;
2598
2598
  this.toolkitVersions = config?.toolkitVersions ?? "latest";
2599
2599
  this.execute = this.execute.bind(this);
2600
- this.provider._setExecuteToolFn(this.execute);
2600
+ const providerExecuteToolFn = this.provider._isAgentic ? this.execute : (slug, body, modifiers) => this.execute(
2601
+ slug,
2602
+ {
2603
+ ...body,
2604
+ dangerouslySkipVersionCheck: body.dangerouslySkipVersionCheck ?? true
2605
+ },
2606
+ modifiers
2607
+ );
2608
+ this.provider._setExecuteToolFn(providerExecuteToolFn);
2601
2609
  this.getRawComposioToolBySlug = this.getRawComposioToolBySlug.bind(this);
2602
2610
  this.getRawComposioTools = this.getRawComposioTools.bind(this);
2603
2611
  telemetry.instrument(this, "Tools");
@@ -2619,7 +2627,7 @@ var Tools = class {
2619
2627
  inputParameters: tool.input_parameters,
2620
2628
  outputParameters: tool.output_parameters,
2621
2629
  availableVersions: tool.available_versions,
2622
- isDeprecated: tool.is_deprecated,
2630
+ isDeprecated: tool.deprecated?.is_deprecated ?? false,
2623
2631
  isNoAuth: tool.no_auth
2624
2632
  });
2625
2633
  }
@@ -4923,6 +4931,7 @@ var Triggers = class {
4923
4931
  cause: error,
4924
4932
  possibleFixes: [
4925
4933
  `Please check the trigger slug`,
4934
+ `Please check the provided version of toolkit has the trigger`,
4926
4935
  `Visit the toolkit page to see the available triggers`
4927
4936
  ]
4928
4937
  });
@@ -4980,7 +4989,8 @@ var Triggers = class {
4980
4989
  }
4981
4990
  const result = await this.client.triggerInstances.upsert(slug, {
4982
4991
  connected_account_id: connectedAccountId,
4983
- trigger_config: parsedBody.data.triggerConfig
4992
+ trigger_config: parsedBody.data.triggerConfig,
4993
+ toolkit_versions: this.toolkitVersions
4984
4994
  });
4985
4995
  return {
4986
4996
  triggerId: result.trigger_id
@@ -5051,21 +5061,23 @@ var Triggers = class {
5051
5061
  return transformTriggerTypeListResponse(result);
5052
5062
  }
5053
5063
  /**
5054
- * Retrieve a trigger type by its slug
5064
+ * Retrieve a trigger type by its slug for the provided version of the app
5065
+ * Use the global toolkit versions param when initializing composio to pass a toolkitversion
5055
5066
  *
5056
5067
  * @param {string} slug - The slug of the trigger type
5057
- * @param {RequestOptions} options - request options
5058
5068
  * @returns {Promise<TriggersTypeRetrieveResponse>} The trigger type object
5059
5069
  */
5060
5070
  async getType(slug) {
5061
- const result = await this.client.triggersTypes.retrieve(slug);
5071
+ const result = await this.client.triggersTypes.retrieve(slug, {
5072
+ // if the version is provided override the global version
5073
+ toolkit_versions: this.toolkitVersions
5074
+ });
5062
5075
  return transformTriggerTypeRetrieveResponse(result);
5063
5076
  }
5064
5077
  /**
5065
5078
  * Fetches the list of all the available trigger enums
5066
5079
  *
5067
5080
  * This method is used by the CLI where filters are not required.
5068
- * @param options
5069
5081
  * @returns
5070
5082
  */
5071
5083
  async listEnum() {
@@ -7179,7 +7191,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
7179
7191
  };
7180
7192
 
7181
7193
  // package.json
7182
- var version = "0.2.3";
7194
+ var version = "0.2.5";
7183
7195
 
7184
7196
  // src/models/Files.ts
7185
7197
  var Files = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composio/core",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -39,7 +39,7 @@
39
39
  "zod": ">=3.25.76 <5"
40
40
  },
41
41
  "dependencies": {
42
- "@composio/client": "0.1.0-alpha.38",
42
+ "@composio/client": "0.1.0-alpha.40",
43
43
  "@types/json-schema": "^7.0.15",
44
44
  "chalk": "^4.1.2",
45
45
  "openai": "^5.16.0",