@composio/core 0.28.0 → 0.29.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/README.md +2 -0
- package/dist/{CustomTool-BYHB7sPs.mjs → CustomTool-Bd1KdWvo.mjs} +9 -8
- package/dist/{CustomTool-DyypijT6.d.mts → CustomTool-CMW-d2ZN.d.mts} +9 -8
- package/dist/{cancellation-ZoRh6EJQ.mjs → cancellation-BoJjs34Y.mjs} +1 -1
- package/dist/{composio-CwHMpKXb.d.mts → composio-D5UV5HXN.d.mts} +107 -86
- package/dist/{customTool.types-DoItUHkO.d.mts → customTool.types-B9fs34dv.d.mts} +94 -50
- package/dist/docs/reference/sdk-reference/typescript/composio.mdx +1 -1
- package/dist/docs/reference/sdk-reference/typescript/connected-accounts.mdx +2 -2
- package/dist/docs/reference/sdk-reference/typescript/custom-toolkits.mdx +86 -3
- package/dist/docs/reference/sdk-reference/typescript/experimental.mdx +1 -1
- package/dist/docs/reference/sdk-reference/typescript/session-configs.mdx +1 -1
- package/dist/docs/reference/sdk-reference/typescript/session.mdx +48 -10
- package/dist/docs/reference/sdk-reference/typescript/sessions.mdx +6 -6
- package/dist/docs/reference/sdk-reference/typescript/tools.mdx +4 -4
- package/dist/docs/reference/sdk-reference/typescript/triggers.mdx +5 -1
- package/dist/{errors-Cly0vXFh.mjs → errors-BK6Xc7Ia.mjs} +65 -1
- package/dist/experimental/index.d.mts +3 -3
- package/dist/experimental/index.mjs +1 -1
- package/dist/index.d.mts +46 -16
- package/dist/index.mjs +122 -57
- package/dist/{types-DWZWePfZ.d.mts → types-CaP2SytR.d.mts} +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -1
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -1
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
- package/dist/utils/modifiers/FileToolModifier.node.mjs +2 -2
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
- package/package.json +2 -2
- package/src/errors/ToolErrors.ts +73 -1
- package/src/experimental/index.ts +6 -1
- package/src/lib/toolRouterParams.ts +40 -0
- package/src/models/ConnectedAccounts.ts +2 -2
- package/src/models/ConnectionRequest.ts +38 -34
- package/src/models/CustomTool.ts +25 -30
- package/src/models/CustomToolkits.ts +5 -5
- package/src/models/ToolRouter.ts +24 -14
- package/src/models/ToolRouterSession.ts +22 -8
- package/src/models/Tools.ts +57 -11
- package/src/types/customTool.types.ts +49 -28
- package/src/types/customToolkits.types.ts +3 -3
- package/src/types/toolRouter.types.ts +39 -17
- package/src/utils/rateLimit.ts +25 -0
- package/src/utils/transformers/customToolkits.ts +2 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { $a as
|
|
1
|
+
import { $a as ToolExecuteResponse, Dr as UpdateConnectedAccountAclParams, Ei as McpServerGetResponse, Fi as ExecuteToolFnOptions, Hn as ConnectedAccountCompleteAuthParams, J as ToolRouterCreateSessionConfig, Ja as Tool, Mr as BaseComposioProvider, Na as ProviderOptions, Nn as ComposioRequestOptions, Nr as BaseNonAgenticProvider, P as Session, Pa as SessionExecuteMetaModifiers, Pn as ConnectionRequest, Qn as ConnectedAccountListResponse, S as LocalTool, St as ToolRouterSessionDeleteResponse, Wn as ConnectedAccountCompleteAuthResponse, Xn as ConnectedAccountListParams, Ya as ToolExecuteMetaParams, Za as ToolExecuteParams, ar as ConnectedAccountRevokeResponse, br as CreateConnectedAccountOptions, co as ToolRetrievalOptions, gr as CreateConnectedAccountLinkOptions, ho as ToolkitVersionParam, ja as ExecuteToolModifiers, ji as McpUrlResponse, kr as UpdateConnectedAccountParams, no as ToolListParams, oo as ToolProxyParams, qa as SchemaModifierOptions, rr as ConnectedAccountRetrieveResponse, to as ToolList, tr as ConnectedAccountRefreshOptions, w as LocalToolkit, z as SessionWithoutMcp, zi as ToolCallSession } from "./customTool.types-B9fs34dv.mjs";
|
|
2
2
|
import ComposioClient, { Composio } from "@composio/client";
|
|
3
3
|
import z, { z as z$1 } from "zod/v3";
|
|
4
4
|
import { Files } from "#files";
|
|
5
|
+
import { z as z$2 } from "zod";
|
|
5
6
|
import { ConnectedAccountDeleteResponse, ConnectedAccountPatchResponse, ConnectedAccountRefreshResponse, ConnectedAccountUpdateStatusParams, ConnectedAccountUpdateStatusResponse } from "@composio/client/resources/connected-accounts";
|
|
6
|
-
import { SessionExecuteParams } from "@composio/client/resources/tool-router/session";
|
|
7
|
+
import { SessionCreateParams, SessionExecuteParams } from "@composio/client/resources/tool-router/session";
|
|
7
8
|
import { ToolGetInputParams, ToolGetInputResponse, ToolProxyResponse, ToolRetrieveEnumResponse } from "@composio/client/resources/tools";
|
|
8
9
|
import { TriggersTypeRetrieveEnumResponse } from "@composio/client/resources/triggers-types";
|
|
9
10
|
import { AuthConfigDeleteResponse, AuthConfigUpdateResponse, AuthConfigUpdateStatusResponse } from "@composio/client/resources/auth-configs";
|
|
@@ -28,6 +29,12 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
|
|
|
28
29
|
* Scoped per-instance so a fresh `Composio` starts with a clean slate.
|
|
29
30
|
*/
|
|
30
31
|
private readonly warnedAutoUploadDisabledForTool;
|
|
32
|
+
/**
|
|
33
|
+
* Schemas `execute()` already fetched, so repeated executions don't each spend a request.
|
|
34
|
+
* Holds what `getRawComposioToolBySlug` returned with no `modifySchema`, so a caller's schema
|
|
35
|
+
* modifiers never reach it.
|
|
36
|
+
*/
|
|
37
|
+
private readonly executeToolSchemas;
|
|
31
38
|
constructor(client: ComposioClient, config?: ComposioConfig<TProvider>);
|
|
32
39
|
/**
|
|
33
40
|
* Transforms tool data from snake_case API format to camelCase for internal SDK use.
|
|
@@ -100,9 +107,9 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
|
|
|
100
107
|
* Lists Composio API tools available to the SDK.
|
|
101
108
|
*
|
|
102
109
|
* This method fetches remote Composio tools from the API in raw format. The response can be
|
|
103
|
-
* filtered and modified as needed.
|
|
110
|
+
* filtered and modified as needed. Experimental local tools are session-scoped; attach
|
|
104
111
|
* them when creating or reusing a Tool Router session, then use `session.tools()`,
|
|
105
|
-
* `session.
|
|
112
|
+
* `session.localTools()`, or `session.execute()`.
|
|
106
113
|
* It provides access to the underlying tool data without provider-specific wrapping.
|
|
107
114
|
*
|
|
108
115
|
* @param {ToolListParams} query - Query parameters to filter the tools (required)
|
|
@@ -179,8 +186,8 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
|
|
|
179
186
|
* This method fetches a single tool in raw format without provider-specific wrapping,
|
|
180
187
|
* providing direct access to the tool's schema and metadata. Tool versions are controlled
|
|
181
188
|
* at the Composio SDK initialization level through the `toolkitVersions` configuration.
|
|
182
|
-
*
|
|
183
|
-
* Tool Router session, then use `session.tools()`, `session.
|
|
189
|
+
* Experimental local tools are session-scoped; attach them when creating or reusing a
|
|
190
|
+
* Tool Router session, then use `session.tools()`, `session.localTools()`, or
|
|
184
191
|
* `session.execute()`.
|
|
185
192
|
*
|
|
186
193
|
* @param {string} slug - The unique identifier of the tool (e.g., 'GITHUB_GET_REPOS')
|
|
@@ -423,6 +430,8 @@ declare class Tools<TToolCollection, TTool, TProvider extends BaseComposioProvid
|
|
|
423
430
|
* ```
|
|
424
431
|
*/
|
|
425
432
|
execute(slug: string, body: ToolExecuteParams, options?: ExecuteToolModifiers & ComposioRequestOptions): Promise<ToolExecuteResponse>;
|
|
433
|
+
/** The tool's schema for `execute()`, fetched only if no unexpired copy is cached. Failures aren't cached. */
|
|
434
|
+
private getToolSchemaForExecute;
|
|
426
435
|
/**
|
|
427
436
|
* Executes a tool based on a tool router session.
|
|
428
437
|
*
|
|
@@ -3717,6 +3726,7 @@ declare const IncomingTriggerPayloadSchema: z$1.ZodObject<{
|
|
|
3717
3726
|
userId: string;
|
|
3718
3727
|
uuid: string;
|
|
3719
3728
|
id: string;
|
|
3729
|
+
triggerSlug: string;
|
|
3720
3730
|
metadata: {
|
|
3721
3731
|
toolkitSlug: string;
|
|
3722
3732
|
uuid: string;
|
|
@@ -3733,7 +3743,6 @@ declare const IncomingTriggerPayloadSchema: z$1.ZodObject<{
|
|
|
3733
3743
|
triggerConfig: Record<string, unknown>;
|
|
3734
3744
|
triggerData?: string | undefined;
|
|
3735
3745
|
};
|
|
3736
|
-
triggerSlug: string;
|
|
3737
3746
|
payload?: Record<string, unknown> | undefined;
|
|
3738
3747
|
originalPayload?: Record<string, unknown> | undefined;
|
|
3739
3748
|
}, {
|
|
@@ -3741,6 +3750,7 @@ declare const IncomingTriggerPayloadSchema: z$1.ZodObject<{
|
|
|
3741
3750
|
userId: string;
|
|
3742
3751
|
uuid: string;
|
|
3743
3752
|
id: string;
|
|
3753
|
+
triggerSlug: string;
|
|
3744
3754
|
metadata: {
|
|
3745
3755
|
toolkitSlug: string;
|
|
3746
3756
|
uuid: string;
|
|
@@ -3757,7 +3767,6 @@ declare const IncomingTriggerPayloadSchema: z$1.ZodObject<{
|
|
|
3757
3767
|
triggerConfig: Record<string, unknown>;
|
|
3758
3768
|
triggerData?: string | undefined;
|
|
3759
3769
|
};
|
|
3760
|
-
triggerSlug: string;
|
|
3761
3770
|
payload?: Record<string, unknown> | undefined;
|
|
3762
3771
|
originalPayload?: Record<string, unknown> | undefined;
|
|
3763
3772
|
}>;
|
|
@@ -3988,17 +3997,17 @@ declare const WebhookPayloadV1Schema: z$1.ZodObject<{
|
|
|
3988
3997
|
payload: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
3989
3998
|
log_id: z$1.ZodString;
|
|
3990
3999
|
}, "strip", z$1.ZodTypeAny, {
|
|
3991
|
-
log_id: string;
|
|
3992
4000
|
payload: Record<string, unknown>;
|
|
3993
4001
|
trigger_name: string;
|
|
3994
4002
|
connection_id: string;
|
|
3995
4003
|
trigger_id: string;
|
|
3996
|
-
}, {
|
|
3997
4004
|
log_id: string;
|
|
4005
|
+
}, {
|
|
3998
4006
|
payload: Record<string, unknown>;
|
|
3999
4007
|
trigger_name: string;
|
|
4000
4008
|
connection_id: string;
|
|
4001
4009
|
trigger_id: string;
|
|
4010
|
+
log_id: string;
|
|
4002
4011
|
}>;
|
|
4003
4012
|
type WebhookPayloadV1 = z$1.infer<typeof WebhookPayloadV1Schema>;
|
|
4004
4013
|
/** V2 webhook payload - includes timestamp and nested data */
|
|
@@ -4028,11 +4037,11 @@ declare const WebhookPayloadV2Schema: z$1.ZodObject<{
|
|
|
4028
4037
|
}, "strip", z$1.ZodTypeAny, {
|
|
4029
4038
|
type: string;
|
|
4030
4039
|
data: {
|
|
4031
|
-
user_id: string;
|
|
4032
4040
|
connection_id: string;
|
|
4033
4041
|
trigger_id: string;
|
|
4034
4042
|
connection_nano_id: string;
|
|
4035
4043
|
trigger_nano_id: string;
|
|
4044
|
+
user_id: string;
|
|
4036
4045
|
} & {
|
|
4037
4046
|
[k: string]: unknown;
|
|
4038
4047
|
};
|
|
@@ -4041,11 +4050,11 @@ declare const WebhookPayloadV2Schema: z$1.ZodObject<{
|
|
|
4041
4050
|
}, {
|
|
4042
4051
|
type: string;
|
|
4043
4052
|
data: {
|
|
4044
|
-
user_id: string;
|
|
4045
4053
|
connection_id: string;
|
|
4046
4054
|
trigger_id: string;
|
|
4047
4055
|
connection_nano_id: string;
|
|
4048
4056
|
trigger_nano_id: string;
|
|
4057
|
+
user_id: string;
|
|
4049
4058
|
} & {
|
|
4050
4059
|
[k: string]: unknown;
|
|
4051
4060
|
};
|
|
@@ -4064,14 +4073,14 @@ declare const WebhookPayloadV3Schema: z$1.ZodObject<{
|
|
|
4064
4073
|
type: string;
|
|
4065
4074
|
data: Record<string, unknown>;
|
|
4066
4075
|
id: string;
|
|
4067
|
-
timestamp: string;
|
|
4068
4076
|
metadata: Record<string, unknown>;
|
|
4077
|
+
timestamp: string;
|
|
4069
4078
|
}, {
|
|
4070
4079
|
type: string;
|
|
4071
4080
|
data: Record<string, unknown>;
|
|
4072
4081
|
id: string;
|
|
4073
|
-
timestamp: string;
|
|
4074
4082
|
metadata: Record<string, unknown>;
|
|
4083
|
+
timestamp: string;
|
|
4075
4084
|
}>;
|
|
4076
4085
|
type WebhookPayloadV3 = z$1.infer<typeof WebhookPayloadV3Schema>;
|
|
4077
4086
|
/** V3 trigger-specific payload - has trigger metadata fields */
|
|
@@ -4106,32 +4115,32 @@ declare const WebhookTriggerPayloadV3Schema: z$1.ZodObject<{
|
|
|
4106
4115
|
type: string;
|
|
4107
4116
|
data: Record<string, unknown>;
|
|
4108
4117
|
id: string;
|
|
4109
|
-
timestamp: string;
|
|
4110
4118
|
metadata: {
|
|
4111
|
-
connected_account_id: string;
|
|
4112
|
-
auth_config_id: string;
|
|
4113
|
-
user_id: string;
|
|
4114
|
-
log_id: string;
|
|
4115
4119
|
trigger_id: string;
|
|
4120
|
+
log_id: string;
|
|
4121
|
+
user_id: string;
|
|
4116
4122
|
trigger_slug: string;
|
|
4123
|
+
connected_account_id: string;
|
|
4124
|
+
auth_config_id: string;
|
|
4117
4125
|
} & {
|
|
4118
4126
|
[k: string]: unknown;
|
|
4119
4127
|
};
|
|
4128
|
+
timestamp: string;
|
|
4120
4129
|
}, {
|
|
4121
4130
|
type: string;
|
|
4122
4131
|
data: Record<string, unknown>;
|
|
4123
4132
|
id: string;
|
|
4124
|
-
timestamp: string;
|
|
4125
4133
|
metadata: {
|
|
4126
|
-
connected_account_id: string;
|
|
4127
|
-
auth_config_id: string;
|
|
4128
|
-
user_id: string;
|
|
4129
|
-
log_id: string;
|
|
4130
4134
|
trigger_id: string;
|
|
4135
|
+
log_id: string;
|
|
4136
|
+
user_id: string;
|
|
4131
4137
|
trigger_slug: string;
|
|
4138
|
+
connected_account_id: string;
|
|
4139
|
+
auth_config_id: string;
|
|
4132
4140
|
} & {
|
|
4133
4141
|
[k: string]: unknown;
|
|
4134
4142
|
};
|
|
4143
|
+
timestamp: string;
|
|
4135
4144
|
}>;
|
|
4136
4145
|
type WebhookTriggerPayloadV3 = z$1.infer<typeof WebhookTriggerPayloadV3Schema>;
|
|
4137
4146
|
/** Union of all webhook payload versions */
|
|
@@ -4145,14 +4154,14 @@ declare const WebhookPayloadSchema: z$1.ZodUnion<[z$1.ZodObject<{
|
|
|
4145
4154
|
type: string;
|
|
4146
4155
|
data: Record<string, unknown>;
|
|
4147
4156
|
id: string;
|
|
4148
|
-
timestamp: string;
|
|
4149
4157
|
metadata: Record<string, unknown>;
|
|
4158
|
+
timestamp: string;
|
|
4150
4159
|
}, {
|
|
4151
4160
|
type: string;
|
|
4152
4161
|
data: Record<string, unknown>;
|
|
4153
4162
|
id: string;
|
|
4154
|
-
timestamp: string;
|
|
4155
4163
|
metadata: Record<string, unknown>;
|
|
4164
|
+
timestamp: string;
|
|
4156
4165
|
}>, z$1.ZodObject<{
|
|
4157
4166
|
type: z$1.ZodString;
|
|
4158
4167
|
timestamp: z$1.ZodString;
|
|
@@ -4179,11 +4188,11 @@ declare const WebhookPayloadSchema: z$1.ZodUnion<[z$1.ZodObject<{
|
|
|
4179
4188
|
}, "strip", z$1.ZodTypeAny, {
|
|
4180
4189
|
type: string;
|
|
4181
4190
|
data: {
|
|
4182
|
-
user_id: string;
|
|
4183
4191
|
connection_id: string;
|
|
4184
4192
|
trigger_id: string;
|
|
4185
4193
|
connection_nano_id: string;
|
|
4186
4194
|
trigger_nano_id: string;
|
|
4195
|
+
user_id: string;
|
|
4187
4196
|
} & {
|
|
4188
4197
|
[k: string]: unknown;
|
|
4189
4198
|
};
|
|
@@ -4192,11 +4201,11 @@ declare const WebhookPayloadSchema: z$1.ZodUnion<[z$1.ZodObject<{
|
|
|
4192
4201
|
}, {
|
|
4193
4202
|
type: string;
|
|
4194
4203
|
data: {
|
|
4195
|
-
user_id: string;
|
|
4196
4204
|
connection_id: string;
|
|
4197
4205
|
trigger_id: string;
|
|
4198
4206
|
connection_nano_id: string;
|
|
4199
4207
|
trigger_nano_id: string;
|
|
4208
|
+
user_id: string;
|
|
4200
4209
|
} & {
|
|
4201
4210
|
[k: string]: unknown;
|
|
4202
4211
|
};
|
|
@@ -4209,17 +4218,17 @@ declare const WebhookPayloadSchema: z$1.ZodUnion<[z$1.ZodObject<{
|
|
|
4209
4218
|
payload: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
4210
4219
|
log_id: z$1.ZodString;
|
|
4211
4220
|
}, "strip", z$1.ZodTypeAny, {
|
|
4212
|
-
log_id: string;
|
|
4213
4221
|
payload: Record<string, unknown>;
|
|
4214
4222
|
trigger_name: string;
|
|
4215
4223
|
connection_id: string;
|
|
4216
4224
|
trigger_id: string;
|
|
4217
|
-
}, {
|
|
4218
4225
|
log_id: string;
|
|
4226
|
+
}, {
|
|
4219
4227
|
payload: Record<string, unknown>;
|
|
4220
4228
|
trigger_name: string;
|
|
4221
4229
|
connection_id: string;
|
|
4222
4230
|
trigger_id: string;
|
|
4231
|
+
log_id: string;
|
|
4223
4232
|
}>]>;
|
|
4224
4233
|
type WebhookPayload = z$1.infer<typeof WebhookPayloadSchema>;
|
|
4225
4234
|
/** Webhook version enum */
|
|
@@ -4288,16 +4297,16 @@ declare const VerifyWebhookParamsSchema: z$1.ZodObject<{
|
|
|
4288
4297
|
tolerance: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodNumber>>;
|
|
4289
4298
|
}, "strip", z$1.ZodTypeAny, {
|
|
4290
4299
|
id: string;
|
|
4291
|
-
timestamp: string;
|
|
4292
4300
|
secret: string;
|
|
4293
4301
|
payload: string;
|
|
4302
|
+
timestamp: string;
|
|
4294
4303
|
signature: string;
|
|
4295
4304
|
tolerance: number;
|
|
4296
4305
|
}, {
|
|
4297
4306
|
id: string;
|
|
4298
|
-
timestamp: string;
|
|
4299
4307
|
secret: string;
|
|
4300
4308
|
payload: string;
|
|
4309
|
+
timestamp: string;
|
|
4301
4310
|
signature: string;
|
|
4302
4311
|
tolerance?: number | undefined;
|
|
4303
4312
|
}>;
|
|
@@ -5002,8 +5011,8 @@ declare class ConnectedAccounts {
|
|
|
5002
5011
|
/**
|
|
5003
5012
|
* Waits for a connection request to complete and become active.
|
|
5004
5013
|
*
|
|
5005
|
-
* This method
|
|
5006
|
-
* until it either becomes active, enters a terminal error state, or times out.
|
|
5014
|
+
* This method polls the Composio API, backing off from 1 second to 5 seconds between polls,
|
|
5015
|
+
* to check the status of a connection until it either becomes active, enters a terminal error state, or times out.
|
|
5007
5016
|
*
|
|
5008
5017
|
* @param {string} connectedAccountId - The ID of the connected account to wait for
|
|
5009
5018
|
* @param {number} [timeout=60000] - Maximum time to wait in milliseconds (default: 60 seconds)
|
|
@@ -5323,24 +5332,24 @@ declare const UsageBreakdownParamsSchema: z$1.ZodObject<{
|
|
|
5323
5332
|
}>>;
|
|
5324
5333
|
}, "strip", z$1.ZodTypeAny, {
|
|
5325
5334
|
limit?: number | undefined;
|
|
5335
|
+
orderBy?: "key" | "total_quantity" | "event_count" | undefined;
|
|
5326
5336
|
from?: number | undefined;
|
|
5327
5337
|
to?: number | undefined;
|
|
5328
5338
|
filters?: {
|
|
5329
5339
|
userId?: string[] | null | undefined;
|
|
5330
5340
|
sessionId?: string[] | null | undefined;
|
|
5331
5341
|
} | undefined;
|
|
5332
|
-
orderBy?: "key" | "total_quantity" | "event_count" | undefined;
|
|
5333
5342
|
groupBy?: string | undefined;
|
|
5334
5343
|
orderDirection?: "asc" | "desc" | undefined;
|
|
5335
5344
|
}, {
|
|
5336
5345
|
limit?: number | undefined;
|
|
5346
|
+
orderBy?: "key" | "total_quantity" | "event_count" | undefined;
|
|
5337
5347
|
from?: number | undefined;
|
|
5338
5348
|
to?: number | undefined;
|
|
5339
5349
|
filters?: {
|
|
5340
5350
|
userId?: string[] | null | undefined;
|
|
5341
5351
|
sessionId?: string[] | null | undefined;
|
|
5342
5352
|
} | undefined;
|
|
5343
|
-
orderBy?: "key" | "total_quantity" | "event_count" | undefined;
|
|
5344
5353
|
groupBy?: string | undefined;
|
|
5345
5354
|
orderDirection?: "asc" | "desc" | undefined;
|
|
5346
5355
|
}>;
|
|
@@ -5628,7 +5637,7 @@ declare const CustomToolkitCreateParamsSchema: z$1.ZodObject<{
|
|
|
5628
5637
|
/** Human-readable toolkit name. */
|
|
5629
5638
|
name: z$1.ZodString;
|
|
5630
5639
|
/** The MCP server URL. Must use https. */
|
|
5631
|
-
|
|
5640
|
+
mcpUrl: z$1.ZodString;
|
|
5632
5641
|
/** Square PNG or JPEG logo (256-1024px, max 3MB), base64-encoded. Defaults to the MCP logo. */
|
|
5633
5642
|
logoFile: z$1.ZodOptional<z$1.ZodObject<{
|
|
5634
5643
|
content: z$1.ZodString;
|
|
@@ -5739,7 +5748,7 @@ declare const CustomToolkitCreateParamsSchema: z$1.ZodObject<{
|
|
|
5739
5748
|
}, "strip", z$1.ZodTypeAny, {
|
|
5740
5749
|
name: string;
|
|
5741
5750
|
userId: string;
|
|
5742
|
-
|
|
5751
|
+
mcpUrl: string;
|
|
5743
5752
|
authSchemes: ({
|
|
5744
5753
|
mode: "NO_AUTH";
|
|
5745
5754
|
} | {
|
|
@@ -5767,7 +5776,7 @@ declare const CustomToolkitCreateParamsSchema: z$1.ZodObject<{
|
|
|
5767
5776
|
}, {
|
|
5768
5777
|
name: string;
|
|
5769
5778
|
userId: string;
|
|
5770
|
-
|
|
5779
|
+
mcpUrl: string;
|
|
5771
5780
|
authSchemes: ({
|
|
5772
5781
|
mode: "NO_AUTH";
|
|
5773
5782
|
} | {
|
|
@@ -5931,8 +5940,8 @@ declare const CustomToolkitUpsertParamsSchema: z$1.ZodObject<{
|
|
|
5931
5940
|
toolkitConfig: z$1.ZodObject<{
|
|
5932
5941
|
/** Human-readable toolkit name. */
|
|
5933
5942
|
name: z$1.ZodString;
|
|
5934
|
-
/** The
|
|
5935
|
-
|
|
5943
|
+
/** The MCP server URL. Must use https. */
|
|
5944
|
+
mcpUrl: z$1.ZodString;
|
|
5936
5945
|
/** Square PNG or JPEG logo (256-1024px, max 3MB), base64-encoded. Defaults to the Composio logo. */
|
|
5937
5946
|
logoFile: z$1.ZodOptional<z$1.ZodObject<{
|
|
5938
5947
|
content: z$1.ZodString;
|
|
@@ -6035,7 +6044,7 @@ declare const CustomToolkitUpsertParamsSchema: z$1.ZodObject<{
|
|
|
6035
6044
|
}>]>, "many">;
|
|
6036
6045
|
}, "strip", z$1.ZodTypeAny, {
|
|
6037
6046
|
name: string;
|
|
6038
|
-
|
|
6047
|
+
mcpUrl: string;
|
|
6039
6048
|
authSchemes: ({
|
|
6040
6049
|
mode: "NO_AUTH";
|
|
6041
6050
|
} | {
|
|
@@ -6061,7 +6070,7 @@ declare const CustomToolkitUpsertParamsSchema: z$1.ZodObject<{
|
|
|
6061
6070
|
} | undefined;
|
|
6062
6071
|
}, {
|
|
6063
6072
|
name: string;
|
|
6064
|
-
|
|
6073
|
+
mcpUrl: string;
|
|
6065
6074
|
authSchemes: ({
|
|
6066
6075
|
mode: "NO_AUTH";
|
|
6067
6076
|
} | {
|
|
@@ -6090,7 +6099,7 @@ declare const CustomToolkitUpsertParamsSchema: z$1.ZodObject<{
|
|
|
6090
6099
|
slug: string;
|
|
6091
6100
|
toolkitConfig: {
|
|
6092
6101
|
name: string;
|
|
6093
|
-
|
|
6102
|
+
mcpUrl: string;
|
|
6094
6103
|
authSchemes: ({
|
|
6095
6104
|
mode: "NO_AUTH";
|
|
6096
6105
|
} | {
|
|
@@ -6119,7 +6128,7 @@ declare const CustomToolkitUpsertParamsSchema: z$1.ZodObject<{
|
|
|
6119
6128
|
slug: string;
|
|
6120
6129
|
toolkitConfig: {
|
|
6121
6130
|
name: string;
|
|
6122
|
-
|
|
6131
|
+
mcpUrl: string;
|
|
6123
6132
|
authSchemes: ({
|
|
6124
6133
|
mode: "NO_AUTH";
|
|
6125
6134
|
} | {
|
|
@@ -6221,7 +6230,7 @@ type CustomToolkitDeleteResponse = z$1.infer<typeof CustomToolkitDeleteResponseS
|
|
|
6221
6230
|
* ```typescript
|
|
6222
6231
|
* const { slug } = await composio.experimental.customToolkits.create({
|
|
6223
6232
|
* name: 'My Toolkit',
|
|
6224
|
-
*
|
|
6233
|
+
* mcpUrl: 'https://mcp.example.com/mcp',
|
|
6225
6234
|
* authSchemes: [{ mode: 'DCR_OAUTH', discoveryUrl: 'https://mcp.example.com/.well-known/oauth-authorization-server' }],
|
|
6226
6235
|
* userId: 'all',
|
|
6227
6236
|
* });
|
|
@@ -6236,7 +6245,7 @@ declare class CustomToolkits {
|
|
|
6236
6245
|
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
6237
6246
|
*
|
|
6238
6247
|
* Set `userId` to `'all'` to share the toolkit with every user in the
|
|
6239
|
-
* project, or to a user ID to make it private to that user. `
|
|
6248
|
+
* project, or to a user ID to make it private to that user. `mcpUrl`,
|
|
6240
6249
|
* `authSchemes` and `userId` cannot change later: delete and re-create the
|
|
6241
6250
|
* toolkit instead. For a private toolkit, `connectLink` is where to send
|
|
6242
6251
|
* that user to connect.
|
|
@@ -6249,7 +6258,7 @@ declare class CustomToolkits {
|
|
|
6249
6258
|
* ```typescript
|
|
6250
6259
|
* const { slug, connectLink } = await composio.experimental.customToolkits.create({
|
|
6251
6260
|
* name: 'Internal API',
|
|
6252
|
-
*
|
|
6261
|
+
* mcpUrl: 'https://mcp.internal.example.com/mcp',
|
|
6253
6262
|
* authSchemes: [
|
|
6254
6263
|
* { mode: 'API_KEY', headers: { Authorization: 'Bearer {{generic_api_key}}' } },
|
|
6255
6264
|
* ],
|
|
@@ -6285,7 +6294,7 @@ declare class CustomToolkits {
|
|
|
6285
6294
|
* field copy) when the project already owns a toolkit with this slug.
|
|
6286
6295
|
* **Experimental — custom toolkits are in pilot; shape may change.**
|
|
6287
6296
|
*
|
|
6288
|
-
* `
|
|
6297
|
+
* `mcpUrl` and `authSchemes` cannot change on an existing toolkit:
|
|
6289
6298
|
* re-sending them unchanged is a no-op, and changing them fails with a 409.
|
|
6290
6299
|
* Delete and re-register the toolkit instead, which revokes its connections.
|
|
6291
6300
|
*
|
|
@@ -6299,7 +6308,7 @@ declare class CustomToolkits {
|
|
|
6299
6308
|
* slug: 'INTERNAL_API',
|
|
6300
6309
|
* toolkitConfig: {
|
|
6301
6310
|
* name: 'Internal API',
|
|
6302
|
-
*
|
|
6311
|
+
* mcpUrl: 'https://mcp.internal.example.com/mcp',
|
|
6303
6312
|
* authSchemes: [
|
|
6304
6313
|
* { mode: 'API_KEY', headers: { Authorization: 'Bearer {{generic_api_key}}' } },
|
|
6305
6314
|
* ],
|
|
@@ -7605,11 +7614,11 @@ declare const LogSearchFilterSchema: z$1.ZodObject<{
|
|
|
7605
7614
|
value: z$1.ZodString;
|
|
7606
7615
|
}, "strip", z$1.ZodTypeAny, {
|
|
7607
7616
|
value: string;
|
|
7608
|
-
field: "status" | "
|
|
7617
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7609
7618
|
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7610
7619
|
}, {
|
|
7611
7620
|
value: string;
|
|
7612
|
-
field: "status" | "
|
|
7621
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7613
7622
|
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7614
7623
|
}>;
|
|
7615
7624
|
type LogSearchFilter = z$1.infer<typeof LogSearchFilterSchema>;
|
|
@@ -7638,11 +7647,11 @@ declare const LogSearchParamsSchema: z$1.ZodObject<{
|
|
|
7638
7647
|
value: z$1.ZodString;
|
|
7639
7648
|
}, "strip", z$1.ZodTypeAny, {
|
|
7640
7649
|
value: string;
|
|
7641
|
-
field: "status" | "
|
|
7650
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7642
7651
|
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7643
7652
|
}, {
|
|
7644
7653
|
value: string;
|
|
7645
|
-
field: "status" | "
|
|
7654
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7646
7655
|
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7647
7656
|
}>, "many">>;
|
|
7648
7657
|
timeRange: z$1.ZodOptional<z$1.ZodObject<{
|
|
@@ -7662,7 +7671,7 @@ declare const LogSearchParamsSchema: z$1.ZodObject<{
|
|
|
7662
7671
|
cursor?: string | null | undefined;
|
|
7663
7672
|
filters?: {
|
|
7664
7673
|
value: string;
|
|
7665
|
-
field: "status" | "
|
|
7674
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7666
7675
|
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7667
7676
|
}[] | undefined;
|
|
7668
7677
|
timeRange?: {
|
|
@@ -7674,7 +7683,7 @@ declare const LogSearchParamsSchema: z$1.ZodObject<{
|
|
|
7674
7683
|
cursor?: string | null | undefined;
|
|
7675
7684
|
filters?: {
|
|
7676
7685
|
value: string;
|
|
7677
|
-
field: "status" | "
|
|
7686
|
+
field: "status" | "log_id" | "user_id" | "connected_account_id" | "auth_config_id" | "tool_slug" | "toolkit_slug" | "session_id" | "sandbox_id" | "request_id";
|
|
7678
7687
|
operator: "==" | "!=" | "contains" | "not_contains";
|
|
7679
7688
|
}[] | undefined;
|
|
7680
7689
|
timeRange?: {
|
|
@@ -7738,13 +7747,13 @@ declare const ToolExecutionLogSchema: z$1.ZodObject<{
|
|
|
7738
7747
|
type: string;
|
|
7739
7748
|
status: "success" | "failed";
|
|
7740
7749
|
id: string;
|
|
7741
|
-
timestamp: string;
|
|
7742
|
-
level: "error" | "warn" | "info";
|
|
7743
7750
|
metadata: {
|
|
7744
7751
|
instant_charge?: string | undefined;
|
|
7745
7752
|
} & {
|
|
7746
7753
|
[k: string]: unknown;
|
|
7747
7754
|
};
|
|
7755
|
+
timestamp: string;
|
|
7756
|
+
level: "error" | "warn" | "info";
|
|
7748
7757
|
metrics: Record<string, unknown>;
|
|
7749
7758
|
parent: {
|
|
7750
7759
|
logId: string;
|
|
@@ -7755,13 +7764,13 @@ declare const ToolExecutionLogSchema: z$1.ZodObject<{
|
|
|
7755
7764
|
type: string;
|
|
7756
7765
|
status: "success" | "failed";
|
|
7757
7766
|
id: string;
|
|
7758
|
-
timestamp: string;
|
|
7759
|
-
level: "error" | "warn" | "info";
|
|
7760
7767
|
metadata: {
|
|
7761
7768
|
instant_charge?: string | undefined;
|
|
7762
7769
|
} & {
|
|
7763
7770
|
[k: string]: unknown;
|
|
7764
7771
|
};
|
|
7772
|
+
timestamp: string;
|
|
7773
|
+
level: "error" | "warn" | "info";
|
|
7765
7774
|
metrics: Record<string, unknown>;
|
|
7766
7775
|
parent: {
|
|
7767
7776
|
logId: string;
|
|
@@ -7802,13 +7811,13 @@ declare const LogSearchResponseSchema: z$1.ZodObject<{
|
|
|
7802
7811
|
type: string;
|
|
7803
7812
|
status: "success" | "failed";
|
|
7804
7813
|
id: string;
|
|
7805
|
-
timestamp: string;
|
|
7806
|
-
level: "error" | "warn" | "info";
|
|
7807
7814
|
metadata: {
|
|
7808
7815
|
instant_charge?: string | undefined;
|
|
7809
7816
|
} & {
|
|
7810
7817
|
[k: string]: unknown;
|
|
7811
7818
|
};
|
|
7819
|
+
timestamp: string;
|
|
7820
|
+
level: "error" | "warn" | "info";
|
|
7812
7821
|
metrics: Record<string, unknown>;
|
|
7813
7822
|
parent: {
|
|
7814
7823
|
logId: string;
|
|
@@ -7819,13 +7828,13 @@ declare const LogSearchResponseSchema: z$1.ZodObject<{
|
|
|
7819
7828
|
type: string;
|
|
7820
7829
|
status: "success" | "failed";
|
|
7821
7830
|
id: string;
|
|
7822
|
-
timestamp: string;
|
|
7823
|
-
level: "error" | "warn" | "info";
|
|
7824
7831
|
metadata: {
|
|
7825
7832
|
instant_charge?: string | undefined;
|
|
7826
7833
|
} & {
|
|
7827
7834
|
[k: string]: unknown;
|
|
7828
7835
|
};
|
|
7836
|
+
timestamp: string;
|
|
7837
|
+
level: "error" | "warn" | "info";
|
|
7829
7838
|
metrics: Record<string, unknown>;
|
|
7830
7839
|
parent: {
|
|
7831
7840
|
logId: string;
|
|
@@ -7840,13 +7849,13 @@ declare const LogSearchResponseSchema: z$1.ZodObject<{
|
|
|
7840
7849
|
type: string;
|
|
7841
7850
|
status: "success" | "failed";
|
|
7842
7851
|
id: string;
|
|
7843
|
-
timestamp: string;
|
|
7844
|
-
level: "error" | "warn" | "info";
|
|
7845
7852
|
metadata: {
|
|
7846
7853
|
instant_charge?: string | undefined;
|
|
7847
7854
|
} & {
|
|
7848
7855
|
[k: string]: unknown;
|
|
7849
7856
|
};
|
|
7857
|
+
timestamp: string;
|
|
7858
|
+
level: "error" | "warn" | "info";
|
|
7850
7859
|
metrics: Record<string, unknown>;
|
|
7851
7860
|
parent: {
|
|
7852
7861
|
logId: string;
|
|
@@ -7860,13 +7869,13 @@ declare const LogSearchResponseSchema: z$1.ZodObject<{
|
|
|
7860
7869
|
type: string;
|
|
7861
7870
|
status: "success" | "failed";
|
|
7862
7871
|
id: string;
|
|
7863
|
-
timestamp: string;
|
|
7864
|
-
level: "error" | "warn" | "info";
|
|
7865
7872
|
metadata: {
|
|
7866
7873
|
instant_charge?: string | undefined;
|
|
7867
7874
|
} & {
|
|
7868
7875
|
[k: string]: unknown;
|
|
7869
7876
|
};
|
|
7877
|
+
timestamp: string;
|
|
7878
|
+
level: "error" | "warn" | "info";
|
|
7870
7879
|
metrics: Record<string, unknown>;
|
|
7871
7880
|
parent: {
|
|
7872
7881
|
logId: string;
|
|
@@ -7952,13 +7961,13 @@ declare const ToolExecutionLogDetailSchema: z$1.ZodObject<{
|
|
|
7952
7961
|
status: "success" | "failed";
|
|
7953
7962
|
data: Record<string, unknown>;
|
|
7954
7963
|
id: string;
|
|
7955
|
-
timestamp: string;
|
|
7956
|
-
level: "error" | "warn" | "info";
|
|
7957
7964
|
metadata: {
|
|
7958
7965
|
instant_charge?: string | undefined;
|
|
7959
7966
|
} & {
|
|
7960
7967
|
[k: string]: unknown;
|
|
7961
7968
|
};
|
|
7969
|
+
timestamp: string;
|
|
7970
|
+
level: "error" | "warn" | "info";
|
|
7962
7971
|
metrics: Record<string, unknown>;
|
|
7963
7972
|
parent: {
|
|
7964
7973
|
logId: string;
|
|
@@ -7984,13 +7993,13 @@ declare const ToolExecutionLogDetailSchema: z$1.ZodObject<{
|
|
|
7984
7993
|
status: "success" | "failed";
|
|
7985
7994
|
data: Record<string, unknown>;
|
|
7986
7995
|
id: string;
|
|
7987
|
-
timestamp: string;
|
|
7988
|
-
level: "error" | "warn" | "info";
|
|
7989
7996
|
metadata: {
|
|
7990
7997
|
instant_charge?: string | undefined;
|
|
7991
7998
|
} & {
|
|
7992
7999
|
[k: string]: unknown;
|
|
7993
8000
|
};
|
|
8001
|
+
timestamp: string;
|
|
8002
|
+
level: "error" | "warn" | "info";
|
|
7994
8003
|
metrics: Record<string, unknown>;
|
|
7995
8004
|
parent: {
|
|
7996
8005
|
logId: string;
|
|
@@ -8677,18 +8686,18 @@ declare const KeyringTransferKeySchema: z$1.ZodObject<{
|
|
|
8677
8686
|
/** Key identifier. Put it in the JWE protected header. */
|
|
8678
8687
|
kid: z$1.ZodString;
|
|
8679
8688
|
}, "strip", z$1.ZodTypeAny, {
|
|
8689
|
+
use: string;
|
|
8680
8690
|
kty: string;
|
|
8681
8691
|
n: string;
|
|
8682
8692
|
e: string;
|
|
8683
8693
|
alg: string;
|
|
8684
|
-
use: string;
|
|
8685
8694
|
kid: string;
|
|
8686
8695
|
}, {
|
|
8696
|
+
use: string;
|
|
8687
8697
|
kty: string;
|
|
8688
8698
|
n: string;
|
|
8689
8699
|
e: string;
|
|
8690
8700
|
alg: string;
|
|
8691
|
-
use: string;
|
|
8692
8701
|
kid: string;
|
|
8693
8702
|
}>;
|
|
8694
8703
|
type KeyringTransferKey = z$1.infer<typeof KeyringTransferKeySchema>;
|
|
@@ -8713,37 +8722,37 @@ declare const KeyringTransferKeysResponseSchema: z$1.ZodObject<{
|
|
|
8713
8722
|
/** Key identifier. Put it in the JWE protected header. */
|
|
8714
8723
|
kid: z$1.ZodString;
|
|
8715
8724
|
}, "strip", z$1.ZodTypeAny, {
|
|
8725
|
+
use: string;
|
|
8716
8726
|
kty: string;
|
|
8717
8727
|
n: string;
|
|
8718
8728
|
e: string;
|
|
8719
8729
|
alg: string;
|
|
8720
|
-
use: string;
|
|
8721
8730
|
kid: string;
|
|
8722
8731
|
}, {
|
|
8732
|
+
use: string;
|
|
8723
8733
|
kty: string;
|
|
8724
8734
|
n: string;
|
|
8725
8735
|
e: string;
|
|
8726
8736
|
alg: string;
|
|
8727
|
-
use: string;
|
|
8728
8737
|
kid: string;
|
|
8729
8738
|
}>, "many">;
|
|
8730
8739
|
}, "strip", z$1.ZodTypeAny, {
|
|
8731
8740
|
keys: {
|
|
8741
|
+
use: string;
|
|
8732
8742
|
kty: string;
|
|
8733
8743
|
n: string;
|
|
8734
8744
|
e: string;
|
|
8735
8745
|
alg: string;
|
|
8736
|
-
use: string;
|
|
8737
8746
|
kid: string;
|
|
8738
8747
|
}[];
|
|
8739
8748
|
activeKid: string;
|
|
8740
8749
|
}, {
|
|
8741
8750
|
keys: {
|
|
8751
|
+
use: string;
|
|
8742
8752
|
kty: string;
|
|
8743
8753
|
n: string;
|
|
8744
8754
|
e: string;
|
|
8745
8755
|
alg: string;
|
|
8746
|
-
use: string;
|
|
8747
8756
|
kid: string;
|
|
8748
8757
|
}[];
|
|
8749
8758
|
activeKid: string;
|
|
@@ -9025,6 +9034,17 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
|
|
|
9025
9034
|
//#region src/types/composio.types.d.ts
|
|
9026
9035
|
type ComposioRequestHeaders = Record<string, string>;
|
|
9027
9036
|
//#endregion
|
|
9037
|
+
//#region src/lib/toolRouterParams.d.ts
|
|
9038
|
+
/** Local tools options, accepted under their current names and the deprecated `custom*` aliases. */
|
|
9039
|
+
type LocalToolsOptions = {
|
|
9040
|
+
localTools?: LocalTool[];
|
|
9041
|
+
localToolkits?: LocalToolkit[];
|
|
9042
|
+
/** @deprecated Use `localTools` instead. */
|
|
9043
|
+
customTools?: LocalTool[];
|
|
9044
|
+
/** @deprecated Use `localToolkits` instead. */
|
|
9045
|
+
customToolkits?: LocalToolkit[];
|
|
9046
|
+
};
|
|
9047
|
+
//#endregion
|
|
9028
9048
|
//#region src/models/ToolRouter.d.ts
|
|
9029
9049
|
declare class ToolRouter<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool, unknown>> {
|
|
9030
9050
|
private client;
|
|
@@ -9057,6 +9077,7 @@ declare class ToolRouter<TToolCollection, TTool, TProvider extends BaseComposioP
|
|
|
9057
9077
|
* @param config {ToolRouterCreateSessionConfig} The config for the tool router session
|
|
9058
9078
|
* @returns {Promise<Session<TToolCollection, TTool, TProvider>>} The tool router session
|
|
9059
9079
|
* @throws {ComposioMCPDestinationError} When `mcp: true` is passed and the MCP URL is not on the API origin
|
|
9080
|
+
* @throws {ValidationError} When a local tools option and its deprecated `custom*` alias are both passed
|
|
9060
9081
|
*
|
|
9061
9082
|
* @example
|
|
9062
9083
|
* ```typescript
|
|
@@ -9068,8 +9089,8 @@ declare class ToolRouter<TToolCollection, TTool, TProvider extends BaseComposioP
|
|
|
9068
9089
|
* toolkits: ['gmail'],
|
|
9069
9090
|
* manageConnections: true,
|
|
9070
9091
|
* experimental: {
|
|
9071
|
-
*
|
|
9072
|
-
*
|
|
9092
|
+
* localTools: [myLocalTool],
|
|
9093
|
+
* localToolkits: [myLocalToolkit],
|
|
9073
9094
|
* },
|
|
9074
9095
|
* });
|
|
9075
9096
|
*
|
|
@@ -9095,8 +9116,12 @@ declare class ToolRouter<TToolCollection, TTool, TProvider extends BaseComposioP
|
|
|
9095
9116
|
* origins is logged, so native tools keep working.
|
|
9096
9117
|
*
|
|
9097
9118
|
* @param id {string} The id of the session to use
|
|
9119
|
+
* @param options {object} Optional session reuse options
|
|
9120
|
+
* @param options.localTools Local tools to attach to the session; `customTools` is a deprecated alias.
|
|
9121
|
+
* @param options.localToolkits Toolkits of local tools to attach; `customToolkits` is a deprecated alias.
|
|
9098
9122
|
* @returns {Promise<Session<TToolCollection, TTool, TProvider>>} The tool router session
|
|
9099
9123
|
* @throws {ComposioMCPDestinationError} When `mcp: true` is passed and the MCP URL is not on the API origin
|
|
9124
|
+
* @throws {ValidationError} When a local tools option and its deprecated `custom*` alias are both passed
|
|
9100
9125
|
*
|
|
9101
9126
|
* @example
|
|
9102
9127
|
* ```typescript
|
|
@@ -9110,14 +9135,10 @@ declare class ToolRouter<TToolCollection, TTool, TProvider extends BaseComposioP
|
|
|
9110
9135
|
* console.log(session.mcp.headers);
|
|
9111
9136
|
* ```
|
|
9112
9137
|
*/
|
|
9113
|
-
use(id: string, options: {
|
|
9114
|
-
customTools?: CustomTool[];
|
|
9115
|
-
customToolkits?: CustomToolkit[];
|
|
9138
|
+
use(id: string, options: LocalToolsOptions & {
|
|
9116
9139
|
mcp: true;
|
|
9117
9140
|
}, requestOptions?: ComposioRequestOptions): Promise<Session<TToolCollection, TTool, TProvider>>;
|
|
9118
|
-
use(id: string, options?: {
|
|
9119
|
-
customTools?: CustomTool[];
|
|
9120
|
-
customToolkits?: CustomToolkit[];
|
|
9141
|
+
use(id: string, options?: LocalToolsOptions & {
|
|
9121
9142
|
mcp?: boolean;
|
|
9122
9143
|
}, requestOptions?: ComposioRequestOptions): Promise<SessionWithoutMcp<TToolCollection, TTool, TProvider>>;
|
|
9123
9144
|
/**
|