@composio/core 0.6.10 → 0.6.11
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/{CustomTool-BpjZfEYa.d.cts → CustomTool-B1b2MXbO.d.cts} +1 -1
- package/dist/{CustomTool-Cyo1aJ2l.cjs → CustomTool-Cywkgg64.cjs} +28 -28
- package/dist/{CustomTool-AYNimqhf.mjs → CustomTool-D8cxWvi9.mjs} +1 -1
- package/dist/{CustomTool-w_JFqb4t.d.mts → CustomTool-VQMc17af.d.mts} +1 -1
- package/dist/{ComposioError-CYaI68Mo.cjs → FileModifierErrors-DuKpNYju.cjs} +74 -0
- package/dist/{ComposioError-ChkSdxqU.mjs → FileModifierErrors-LQwvd6pa.mjs} +51 -1
- package/dist/{Telemetry-CjVa99gU.mjs → Telemetry-BJ2KYlDT.mjs} +1 -1
- package/dist/{Telemetry-A89k5RTv.cjs → Telemetry-JZNofztq.cjs} +17 -17
- package/dist/{composio-HztGH0kt.d.mts → composio-D8u53qsy.d.mts} +161 -157
- package/dist/{composio-CQuG4JPT.d.cts → composio-ruMDVx1b.d.cts} +161 -157
- package/dist/{customTool.types-BxvwmFDN.d.cts → customTool.types-9jJUADW-.d.cts} +17 -51
- package/dist/{customTool.types-CBLEoQnI.d.mts → customTool.types-C6-M75bi.d.mts} +17 -51
- package/dist/experimental/index.cjs +2 -2
- package/dist/experimental/index.d.cts +2 -2
- package/dist/experimental/index.d.mts +3 -3
- package/dist/experimental/index.mjs +2 -2
- package/dist/{fileUtils.node-DF-AY0Td.cjs → fileUtils.node-DsDsZfEl.cjs} +74 -10
- package/dist/{fileUtils.node-BOZnseMe.mjs → fileUtils.node-mlBa5nwX.mjs} +67 -5
- package/dist/index.cjs +95 -101
- package/dist/index.d.cts +31 -7
- package/dist/index.d.mts +31 -7
- package/dist/index.mjs +34 -44
- package/dist/models/Files.node.cjs +9 -5
- package/dist/models/Files.node.d.cts +5 -1
- package/dist/models/Files.node.d.mts +5 -1
- package/dist/models/Files.node.mjs +9 -5
- package/dist/platform/node.mjs +7 -7
- package/dist/{tool.types-bencsexi.d.mts → tool.types-BGrE7Vqc.d.mts} +34 -21
- package/dist/{tool.types-BWc7GUrD.d.cts → tool.types-C5DMrBdm.d.cts} +34 -21
- package/dist/{types-CJQ9IGrf.d.cts → types-DZaf5VcY.d.cts} +2 -2
- package/dist/{types-BZc_R1DA.d.mts → types-WkBTUiQh.d.mts} +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.node.d.cts +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +4 -4
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.cts +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +4 -4
- package/dist/utils/modifiers/FileToolModifier.node.cjs +55 -24
- package/dist/utils/modifiers/FileToolModifier.node.d.cts +3 -2
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +3 -2
- package/dist/utils/modifiers/FileToolModifier.node.mjs +51 -20
- package/dist/utils/modifiers/FileToolModifier.workerd.d.cts +1 -1
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CQwRTUmo.cjs');
|
|
2
|
-
const
|
|
3
|
-
const require_CustomTool = require('./CustomTool-
|
|
4
|
-
const require_Telemetry = require('./Telemetry-
|
|
2
|
+
const require_FileModifierErrors = require('./FileModifierErrors-DuKpNYju.cjs');
|
|
3
|
+
const require_CustomTool = require('./CustomTool-Cywkgg64.cjs');
|
|
4
|
+
const require_Telemetry = require('./Telemetry-JZNofztq.cjs');
|
|
5
5
|
const require_buffer = require('./buffer-BjWptbNH.cjs');
|
|
6
6
|
let _composio_client = require("@composio/client");
|
|
7
7
|
_composio_client = require_chunk.__toESM(_composio_client);
|
|
@@ -1103,20 +1103,7 @@ const ConnectedAccountRefreshOptionsSchema = zod_v3.z.object({
|
|
|
1103
1103
|
redirectUrl: zod_v3.z.string().optional(),
|
|
1104
1104
|
validateCredentials: zod_v3.z.boolean().optional()
|
|
1105
1105
|
});
|
|
1106
|
-
const UpdateConnectedAccountParamsSchema = zod_v3.z.object({
|
|
1107
|
-
alias: zod_v3.z.string().optional(),
|
|
1108
|
-
connection: zod_v3.z.object({ state: zod_v3.z.object({
|
|
1109
|
-
authScheme: zod_v3.z.enum([
|
|
1110
|
-
"BEARER_TOKEN",
|
|
1111
|
-
"API_KEY",
|
|
1112
|
-
"BASIC",
|
|
1113
|
-
"BASIC_WITH_JWT",
|
|
1114
|
-
"GOOGLE_SERVICE_ACCOUNT",
|
|
1115
|
-
"SERVICE_ACCOUNT"
|
|
1116
|
-
]),
|
|
1117
|
-
val: zod_v3.z.record(zod_v3.z.unknown())
|
|
1118
|
-
}) }).optional()
|
|
1119
|
-
});
|
|
1106
|
+
const UpdateConnectedAccountParamsSchema = zod_v3.z.object({ enabled: zod_v3.z.boolean() });
|
|
1120
1107
|
|
|
1121
1108
|
//#endregion
|
|
1122
1109
|
//#region src/utils/transform.ts
|
|
@@ -1128,7 +1115,7 @@ function transform(raw) {
|
|
|
1128
1115
|
if (!result.success) {
|
|
1129
1116
|
const label = options?.label ? ` for ${options.label}` : "";
|
|
1130
1117
|
const issues = result.error.issues.map((issue) => ` - ${issue.path.join(".") || "parameter"}: ${issue.message}`).join("\n");
|
|
1131
|
-
|
|
1118
|
+
require_FileModifierErrors.logger_default.warn(`Transform validation failed${label}:\n${issues}`);
|
|
1132
1119
|
return transformed;
|
|
1133
1120
|
}
|
|
1134
1121
|
return result.data;
|
|
@@ -1156,7 +1143,7 @@ function transformConnectedAccountResponse(response) {
|
|
|
1156
1143
|
try {
|
|
1157
1144
|
return state ? ConnectionDataSchema.parse(state) : void 0;
|
|
1158
1145
|
} catch (error) {
|
|
1159
|
-
|
|
1146
|
+
require_FileModifierErrors.logger_default.warn("Unsupported auth scheme in connected account state, ignoring state field", { error });
|
|
1160
1147
|
return;
|
|
1161
1148
|
}
|
|
1162
1149
|
};
|
|
@@ -1207,7 +1194,7 @@ var CustomTools = class {
|
|
|
1207
1194
|
client;
|
|
1208
1195
|
customToolsRegistry;
|
|
1209
1196
|
constructor(client) {
|
|
1210
|
-
if (!client) throw new
|
|
1197
|
+
if (!client) throw new require_FileModifierErrors.ComposioError("ComposioClient is required");
|
|
1211
1198
|
this.client = client;
|
|
1212
1199
|
this.customToolsRegistry = /* @__PURE__ */ new Map();
|
|
1213
1200
|
require_Telemetry.telemetry.instrument(this, "CustomTools");
|
|
@@ -1315,7 +1302,7 @@ var CustomTools = class {
|
|
|
1315
1302
|
try {
|
|
1316
1303
|
return this.customToolsRegistry.get(slug.toLowerCase())?.schema;
|
|
1317
1304
|
} catch (error) {
|
|
1318
|
-
|
|
1305
|
+
require_FileModifierErrors.logger_default.error(`Error getting custom tool: ${error}`);
|
|
1319
1306
|
return;
|
|
1320
1307
|
}
|
|
1321
1308
|
}
|
|
@@ -1361,7 +1348,7 @@ var CustomTools = class {
|
|
|
1361
1348
|
let connectedAccountId = body.connectedAccountId;
|
|
1362
1349
|
if (toolkitSlug && toolkitSlug !== "custom" && body.userId) {
|
|
1363
1350
|
const connectedAccount = await this.getConnectedAccountForToolkit(toolkitSlug, body.userId, body.connectedAccountId);
|
|
1364
|
-
|
|
1351
|
+
require_FileModifierErrors.logger_default.debug(`[CustomTool] Connected account for ${toolkitSlug} found for user ${body.userId}`, JSON.stringify(connectedAccount, null, 2));
|
|
1365
1352
|
if (!connectedAccount) throw new require_CustomTool.ComposioConnectedAccountNotFoundError(`Connected account not found for toolkit ${toolkitSlug} for user ${body.userId}`, { meta: {
|
|
1366
1353
|
toolkitSlug,
|
|
1367
1354
|
userId: body.userId
|
|
@@ -1425,6 +1412,7 @@ var Tools = class {
|
|
|
1425
1412
|
provider;
|
|
1426
1413
|
autoUploadDownloadFiles;
|
|
1427
1414
|
toolkitVersions;
|
|
1415
|
+
fileUploadPathOptions;
|
|
1428
1416
|
constructor(client, config) {
|
|
1429
1417
|
if (!client) throw new Error("ComposioClient is required");
|
|
1430
1418
|
if (!config?.provider) throw new require_CustomTool.ComposioProviderNotDefinedError("Provider not passed into Tools instance");
|
|
@@ -1433,6 +1421,10 @@ var Tools = class {
|
|
|
1433
1421
|
this.provider = config.provider;
|
|
1434
1422
|
this.autoUploadDownloadFiles = config?.autoUploadDownloadFiles ?? _config_defaults.CONFIG_DEFAULTS.autoUploadDownloadFiles;
|
|
1435
1423
|
this.toolkitVersions = config?.toolkitVersions ?? _config_defaults.CONFIG_DEFAULTS.toolkitVersions;
|
|
1424
|
+
this.fileUploadPathOptions = {
|
|
1425
|
+
sensitiveFileUploadProtection: config?.sensitiveFileUploadProtection,
|
|
1426
|
+
fileUploadPathDenySegments: config?.fileUploadPathDenySegments
|
|
1427
|
+
};
|
|
1436
1428
|
this.execute = this.execute.bind(this);
|
|
1437
1429
|
this.provider._setExecuteToolFn(this.createExecuteFnForProviders());
|
|
1438
1430
|
this.getRawComposioToolBySlug = this.getRawComposioToolBySlug.bind(this);
|
|
@@ -1487,7 +1479,7 @@ var Tools = class {
|
|
|
1487
1479
|
*/
|
|
1488
1480
|
async applyDefaultSchemaModifiers(tools) {
|
|
1489
1481
|
if (this.autoUploadDownloadFiles) {
|
|
1490
|
-
const fileToolModifier = new _file_tool_modifier.FileToolModifier(this.client);
|
|
1482
|
+
const fileToolModifier = new _file_tool_modifier.FileToolModifier(this.client, this.fileUploadPathOptions);
|
|
1491
1483
|
return await Promise.all(tools.map((tool) => fileToolModifier.modifyToolSchema(tool.slug, tool.toolkit?.slug ?? "unknown", tool)));
|
|
1492
1484
|
} else return tools;
|
|
1493
1485
|
}
|
|
@@ -1499,14 +1491,17 @@ var Tools = class {
|
|
|
1499
1491
|
* @param modifier - The modifier to apply
|
|
1500
1492
|
* @returns The modified params
|
|
1501
1493
|
*/
|
|
1502
|
-
async applyBeforeExecuteModifiers(tool, { toolSlug, toolkitSlug, params },
|
|
1494
|
+
async applyBeforeExecuteModifiers(tool, { toolSlug, toolkitSlug, params }, modifiers) {
|
|
1503
1495
|
let modifiedParams = params;
|
|
1504
|
-
if (this.autoUploadDownloadFiles) modifiedParams = await new _file_tool_modifier.FileToolModifier(this.client
|
|
1496
|
+
if (this.autoUploadDownloadFiles) modifiedParams = await new _file_tool_modifier.FileToolModifier(this.client, {
|
|
1497
|
+
...this.fileUploadPathOptions,
|
|
1498
|
+
beforeFileUpload: modifiers?.beforeFileUpload
|
|
1499
|
+
}).fileUploadModifier(tool, {
|
|
1505
1500
|
toolSlug,
|
|
1506
1501
|
toolkitSlug,
|
|
1507
1502
|
params: modifiedParams
|
|
1508
1503
|
});
|
|
1509
|
-
if (
|
|
1504
|
+
if (modifiers?.beforeExecute) if (typeof modifiers.beforeExecute === "function") modifiedParams = await modifiers.beforeExecute({
|
|
1510
1505
|
toolSlug,
|
|
1511
1506
|
toolkitSlug,
|
|
1512
1507
|
params: modifiedParams
|
|
@@ -1524,7 +1519,7 @@ var Tools = class {
|
|
|
1524
1519
|
*/
|
|
1525
1520
|
async applyAfterExecuteModifiers(tool, { toolSlug, toolkitSlug, result }, modifier) {
|
|
1526
1521
|
let modifiedResult = result;
|
|
1527
|
-
if (this.autoUploadDownloadFiles) modifiedResult = await new _file_tool_modifier.FileToolModifier(this.client).fileDownloadModifier(tool, {
|
|
1522
|
+
if (this.autoUploadDownloadFiles) modifiedResult = await new _file_tool_modifier.FileToolModifier(this.client, this.fileUploadPathOptions).fileDownloadModifier(tool, {
|
|
1528
1523
|
toolSlug,
|
|
1529
1524
|
toolkitSlug,
|
|
1530
1525
|
result: modifiedResult
|
|
@@ -1614,7 +1609,7 @@ var Tools = class {
|
|
|
1614
1609
|
...effectiveImportant ? { important: "true" } : {},
|
|
1615
1610
|
toolkit_versions: this.toolkitVersions
|
|
1616
1611
|
};
|
|
1617
|
-
|
|
1612
|
+
require_FileModifierErrors.logger_default.debug(`Fetching tools with filters: ${JSON.stringify(filters, null, 2)}`);
|
|
1618
1613
|
const tools = await this.client.tools.list(filters);
|
|
1619
1614
|
if (!tools) return [];
|
|
1620
1615
|
const caseTransformedTools = tools.items.map((tool) => this.transformToolCases(tool));
|
|
@@ -1717,9 +1712,9 @@ var Tools = class {
|
|
|
1717
1712
|
async getRawComposioToolBySlug(slug, options) {
|
|
1718
1713
|
const customTool = await this.customTools.getCustomToolBySlug(slug);
|
|
1719
1714
|
if (customTool) {
|
|
1720
|
-
|
|
1715
|
+
require_FileModifierErrors.logger_default.debug(`Found ${slug} to be a custom tool`, JSON.stringify(customTool, null, 2));
|
|
1721
1716
|
return customTool;
|
|
1722
|
-
} else
|
|
1717
|
+
} else require_FileModifierErrors.logger_default.debug(`Tool ${slug} is not a custom tool. Fetching from Composio API`);
|
|
1723
1718
|
let tool;
|
|
1724
1719
|
try {
|
|
1725
1720
|
const retrieveParams = options?.version ? { version: options.version } : { toolkit_versions: this.toolkitVersions };
|
|
@@ -1951,7 +1946,7 @@ var Tools = class {
|
|
|
1951
1946
|
toolSlug: slug,
|
|
1952
1947
|
toolkitSlug,
|
|
1953
1948
|
params: executeParams.data
|
|
1954
|
-
}, modifiers
|
|
1949
|
+
}, modifiers);
|
|
1955
1950
|
let result = customTool ? await this.customTools.executeCustomTool(customTool.slug, params) : await this.executeComposioTool(tool, params);
|
|
1956
1951
|
result = await this.applyAfterExecuteModifiers(tool, {
|
|
1957
1952
|
toolSlug: slug,
|
|
@@ -2765,7 +2760,7 @@ var ConnectedAccounts = class {
|
|
|
2765
2760
|
statuses: [ConnectedAccountStatuses.ACTIVE]
|
|
2766
2761
|
});
|
|
2767
2762
|
if (connectedAccount.items.length > 0 && !options?.allowMultiple) throw new require_CustomTool.ComposioMultipleConnectedAccountsError(`Multiple connected accounts found for user ${userId} in auth config ${authConfigId}. Please use the allowMultiple option to allow multiple connected accounts.`);
|
|
2768
|
-
else if (connectedAccount.items.length > 0)
|
|
2763
|
+
else if (connectedAccount.items.length > 0) require_FileModifierErrors.logger_default.warn(`[Warn:AllowMultiple] Multiple connected accounts found for user ${userId} in auth config ${authConfigId}`);
|
|
2769
2764
|
const state = options?.config ?? void 0;
|
|
2770
2765
|
const createParams = {
|
|
2771
2766
|
auth_config: { id: authConfigId },
|
|
@@ -2987,28 +2982,18 @@ var ConnectedAccounts = class {
|
|
|
2987
2982
|
*
|
|
2988
2983
|
* @param {string} nanoid - The unique identifier of the connected account
|
|
2989
2984
|
* @param {UpdateConnectedAccountParams} params - The update parameters
|
|
2990
|
-
* @returns {Promise<
|
|
2985
|
+
* @returns {Promise<ConnectedAccountUpdateStatusResponse>} The update response
|
|
2991
2986
|
*
|
|
2992
2987
|
* @example
|
|
2993
2988
|
* ```typescript
|
|
2994
|
-
* //
|
|
2995
|
-
* await composio.connectedAccounts.update('ca_abc123', {
|
|
2996
|
-
*
|
|
2997
|
-
* // Update credentials
|
|
2998
|
-
* await composio.connectedAccounts.update('ca_abc123', {
|
|
2999
|
-
* connection: {
|
|
3000
|
-
* state: {
|
|
3001
|
-
* authScheme: 'BEARER_TOKEN',
|
|
3002
|
-
* val: { token: 'new-access-token' },
|
|
3003
|
-
* },
|
|
3004
|
-
* },
|
|
3005
|
-
* });
|
|
2989
|
+
* // Disable an account
|
|
2990
|
+
* await composio.connectedAccounts.update('ca_abc123', { enabled: false });
|
|
3006
2991
|
* ```
|
|
3007
2992
|
*/
|
|
3008
2993
|
async update(nanoid, params) {
|
|
3009
2994
|
const parsedParams = UpdateConnectedAccountParamsSchema.safeParse(params);
|
|
3010
2995
|
if (!parsedParams.success) throw new require_CustomTool.ValidationError("Failed to parse connected account update params", { cause: parsedParams.error });
|
|
3011
|
-
return this.client.connectedAccounts.
|
|
2996
|
+
return this.client.connectedAccounts.updateStatus(nanoid, parsedParams.data);
|
|
3012
2997
|
}
|
|
3013
2998
|
};
|
|
3014
2999
|
|
|
@@ -3162,7 +3147,7 @@ var Toolkits = class {
|
|
|
3162
3147
|
async getAuthConfigFields(toolkitSlug, authScheme, authConfigType, requiredOnly) {
|
|
3163
3148
|
const toolkit = await this.getToolkitBySlug(toolkitSlug);
|
|
3164
3149
|
if (!toolkit.authConfigDetails) throw new require_CustomTool.ComposioAuthConfigNotFoundError("No auth config found for toolkit", { meta: { toolkitSlug } });
|
|
3165
|
-
if (toolkit.authConfigDetails.length > 1 && !authScheme)
|
|
3150
|
+
if (toolkit.authConfigDetails.length > 1 && !authScheme) require_FileModifierErrors.logger_default.warn(`Multiple auth configs found for ${toolkitSlug}, please specify the auth scheme to get details of specific auth scheme. Selecting the first scheme by default.`, { meta: { toolkitSlug } });
|
|
3166
3151
|
const authConfig = authScheme ? toolkit.authConfigDetails.find((authConfig$1) => authConfig$1.mode === authScheme) : toolkit.authConfigDetails[0];
|
|
3167
3152
|
if (!authConfig) throw new require_CustomTool.ComposioAuthConfigNotFoundError(`Auth schema ${authScheme} not found for toolkit ${toolkitSlug} with auth scheme ${authScheme}`, { meta: {
|
|
3168
3153
|
toolkitSlug,
|
|
@@ -3468,7 +3453,7 @@ var InternalService = class {
|
|
|
3468
3453
|
projectId: response.project_id,
|
|
3469
3454
|
pusherCluster: response.pusher_cluster
|
|
3470
3455
|
});
|
|
3471
|
-
|
|
3456
|
+
require_FileModifierErrors.logger_default.debug(`[InternalService] SDK realtime credentials: ${JSON.stringify(parsedResponse, null, 2)}`);
|
|
3472
3457
|
if (!parsedResponse.success) throw new require_CustomTool.ValidationError(`Failed to parse SDK realtime credentials`, { cause: parsedResponse.error });
|
|
3473
3458
|
return parsedResponse.data;
|
|
3474
3459
|
}
|
|
@@ -3510,7 +3495,7 @@ var PusherService = class {
|
|
|
3510
3495
|
this.pusherKey = sdkRealtimeCredentials.pusherKey;
|
|
3511
3496
|
this.pusherCluster = sdkRealtimeCredentials.pusherCluster;
|
|
3512
3497
|
this.pusherChannel = `private-${this.clientId}_triggers`;
|
|
3513
|
-
|
|
3498
|
+
require_FileModifierErrors.logger_default.debug(`[PusherService] Creating Pusher client for client ID: ${this.clientId} in cluster ${this.pusherCluster}`);
|
|
3514
3499
|
try {
|
|
3515
3500
|
const { default: Pusher } = await import("pusher-js");
|
|
3516
3501
|
this.pusherClient = new Pusher(this.pusherKey, {
|
|
@@ -3554,19 +3539,19 @@ var PusherService = class {
|
|
|
3554
3539
|
callback(JSON.parse(ev.chunks.join("")));
|
|
3555
3540
|
} catch (parseError) {
|
|
3556
3541
|
const errorMessage = parseError instanceof Error ? parseError.message : String(parseError);
|
|
3557
|
-
|
|
3542
|
+
require_FileModifierErrors.logger_default.error("Failed to parse chunked data:", errorMessage);
|
|
3558
3543
|
} finally {
|
|
3559
3544
|
delete events[typedData.id];
|
|
3560
3545
|
}
|
|
3561
3546
|
} catch (error) {
|
|
3562
3547
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
3563
|
-
|
|
3548
|
+
require_FileModifierErrors.logger_default.error("Error processing chunked trigger data:", errorMessage);
|
|
3564
3549
|
if (data && typeof data === "object" && "id" in data) delete events[data.id];
|
|
3565
3550
|
}
|
|
3566
3551
|
});
|
|
3567
3552
|
} catch (error) {
|
|
3568
3553
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
3569
|
-
|
|
3554
|
+
require_FileModifierErrors.logger_default.error("Failed to bind chunked events:", error);
|
|
3570
3555
|
throw new Error(`Failed to bind chunked events: ${errorMessage}`);
|
|
3571
3556
|
}
|
|
3572
3557
|
}
|
|
@@ -3582,7 +3567,7 @@ var PusherService = class {
|
|
|
3582
3567
|
*/
|
|
3583
3568
|
async subscribe(fn) {
|
|
3584
3569
|
try {
|
|
3585
|
-
|
|
3570
|
+
require_FileModifierErrors.logger_default.debug(`[PusherService] Subscribing to channel: ${this.pusherChannel}`);
|
|
3586
3571
|
const channel = await (await this.getPusherClient()).subscribe(this.pusherChannel);
|
|
3587
3572
|
channel.bind("pusher:subscription_error", (data) => {
|
|
3588
3573
|
const error = data.error ? String(data.error) : "Unknown subscription error";
|
|
@@ -3593,11 +3578,11 @@ var PusherService = class {
|
|
|
3593
3578
|
fn(data);
|
|
3594
3579
|
} catch (error) {
|
|
3595
3580
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
3596
|
-
|
|
3581
|
+
require_FileModifierErrors.logger_default.error("❌ Error in trigger callback:", errorMessage);
|
|
3597
3582
|
}
|
|
3598
3583
|
};
|
|
3599
3584
|
this.bindWithChunking(channel, "trigger_to_client", safeCallback);
|
|
3600
|
-
|
|
3585
|
+
require_FileModifierErrors.logger_default.info(`✅ Subscribed to triggers. You should start receiving events now.`);
|
|
3601
3586
|
} catch (error) {
|
|
3602
3587
|
throw new require_CustomTool.ComposioFailedToSubscribeToPusherChannelError("Failed to subscribe to Pusher channel", { cause: error });
|
|
3603
3588
|
}
|
|
@@ -3612,9 +3597,9 @@ var PusherService = class {
|
|
|
3612
3597
|
*/
|
|
3613
3598
|
async unsubscribe() {
|
|
3614
3599
|
try {
|
|
3615
|
-
|
|
3600
|
+
require_FileModifierErrors.logger_default.debug(`[PusherService] Unsubscribing from channel: ${this.pusherChannel}`);
|
|
3616
3601
|
await (await this.getPusherClient()).unsubscribe(this.pusherChannel);
|
|
3617
|
-
|
|
3602
|
+
require_FileModifierErrors.logger_default.info(`✅ Unsubscribed from triggers.`);
|
|
3618
3603
|
} catch (error) {
|
|
3619
3604
|
throw new require_CustomTool.ComposioFailedToSubscribeToPusherChannelError("Failed to unsubscribe from Pusher channel", { cause: error });
|
|
3620
3605
|
}
|
|
@@ -3827,7 +3812,7 @@ var Triggers = class {
|
|
|
3827
3812
|
});
|
|
3828
3813
|
if (!connectedAccountId) {
|
|
3829
3814
|
connectedAccountId = connectedAccounts[0].id;
|
|
3830
|
-
|
|
3815
|
+
require_FileModifierErrors.logger_default.warn(`[Warn] Multiple connected accounts found for user ${userId}, using the first one. Pass connectedAccountId to select a specific account.`);
|
|
3831
3816
|
}
|
|
3832
3817
|
} catch (error) {
|
|
3833
3818
|
if (error instanceof _composio_client.APIError && [400, 404].includes(error.status)) throw new require_CustomTool.ComposioConnectedAccountNotFoundError(`No connected account found for user ${userId} for toolkit ${toolkitSlug}`, {
|
|
@@ -3924,30 +3909,30 @@ var Triggers = class {
|
|
|
3924
3909
|
*/
|
|
3925
3910
|
shouldSendTriggerAfterFilters(filters, data) {
|
|
3926
3911
|
if (filters.toolkits?.length && !filters.toolkits.map((toolkit) => toolkit.toLowerCase()).includes(data.toolkitSlug.toLowerCase())) {
|
|
3927
|
-
|
|
3912
|
+
require_FileModifierErrors.logger_default.debug("Trigger does not match toolkits filter", JSON.stringify(filters.toolkits, null, 2));
|
|
3928
3913
|
return false;
|
|
3929
3914
|
}
|
|
3930
3915
|
if (filters.triggerId && filters.triggerId !== data.id) {
|
|
3931
|
-
|
|
3916
|
+
require_FileModifierErrors.logger_default.debug("Trigger does not match triggerId filter", JSON.stringify(filters.triggerId, null, 2));
|
|
3932
3917
|
return false;
|
|
3933
3918
|
}
|
|
3934
3919
|
if (filters.connectedAccountId && filters.connectedAccountId !== data.metadata.connectedAccount.id) {
|
|
3935
|
-
|
|
3920
|
+
require_FileModifierErrors.logger_default.debug("Trigger does not match connectedAccountId filter", JSON.stringify(filters.connectedAccountId, null, 2));
|
|
3936
3921
|
return false;
|
|
3937
3922
|
}
|
|
3938
3923
|
if (filters.triggerSlug?.length && !filters.triggerSlug.map((triggerSlug) => triggerSlug.toLowerCase()).includes(data.triggerSlug.toLowerCase())) {
|
|
3939
|
-
|
|
3924
|
+
require_FileModifierErrors.logger_default.debug("Trigger does not match triggerSlug filter", JSON.stringify(filters.triggerSlug, null, 2));
|
|
3940
3925
|
return false;
|
|
3941
3926
|
}
|
|
3942
3927
|
if (filters.triggerData && filters.triggerData !== data.metadata.triggerData) {
|
|
3943
|
-
|
|
3928
|
+
require_FileModifierErrors.logger_default.debug("Trigger does not match triggerData filter", JSON.stringify(filters.triggerData, null, 2));
|
|
3944
3929
|
return false;
|
|
3945
3930
|
}
|
|
3946
3931
|
if (filters.userId && filters.userId !== data.metadata.connectedAccount.userId) {
|
|
3947
|
-
|
|
3932
|
+
require_FileModifierErrors.logger_default.debug("Trigger does not match userId filter", JSON.stringify(filters.userId, null, 2));
|
|
3948
3933
|
return false;
|
|
3949
3934
|
}
|
|
3950
|
-
|
|
3935
|
+
require_FileModifierErrors.logger_default.debug("Trigger matches all filters", JSON.stringify(filters, null, 2));
|
|
3951
3936
|
return true;
|
|
3952
3937
|
}
|
|
3953
3938
|
/**
|
|
@@ -3968,16 +3953,16 @@ var Triggers = class {
|
|
|
3968
3953
|
if (!fn) throw new Error("Function is required for trigger subscription");
|
|
3969
3954
|
const parsedFilters = TriggerSubscribeParamSchema.safeParse(filters);
|
|
3970
3955
|
if (!parsedFilters.success) throw new require_CustomTool.ValidationError(`Invalid parameters passed to subscribe to triggers`, { cause: parsedFilters.error });
|
|
3971
|
-
|
|
3956
|
+
require_FileModifierErrors.logger_default.debug("🔄 Subscribing to triggers with filters: ", JSON.stringify(filters, null, 2));
|
|
3972
3957
|
await this.pusherService.subscribe((_data) => {
|
|
3973
|
-
|
|
3958
|
+
require_FileModifierErrors.logger_default.debug("Received raw trigger data", JSON.stringify(_data, null, 2));
|
|
3974
3959
|
const parsedData = this.parsePusherPayload(_data);
|
|
3975
3960
|
if (this.shouldSendTriggerAfterFilters(parsedFilters.data, parsedData)) try {
|
|
3976
3961
|
fn(parsedData);
|
|
3977
3962
|
} catch (error) {
|
|
3978
|
-
|
|
3963
|
+
require_FileModifierErrors.logger_default.error("❌ Error in trigger callback:", error);
|
|
3979
3964
|
}
|
|
3980
|
-
else
|
|
3965
|
+
else require_FileModifierErrors.logger_default.debug("Trigger does not match filters", JSON.stringify(parsedFilters.data, null, 2));
|
|
3981
3966
|
});
|
|
3982
3967
|
}
|
|
3983
3968
|
/**
|
|
@@ -4022,15 +4007,15 @@ var Triggers = class {
|
|
|
4022
4007
|
parsePusherPayload(data) {
|
|
4023
4008
|
const versionedResult = this.tryParseVersionedPayload(data);
|
|
4024
4009
|
if (versionedResult.ok) {
|
|
4025
|
-
|
|
4010
|
+
require_FileModifierErrors.logger_default.debug(`Parsed Pusher payload as ${versionedResult.version} format`);
|
|
4026
4011
|
return versionedResult.normalizedPayload;
|
|
4027
4012
|
}
|
|
4028
4013
|
const legacyData = data;
|
|
4029
4014
|
if (legacyData.metadata?.nanoId && legacyData.appName) {
|
|
4030
|
-
|
|
4015
|
+
require_FileModifierErrors.logger_default.debug("Parsed Pusher payload as legacy TriggerData format");
|
|
4031
4016
|
return transformIncomingTriggerPayload(legacyData);
|
|
4032
4017
|
}
|
|
4033
|
-
|
|
4018
|
+
require_FileModifierErrors.logger_default.warn("Unknown Pusher payload format. Payload keys: " + Object.keys(data).join(", "));
|
|
4034
4019
|
const id = toStringOrDefault(data.id, toStringOrDefault(data.trigger_id, "unknown"));
|
|
4035
4020
|
const uuid = toStringOrDefault(data.uuid, toStringOrDefault(data.id, "unknown"));
|
|
4036
4021
|
const triggerSlug = toStringOrDefault(data.triggerSlug, toStringOrDefault(data.trigger_name, "UNKNOWN"));
|
|
@@ -4753,9 +4738,9 @@ const userDataPath = () => {
|
|
|
4753
4738
|
try {
|
|
4754
4739
|
const homeDir = _platform.platform.homedir();
|
|
4755
4740
|
if (!homeDir) return null;
|
|
4756
|
-
return _platform.platform.joinPath(homeDir,
|
|
4741
|
+
return _platform.platform.joinPath(homeDir, require_FileModifierErrors.COMPOSIO_DIR, require_FileModifierErrors.USER_DATA_FILE_NAME);
|
|
4757
4742
|
} catch (_error) {
|
|
4758
|
-
|
|
4743
|
+
require_FileModifierErrors.logger_default.debug("Environment", `Unable to get user data path`);
|
|
4759
4744
|
return null;
|
|
4760
4745
|
}
|
|
4761
4746
|
};
|
|
@@ -4771,17 +4756,17 @@ const getUserDataJson = () => {
|
|
|
4771
4756
|
const data = _platform.platform.readFileSync(dataPath, "utf8");
|
|
4772
4757
|
return JSON.parse(data);
|
|
4773
4758
|
} catch (_error) {
|
|
4774
|
-
|
|
4759
|
+
require_FileModifierErrors.logger_default.debug("Environment", "No user data file found");
|
|
4775
4760
|
return {};
|
|
4776
4761
|
}
|
|
4777
4762
|
};
|
|
4778
4763
|
function getSDKConfig(baseUrl, apiKey) {
|
|
4779
4764
|
const { api_key: apiKeyFromUserConfig, base_url: baseURLFromUserConfig } = getUserDataJson();
|
|
4780
|
-
const baseURLParsed = baseUrl ||
|
|
4781
|
-
const apiKeyParsed = apiKey ||
|
|
4782
|
-
if (!apiKeyParsed)
|
|
4783
|
-
|
|
4784
|
-
|
|
4765
|
+
const baseURLParsed = baseUrl || require_FileModifierErrors.getEnvVariable("COMPOSIO_BASE_URL") || baseURLFromUserConfig || require_FileModifierErrors.DEFAULT_BASE_URL;
|
|
4766
|
+
const apiKeyParsed = apiKey || require_FileModifierErrors.getEnvVariable("COMPOSIO_API_KEY") || apiKeyFromUserConfig || "";
|
|
4767
|
+
if (!apiKeyParsed) require_FileModifierErrors.ComposioError.handleAndThrow(new require_CustomTool.ComposioNoAPIKeyError());
|
|
4768
|
+
require_FileModifierErrors.logger_default.debug("Environment", `API Key: ${apiKeyParsed}`);
|
|
4769
|
+
require_FileModifierErrors.logger_default.debug("Environment", `Base URL: ${baseURLParsed}`);
|
|
4785
4770
|
return {
|
|
4786
4771
|
baseURL: baseURLParsed,
|
|
4787
4772
|
apiKey: apiKeyParsed
|
|
@@ -4801,7 +4786,7 @@ function getSDKConfig(baseUrl, apiKey) {
|
|
|
4801
4786
|
*/
|
|
4802
4787
|
function getToolkitVersionsFromEnv(defaultVersions) {
|
|
4803
4788
|
if (defaultVersions && typeof defaultVersions === "string") return defaultVersions;
|
|
4804
|
-
const envPrefixedVersions =
|
|
4789
|
+
const envPrefixedVersions = require_FileModifierErrors.getEnvsWithPrefix(`COMPOSIO_TOOLKIT_VERSION_`);
|
|
4805
4790
|
const toolkitVersionsFromEnv = Object.entries(envPrefixedVersions).reduce((acc, [key, value]) => {
|
|
4806
4791
|
const toolkitName = key.replace("COMPOSIO_TOOLKIT_VERSION_", "");
|
|
4807
4792
|
acc[toolkitName.toLowerCase()] = value;
|
|
@@ -4831,7 +4816,7 @@ async function checkForLatestVersionFromNPM(currentVersion) {
|
|
|
4831
4816
|
const prerelease = semver.default.prerelease(currentVersionFromPackageJson);
|
|
4832
4817
|
if (prerelease && (String(prerelease[0]).includes("alpha") || String(prerelease[0]).includes("beta"))) return;
|
|
4833
4818
|
const latestVersion = (await (await fetch(`https://registry.npmjs.org/${packageName}/latest`)).json()).version;
|
|
4834
|
-
if (semver.default.gt(latestVersion, currentVersionFromPackageJson) && !
|
|
4819
|
+
if (semver.default.gt(latestVersion, currentVersionFromPackageJson) && !require_FileModifierErrors.IS_DEVELOPMENT_OR_CI) require_FileModifierErrors.logger_default.info(`🚀 Upgrade available! Your composio-core version (${currentVersionFromPackageJson}) is behind. Latest version: ${latestVersion}.`);
|
|
4835
4820
|
} catch (_error) {}
|
|
4836
4821
|
}
|
|
4837
4822
|
|
|
@@ -5157,9 +5142,9 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
5157
5142
|
async handleAssistantMessage(userId, run, options, modifiers) {
|
|
5158
5143
|
const tool_calls = run.required_action?.submit_tool_outputs?.tool_calls || [];
|
|
5159
5144
|
return await Promise.all(tool_calls.map(async (tool_call) => {
|
|
5160
|
-
|
|
5145
|
+
require_FileModifierErrors.logger_default.debug(`Executing tool call: ${tool_call.id}`);
|
|
5161
5146
|
const tool_response = await this.executeToolCall(userId, tool_call, options, modifiers);
|
|
5162
|
-
|
|
5147
|
+
require_FileModifierErrors.logger_default.debug(`Tool call ${tool_call.id} executed with response: ${tool_response}`);
|
|
5163
5148
|
return {
|
|
5164
5149
|
tool_call_id: tool_call.id,
|
|
5165
5150
|
output: JSON.stringify(tool_response)
|
|
@@ -5318,7 +5303,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
5318
5303
|
|
|
5319
5304
|
//#endregion
|
|
5320
5305
|
//#region package.json
|
|
5321
|
-
var version = "0.6.
|
|
5306
|
+
var version = "0.6.11";
|
|
5322
5307
|
|
|
5323
5308
|
//#endregion
|
|
5324
5309
|
//#region src/utils/session.ts
|
|
@@ -5470,7 +5455,7 @@ const ToolkitConnectionStateSchema = zod_v3.default.object({
|
|
|
5470
5455
|
}).describe("The connection state of a toolkit");
|
|
5471
5456
|
const ToolkitConnectionsDetailsSchema = zod_v3.default.object({
|
|
5472
5457
|
items: zod_v3.default.array(ToolkitConnectionStateSchema),
|
|
5473
|
-
|
|
5458
|
+
cursor: zod_v3.default.string().optional(),
|
|
5474
5459
|
totalPages: zod_v3.default.number()
|
|
5475
5460
|
});
|
|
5476
5461
|
const ToolRouterMCPServerConfigSchema = zod_v3.default.object({
|
|
@@ -5480,7 +5465,7 @@ const ToolRouterMCPServerConfigSchema = zod_v3.default.object({
|
|
|
5480
5465
|
});
|
|
5481
5466
|
const ToolRouterToolkitsOptionsSchema = zod_v3.default.object({
|
|
5482
5467
|
toolkits: zod_v3.default.array(zod_v3.default.string()).optional(),
|
|
5483
|
-
|
|
5468
|
+
cursor: zod_v3.default.string().optional(),
|
|
5484
5469
|
limit: zod_v3.default.number().optional(),
|
|
5485
5470
|
isConnected: zod_v3.default.boolean().optional(),
|
|
5486
5471
|
search: zod_v3.default.string().optional()
|
|
@@ -5719,7 +5704,7 @@ function transformExecuteResponse(raw) {
|
|
|
5719
5704
|
//#region src/types/ToolRouterSessionFilesMount.types.ts
|
|
5720
5705
|
const ToolRouterSessionFilesMountListOptionsSchema = zod_v3.default.object({
|
|
5721
5706
|
path: zod_v3.default.string().optional(),
|
|
5722
|
-
mountId: zod_v3.default.string().default(
|
|
5707
|
+
mountId: zod_v3.default.string().default(require_FileModifierErrors.DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID),
|
|
5723
5708
|
cursor: zod_v3.default.string().optional(),
|
|
5724
5709
|
limit: zod_v3.default.number().min(1).max(500).optional()
|
|
5725
5710
|
});
|
|
@@ -5743,11 +5728,11 @@ const FileListResponseSchema = zod_v3.default.object({
|
|
|
5743
5728
|
}));
|
|
5744
5729
|
const ToolRouterSessionFilesMountUploadOptionsSchema = zod_v3.default.object({
|
|
5745
5730
|
remotePath: zod_v3.default.string().optional(),
|
|
5746
|
-
mountId: zod_v3.default.string().default(
|
|
5731
|
+
mountId: zod_v3.default.string().default(require_FileModifierErrors.DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID),
|
|
5747
5732
|
mimetype: zod_v3.default.string().optional()
|
|
5748
5733
|
});
|
|
5749
|
-
const ToolRouterSessionFilesMountDownloadOptionsSchema = zod_v3.default.object({ mountId: zod_v3.default.string().default(
|
|
5750
|
-
const ToolRouterSessionFilesMountDeleteOptionsSchema = zod_v3.default.object({ mountId: zod_v3.default.string().default(
|
|
5734
|
+
const ToolRouterSessionFilesMountDownloadOptionsSchema = zod_v3.default.object({ mountId: zod_v3.default.string().default(require_FileModifierErrors.DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID) });
|
|
5735
|
+
const ToolRouterSessionFilesMountDeleteOptionsSchema = zod_v3.default.object({ mountId: zod_v3.default.string().default(require_FileModifierErrors.DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID) });
|
|
5751
5736
|
const RemoteFileDataSchema = zod_v3.default.object({
|
|
5752
5737
|
expires_at: zod_v3.default.string(),
|
|
5753
5738
|
mount_relative_path: zod_v3.default.string(),
|
|
@@ -5887,8 +5872,8 @@ var RemoteFile = class RemoteFile {
|
|
|
5887
5872
|
const content = await this.buffer();
|
|
5888
5873
|
const homeDir = _platform.platform.homedir();
|
|
5889
5874
|
if (!homeDir) throw new Error("Cannot determine save location: home directory is not available");
|
|
5890
|
-
const savePath = path ?? _platform.platform.joinPath(homeDir,
|
|
5891
|
-
const dir = path != null ? getParentDir(savePath) : _platform.platform.joinPath(homeDir,
|
|
5875
|
+
const savePath = path ?? _platform.platform.joinPath(homeDir, require_FileModifierErrors.COMPOSIO_DIR, require_FileModifierErrors.TEMP_FILES_DIRECTORY_NAME, this.filename);
|
|
5876
|
+
const dir = path != null ? getParentDir(savePath) : _platform.platform.joinPath(homeDir, require_FileModifierErrors.COMPOSIO_DIR, require_FileModifierErrors.TEMP_FILES_DIRECTORY_NAME);
|
|
5892
5877
|
if (dir && !_platform.platform.existsSync(dir)) _platform.platform.mkdirSync(dir);
|
|
5893
5878
|
_platform.platform.writeFileSync(savePath, content);
|
|
5894
5879
|
return savePath;
|
|
@@ -6435,7 +6420,7 @@ var ToolRouterSession = class {
|
|
|
6435
6420
|
const toolkitOptions = ToolRouterToolkitsOptionsSchema.safeParse(options ?? {});
|
|
6436
6421
|
if (!toolkitOptions.success) throw new require_CustomTool.ValidationError("Failed to parse toolkits options", { cause: toolkitOptions.error });
|
|
6437
6422
|
const result = await this.client.toolRouter.session.toolkits(this.sessionId, {
|
|
6438
|
-
cursor: toolkitOptions.data.
|
|
6423
|
+
cursor: toolkitOptions.data.cursor,
|
|
6439
6424
|
limit: toolkitOptions.data.limit,
|
|
6440
6425
|
toolkits: toolkitOptions.data.toolkits,
|
|
6441
6426
|
is_connected: toolkitOptions.data.isConnected,
|
|
@@ -6462,7 +6447,7 @@ var ToolRouterSession = class {
|
|
|
6462
6447
|
}
|
|
6463
6448
|
}));
|
|
6464
6449
|
}),
|
|
6465
|
-
|
|
6450
|
+
cursor: result.next_cursor ?? void 0,
|
|
6466
6451
|
totalPages: result.total_pages
|
|
6467
6452
|
};
|
|
6468
6453
|
}
|
|
@@ -6822,7 +6807,7 @@ var Composio = class Composio {
|
|
|
6822
6807
|
*/
|
|
6823
6808
|
constructor(config) {
|
|
6824
6809
|
const { baseURL: baseURLParsed, apiKey: apiKeyParsed } = getSDKConfig(config?.baseURL, config?.apiKey);
|
|
6825
|
-
if (
|
|
6810
|
+
if (require_FileModifierErrors.IS_DEVELOPMENT_OR_CI) require_FileModifierErrors.logger_default.debug(`Initializing Composio w API Key: [REDACTED] and baseURL: ${baseURLParsed}`);
|
|
6826
6811
|
/**
|
|
6827
6812
|
* Set the default provider, if not provided by the user.
|
|
6828
6813
|
*/
|
|
@@ -6838,6 +6823,8 @@ var Composio = class Composio {
|
|
|
6838
6823
|
toolkitVersions: getToolkitVersionsFromEnv(config?.toolkitVersions),
|
|
6839
6824
|
allowTracking: config?.allowTracking ?? _config_defaults.CONFIG_DEFAULTS.allowTracking,
|
|
6840
6825
|
autoUploadDownloadFiles: config?.autoUploadDownloadFiles ?? _config_defaults.CONFIG_DEFAULTS.autoUploadDownloadFiles,
|
|
6826
|
+
sensitiveFileUploadProtection: config?.sensitiveFileUploadProtection,
|
|
6827
|
+
fileUploadPathDenySegments: config?.fileUploadPathDenySegments,
|
|
6841
6828
|
provider: config?.provider ?? this.provider
|
|
6842
6829
|
};
|
|
6843
6830
|
/**
|
|
@@ -6848,14 +6835,17 @@ var Composio = class Composio {
|
|
|
6848
6835
|
apiKey: apiKeyParsed,
|
|
6849
6836
|
baseURL: baseURLParsed,
|
|
6850
6837
|
defaultHeaders: getDefaultHeaders(this.config.defaultHeaders, this.provider),
|
|
6851
|
-
logLevel:
|
|
6838
|
+
logLevel: require_FileModifierErrors.COMPOSIO_LOG_LEVEL
|
|
6852
6839
|
});
|
|
6853
6840
|
this.tools = new Tools(this.client, this.config);
|
|
6854
6841
|
this.mcp = new MCP(this.client);
|
|
6855
6842
|
this.toolkits = new Toolkits(this.client);
|
|
6856
6843
|
this.triggers = new Triggers(this.client, this.config);
|
|
6857
6844
|
this.authConfigs = new AuthConfigs(this.client);
|
|
6858
|
-
this.files = new _files.Files(this.client
|
|
6845
|
+
this.files = new _files.Files(this.client, {
|
|
6846
|
+
sensitiveFileUploadProtection: this.config.sensitiveFileUploadProtection,
|
|
6847
|
+
fileUploadPathDenySegments: this.config.fileUploadPathDenySegments
|
|
6848
|
+
});
|
|
6859
6849
|
this.connectedAccounts = new ConnectedAccounts(this.client);
|
|
6860
6850
|
this.toolRouter = new ToolRouter(this.client, this.config);
|
|
6861
6851
|
/**
|
|
@@ -7546,12 +7536,14 @@ exports.ComposioAuthConfigNotFoundError = require_CustomTool.ComposioAuthConfigN
|
|
|
7546
7536
|
exports.ComposioConnectedAccountNotFoundError = require_CustomTool.ComposioConnectedAccountNotFoundError;
|
|
7547
7537
|
exports.ComposioCustomCreateResponseSchema = ComposioCustomCreateResponseSchema;
|
|
7548
7538
|
exports.ComposioCustomToolsNotInitializedError = require_CustomTool.ComposioCustomToolsNotInitializedError;
|
|
7549
|
-
exports.ComposioError =
|
|
7539
|
+
exports.ComposioError = require_FileModifierErrors.ComposioError;
|
|
7550
7540
|
exports.ComposioFailedToCreateConnectedAccountLink = require_CustomTool.ComposioFailedToCreateConnectedAccountLink;
|
|
7551
7541
|
exports.ComposioFailedToCreatePusherClientError = require_CustomTool.ComposioFailedToCreatePusherClientError;
|
|
7552
7542
|
exports.ComposioFailedToGetSDKRealtimeCredentialsError = require_CustomTool.ComposioFailedToGetSDKRealtimeCredentialsError;
|
|
7553
7543
|
exports.ComposioFailedToSubscribeToPusherChannelError = require_CustomTool.ComposioFailedToSubscribeToPusherChannelError;
|
|
7554
7544
|
exports.ComposioFailedToUnsubscribeFromPusherChannelError = require_CustomTool.ComposioFailedToUnsubscribeFromPusherChannelError;
|
|
7545
|
+
exports.ComposioFileUploadAbortedError = require_FileModifierErrors.ComposioFileUploadAbortedError;
|
|
7546
|
+
exports.ComposioFileUploadError = require_FileModifierErrors.ComposioFileUploadError;
|
|
7555
7547
|
exports.ComposioGenerateURLParamsSchema = ComposioGenerateURLParamsSchema;
|
|
7556
7548
|
exports.ComposioGenerateURLResponseSchema = ComposioGenerateURLResponseSchema;
|
|
7557
7549
|
exports.ComposioGlobalExecuteToolFnNotSetError = require_CustomTool.ComposioGlobalExecuteToolFnNotSetError;
|
|
@@ -7565,6 +7557,7 @@ exports.ComposioMultipleConnectedAccountsError = require_CustomTool.ComposioMult
|
|
|
7565
7557
|
exports.ComposioNoAPIKeyError = require_CustomTool.ComposioNoAPIKeyError;
|
|
7566
7558
|
exports.ComposioProvider = ComposioProvider;
|
|
7567
7559
|
exports.ComposioProviderNotDefinedError = require_CustomTool.ComposioProviderNotDefinedError;
|
|
7560
|
+
exports.ComposioSensitiveFilePathBlockedError = require_FileModifierErrors.ComposioSensitiveFilePathBlockedError;
|
|
7568
7561
|
exports.ComposioToolExecutionError = require_CustomTool.ComposioToolExecutionError;
|
|
7569
7562
|
exports.ComposioToolNotFoundError = require_CustomTool.ComposioToolNotFoundError;
|
|
7570
7563
|
exports.ComposioToolVersionRequiredError = require_CustomTool.ComposioToolVersionRequiredError;
|
|
@@ -7608,6 +7601,7 @@ exports.CustomToolSlugSchema = require_CustomTool.CustomToolSlugSchema;
|
|
|
7608
7601
|
exports.DefaultCreateConnectedAccountParamsSchema = DefaultCreateConnectedAccountParamsSchema;
|
|
7609
7602
|
exports.FileDeleteResponseSchema = FileDeleteResponseSchema;
|
|
7610
7603
|
exports.FileListResponseSchema = FileListResponseSchema;
|
|
7604
|
+
exports.FileModifierErrorCodes = require_FileModifierErrors.FileModifierErrorCodes;
|
|
7611
7605
|
exports.GenerateURLParamsSchema = GenerateURLParamsSchema;
|
|
7612
7606
|
exports.GenerateURLResponseSchema = GenerateURLResponseSchema;
|
|
7613
7607
|
exports.IncomingTriggerPayloadSchema = IncomingTriggerPayloadSchema;
|
|
@@ -7734,7 +7728,7 @@ exports.WebhookVersions = WebhookVersions;
|
|
|
7734
7728
|
Object.defineProperty(exports, 'constants', {
|
|
7735
7729
|
enumerable: true,
|
|
7736
7730
|
get: function () {
|
|
7737
|
-
return
|
|
7731
|
+
return require_FileModifierErrors.constants_exports;
|
|
7738
7732
|
}
|
|
7739
7733
|
});
|
|
7740
7734
|
exports.createConnectionRequest = createConnectionRequest;
|
|
@@ -7743,5 +7737,5 @@ exports.experimental_createToolkit = require_CustomTool.createCustomToolkit;
|
|
|
7743
7737
|
exports.getExtensionFromMimeType = getExtensionFromMimeType;
|
|
7744
7738
|
exports.handleToolExecutionError = require_CustomTool.handleToolExecutionError;
|
|
7745
7739
|
exports.jsonSchemaToZodSchema = jsonSchemaToZodSchema;
|
|
7746
|
-
exports.logger =
|
|
7740
|
+
exports.logger = require_FileModifierErrors.logger_default;
|
|
7747
7741
|
exports.removeNonRequiredProperties = removeNonRequiredProperties;
|