Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 22:00 UTC
feat: add auth config ids support in fetching tools (#1742)
Himanshu Dixit committed
Jul 10, 2025 at 13:09 UTC
8bba19c6a10614dd1658c2ab33b92ea4eeaafc8c
8 files changed
+69
-29
.changeset/dirty-shoes-rhyme.md
new
+13
@@ -0,0 +1,13 @@
1
+---
2
+'@composio/core': minor
3
+'@composio/anthropic': minor
4
+'@composio/cloudflare': minor
5
+'@composio/google': minor
6
+'@composio/langchain': minor
7
+'@composio/mastra': minor
8
+'@composio/openai': minor
9
+'@composio/openai-agents': minor
10
+'@composio/vercel': minor
11
+---
12
+
13
+add auth config ids support
pnpm-lock.yaml
+33
-17
@@ -196,7 +196,7 @@ importers:
196
devDependencies:
197
'@cloudflare/vitest-pool-workers':
198
specifier: ^0.8.19
199
- version: 0.8.44(@cloudflare/workers-types@4.20250619.0)(@vitest/runner@3.2.4)(@vitest/snapshot@3.2.4)(vitest@3.2.4)
199
+ version: 0.8.44(@cloudflare/workers-types@4.20250619.0)(@vitest/runner@3.2.4)(@vitest/snapshot@3.2.4)(vitest@3.2.4(@types/node@24.0.3)(@vitest/ui@3.2.4)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))
200
typescript:
201
specifier: ^5.5.2
202
version: 5.8.3
@@ -537,7 +537,7 @@ importers:
537
version: 3.16.8
538
effect-errors:
539
specifier: ^1.10.11
540
- version: 1.10.11(aee16c6ba0d05f0cbe9c66fcd0455e75)
540
+ version: 1.10.11(dv5vjw6z3xfcz4ohf6dr5p6h5i)
541
indent-string:
542
specifier: ^5.0.0
543
version: 5.0.0
@@ -556,7 +556,7 @@ importers:
556
version: 0.85.2(effect@3.16.8)
557
'@effect/vitest':
558
specifier: ^0.23.8
559
- version: 0.23.8(effect@3.16.8)(vitest@3.2.4)
559
+ version: 0.23.8(effect@3.16.8)(vitest@3.2.4(@types/node@24.0.3)(@vitest/ui@3.2.4)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))
560
'@types/bun':
561
specifier: ^1.2.16
562
version: 1.2.16
@@ -582,8 +582,8 @@ importers:
582
ts/packages/core:
583
dependencies:
584
'@composio/client':
585
- specifier: 0.1.0-alpha.25
586
- version: 0.1.0-alpha.25
585
+ specifier: 0.1.0-alpha.27
586
+ version: 0.1.0-alpha.27
587
'@composio/json-schema-to-zod':
588
specifier: 0.1.10-next.3
589
version: 0.1.10-next.3
@@ -708,7 +708,7 @@ importers:
708
dependencies:
709
'@langchain/core':
710
specifier: ^0.3.44
711
- version: 0.3.58(openai@5.5.1(ws@8.18.2)(zod@3.25.67))
711
+ version: 0.3.58(openai@5.5.1(zod@3.25.67))
712
devDependencies:
713
'@composio/core':
714
specifier: workspace:*
@@ -1132,8 +1132,8 @@ packages:
1132
'@composio/client@0.1.0-alpha.17':
1133
resolution: {integrity: sha512-iNCDSgdwfFVsjbbyZIMknMPy4uO8Xw5+MP2aI+yoQo34VXF17Fi6ZHYirrJPf8RbdoRROZTDJjC/rU18mMzC2Q==}
1134
1135
- '@composio/client@0.1.0-alpha.25':
1136
- resolution: {integrity: sha512-5zbqn3zxSoIs4MtfuEKZ3p+xE6Is/PPh77ldoIT9iBYvZrw9RsqA7Xlyw5PgbIiG3QPoeRSpEAnjwBoVwU8ehQ==}
1135
+ '@composio/client@0.1.0-alpha.27':
1136
+ resolution: {integrity: sha512-IMjiJg8P9OVILmm0zDbshxvwCTzQg7Unxy4ighYp91z1BELakO9lBNSFWU4kRhSS9Tow/RiuBO63bNhPAT00cA==}
1137
1138
'@composio/json-schema-to-zod@0.1.10-next.3':
1139
resolution: {integrity: sha512-kglZdteq+18Tcikb1US7D47VX3A3x8haeE+qFCwpQbBAgp3vG+eMQnZ6WgMkLNroZNrTm5oiAJrSdjerbiAqIA==}
@@ -6853,7 +6853,7 @@ snapshots:
6853
optionalDependencies:
6854
workerd: 1.20250617.0
6855
6856
- '@cloudflare/vitest-pool-workers@0.8.44(@cloudflare/workers-types@4.20250619.0)(@vitest/runner@3.2.4)(@vitest/snapshot@3.2.4)(vitest@3.2.4)':
6856
+ '@cloudflare/vitest-pool-workers@0.8.44(@cloudflare/workers-types@4.20250619.0)(@vitest/runner@3.2.4)(@vitest/snapshot@3.2.4)(vitest@3.2.4(@types/node@24.0.3)(@vitest/ui@3.2.4)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))':
6857
dependencies:
6858
'@vitest/runner': 3.2.4
6859
'@vitest/snapshot': 3.2.4
@@ -6889,7 +6889,7 @@ snapshots:
6889
6890
'@composio/client@0.1.0-alpha.17': {}
6891
6892
- '@composio/client@0.1.0-alpha.25': {}
6892
+ '@composio/client@0.1.0-alpha.27': {}
6893
6894
'@composio/json-schema-to-zod@0.1.10-next.3':
6895
dependencies:
@@ -7027,7 +7027,7 @@ snapshots:
7027
dependencies:
7028
effect: 3.16.8
7029
7030
- '@effect/vitest@0.23.8(effect@3.16.8)(vitest@3.2.4)':
7030
+ '@effect/vitest@0.23.8(effect@3.16.8)(vitest@3.2.4(@types/node@24.0.3)(@vitest/ui@3.2.4)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))':
7031
dependencies:
7032
effect: 3.16.8
7033
vitest: 3.2.4(@types/node@24.0.3)(@vitest/ui@3.2.4)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0)
@@ -7585,14 +7585,14 @@ snapshots:
7585
7586
'@jsdevtools/ono@7.1.3': {}
7587
7588
- '@langchain/core@0.3.58(openai@5.5.1(ws@8.18.2)(zod@3.25.67))':
7588
+ '@langchain/core@0.3.58(openai@5.5.1(zod@3.25.67))':
7589
dependencies:
7590
'@cfworker/json-schema': 4.1.1
7591
ansi-styles: 5.2.0
7592
camelcase: 6.3.0
7593
decamelize: 1.2.0
7594
js-tiktoken: 1.0.20
7595
- langsmith: 0.3.31(openai@5.5.1(ws@8.18.2)(zod@3.25.67))
7595
+ langsmith: 0.3.31(openai@5.5.1(zod@3.25.67))
7596
mustache: 4.2.0
7597
p-queue: 6.6.2
7598
p-retry: 4.6.2
@@ -9299,6 +9299,14 @@ snapshots:
9299
chai: 5.2.0
9300
tinyrainbow: 2.0.0
9301
9302
+ '@vitest/mocker@3.2.4(vite@6.3.5(@types/node@20.19.1)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))':
9303
+ dependencies:
9304
+ '@vitest/spy': 3.2.4
9305
+ estree-walker: 3.0.3
9306
+ magic-string: 0.30.17
9307
+ optionalDependencies:
9308
+ vite: 6.3.5(@types/node@20.19.1)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0)
9309
+
9310
'@vitest/mocker@3.2.4(vite@6.3.5(@types/node@22.15.32)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))':
9311
dependencies:
9312
'@vitest/spy': 3.2.4
@@ -9307,6 +9315,14 @@ snapshots:
9315
optionalDependencies:
9316
vite: 6.3.5(@types/node@22.15.32)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0)
9317
9318
+ '@vitest/mocker@3.2.4(vite@6.3.5(@types/node@24.0.3)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))':
9319
+ dependencies:
9320
+ '@vitest/spy': 3.2.4
9321
+ estree-walker: 3.0.3
9322
+ magic-string: 0.30.17
9323
+ optionalDependencies:
9324
+ vite: 6.3.5(@types/node@24.0.3)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0)
9325
+
9326
'@vitest/pretty-format@3.2.4':
9327
dependencies:
9328
tinyrainbow: 2.0.0
@@ -9832,7 +9848,7 @@ snapshots:
9848
9849
ee-first@1.1.1: {}
9850
9835
- effect-errors@1.10.11(aee16c6ba0d05f0cbe9c66fcd0455e75):
9851
+ effect-errors@1.10.11(dv5vjw6z3xfcz4ohf6dr5p6h5i):
9852
dependencies:
9853
'@effect/cluster': 0.39.4(@effect/platform@0.85.2(effect@3.16.8))(@effect/rpc@0.62.4(@effect/platform@0.85.2(effect@3.16.8))(effect@3.16.8))(@effect/sql@0.38.2(@effect/experimental@0.49.2(@effect/platform@0.85.2(effect@3.16.8))(effect@3.16.8))(@effect/platform@0.85.2(effect@3.16.8))(effect@3.16.8))(@effect/workflow@0.2.4(@effect/platform@0.85.2(effect@3.16.8))(@effect/rpc@0.62.4(@effect/platform@0.85.2(effect@3.16.8))(effect@3.16.8))(effect@3.16.8))(effect@3.16.8)
9854
'@effect/platform': 0.85.2(effect@3.16.8)
@@ -10666,7 +10682,7 @@ snapshots:
10682
- openai
10683
- ws
10684
10669
- langsmith@0.3.31(openai@5.5.1(ws@8.18.2)(zod@3.25.67)):
10685
+ langsmith@0.3.31(openai@5.5.1(zod@3.25.67)):
10686
dependencies:
10687
'@types/uuid': 10.0.0
10688
chalk: 4.1.2
@@ -12167,7 +12183,7 @@ snapshots:
12183
dependencies:
12184
'@types/chai': 5.2.2
12185
'@vitest/expect': 3.2.4
12170
- '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@22.15.32)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))
12186
+ '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@20.19.1)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))
12187
'@vitest/pretty-format': 3.2.4
12188
'@vitest/runner': 3.2.4
12189
'@vitest/snapshot': 3.2.4
@@ -12251,7 +12267,7 @@ snapshots:
12267
dependencies:
12268
'@types/chai': 5.2.2
12269
'@vitest/expect': 3.2.4
12254
- '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@22.15.32)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))
12270
+ '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@24.0.3)(jiti@1.21.7)(tsx@4.20.3)(yaml@2.8.0))
12271
'@vitest/pretty-format': 3.2.4
12272
'@vitest/runner': 3.2.4
12273
'@vitest/snapshot': 3.2.4
ts/packages/core/package.json
+1
-1
@@ -43,7 +43,7 @@
43
"vitest": "^3.1.4"
44
},
45
"dependencies": {
46
- "@composio/client": "0.1.0-alpha.25",
46
+ "@composio/client": "0.1.0-alpha.27",
47
"@composio/json-schema-to-zod": "0.1.10-next.3",
48
"@types/json-schema": "^7.0.15",
49
"chalk": "^4.1.2",
ts/packages/core/src/models/ConnectedAccounts.ts
+1
-1
@@ -86,7 +86,7 @@ export class ConnectedAccounts {
86
}
87
rawQuery = {
88
auth_config_ids: parsedQuery.data.authConfigIds,
89
- cursor: parsedQuery.data.cursor,
89
+ cursor: parsedQuery.data.cursor?.toString(),
90
labels: parsedQuery.data.labels,
91
limit: parsedQuery.data.limit,
92
order_by: parsedQuery.data.orderBy,
ts/packages/core/src/models/Tools.ts
+5
-2
@@ -398,9 +398,9 @@ export class Tools<
398
}
399
400
// if tools are provided, set the limit to 9999 so that all tools are fetched
401
- let limit = 'limit' in queryParams.data ? queryParams.data.limit?.toString() : undefined;
401
+ let limit = 'limit' in queryParams.data ? queryParams.data.limit : undefined;
402
if ('tools' in queryParams.data) {
403
- limit = '9999';
403
+ limit = 9999;
404
}
405
406
const filters: ComposioToolListParams = {
@@ -412,6 +412,9 @@ export class Tools<
412
...('tags' in queryParams.data ? { tags: queryParams.data.tags } : {}),
413
...('scopes' in queryParams.data ? { scopes: queryParams.data.scopes } : {}),
414
...('search' in queryParams.data ? { search: queryParams.data.search } : {}),
415
+ ...('authConfigIds' in queryParams.data
416
+ ? { auth_config_ids: queryParams.data.authConfigIds }
417
+ : {}),
418
};
419
420
logger.debug(`Fetching tools with filters: ${JSON.stringify(filters, null, 2)}`);
ts/packages/core/src/models/Triggers.ts
+1
-1
@@ -341,7 +341,7 @@ export class Triggers {
341
.with(TriggersTypeListResponseSchema)
342
.using(raw => ({
343
items: raw.items,
344
- nextCursor: raw.next_cursor,
344
+ nextCursor: raw.next_cursor ?? null,
345
totalPages: raw.total_pages,
346
}));
347
ts/packages/core/src/types/tool.types.ts
+10
-2
@@ -138,8 +138,9 @@ export const ToolListParamsSchema = z.object({
138
toolkits: z.array(z.string()).optional(),
139
scopes: z.array(z.string()).optional(),
140
tags: z.array(z.string()).optional(),
141
- limit: z.number().optional(),
141
+ limit: z.coerce.number().optional(),
142
search: z.string().optional(),
143
+ authConfigIds: z.array(z.string()).optional(),
144
});
145
146
type BaseParams = {
@@ -190,6 +191,12 @@ type SearchOnlyParams = {
191
tags?: never;
192
};
193
194
+// tools by auth config ids only
195
+type AuthConfigIdsOnlyParams = {
196
+ authConfigIds: string[];
197
+ tools?: never;
198
+ toolkit?: never;
199
+} & Pick<BaseParams, 'limit' | 'search' | 'tags'>;
200
/**
201
* ToolListParams is the parameters for the list of tools.
202
* You must provide either tools or toolkits, but not both.
@@ -199,7 +206,8 @@ export type ToolListParams =
206
| ToolkitsOnlyParams
207
| ToolkitScopeOnlyParams
208
| SearchOnlyParams
202
- | TagsOnlyParams;
209
+ | TagsOnlyParams
210
+ | AuthConfigIdsOnlyParams;
211
212
/**
213
* CustomAuthParams is the parameters for the custom authentication.
ts/packages/core/test/tools/tools.test.ts
+5
-5
@@ -66,7 +66,7 @@ describe('Tools', () => {
66
67
expect(mockClient.tools.list).toHaveBeenCalledWith({
68
tool_slugs: 'TOOL1,TOOL2',
69
- limit: '9999',
69
+ limit: 9999,
70
search: undefined,
71
toolkit_slug: undefined,
72
});
@@ -89,7 +89,7 @@ describe('Tools', () => {
89
expect(mockClient.tools.list).toHaveBeenCalledWith({
90
tool_slugs: undefined,
91
toolkit_slug: 'github',
92
- limit: '10',
92
+ limit: 10,
93
search: undefined,
94
});
95
});
@@ -112,7 +112,7 @@ describe('Tools', () => {
112
expect(mockClient.tools.list).toHaveBeenCalledWith({
113
tool_slugs: undefined,
114
toolkit_slug: 'github',
115
- limit: '10',
115
+ limit: 10,
116
search: 'test',
117
});
118
});
@@ -135,7 +135,7 @@ describe('Tools', () => {
135
expect(mockClient.tools.list).toHaveBeenCalledWith({
136
tool_slugs: undefined,
137
toolkit_slug: 'todoist',
138
- limit: '10',
138
+ limit: 10,
139
search: undefined,
140
scopes: ['task:add', 'task:read'],
141
});
@@ -160,7 +160,7 @@ describe('Tools', () => {
160
expect(mockClient.tools.list).toHaveBeenCalledWith({
161
tool_slugs: undefined,
162
toolkit_slug: 'todoist',
163
- limit: '10',
163
+ limit: 10,
164
search: 'add task',
165
scopes: ['task:add'],
166
});