@composio/client 0.1.0-alpha.60 → 0.1.0-alpha.62

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.
Files changed (229) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/client.d.mts +34 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +34 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +41 -7
  7. package/client.js.map +1 -1
  8. package/client.mjs +41 -7
  9. package/client.mjs.map +1 -1
  10. package/internal/utils/query.d.mts +2 -0
  11. package/internal/utils/query.d.mts.map +1 -0
  12. package/internal/utils/query.d.ts +2 -0
  13. package/internal/utils/query.d.ts.map +1 -0
  14. package/internal/utils/query.js +10 -0
  15. package/internal/utils/query.js.map +1 -0
  16. package/internal/utils/query.mjs +6 -0
  17. package/internal/utils/query.mjs.map +1 -0
  18. package/internal/utils.d.mts +1 -0
  19. package/internal/utils.d.ts +1 -0
  20. package/internal/utils.js +1 -0
  21. package/internal/utils.js.map +1 -1
  22. package/internal/utils.mjs +1 -0
  23. package/package.json +12 -1
  24. package/resources/auth-configs.d.mts +20 -1
  25. package/resources/auth-configs.d.mts.map +1 -1
  26. package/resources/auth-configs.d.ts +20 -1
  27. package/resources/auth-configs.d.ts.map +1 -1
  28. package/resources/auth-configs.js +3 -0
  29. package/resources/auth-configs.js.map +1 -1
  30. package/resources/auth-configs.mjs +3 -0
  31. package/resources/auth-configs.mjs.map +1 -1
  32. package/resources/cli/realtime.d.mts +3 -0
  33. package/resources/cli/realtime.d.mts.map +1 -1
  34. package/resources/cli/realtime.d.ts +3 -0
  35. package/resources/cli/realtime.d.ts.map +1 -1
  36. package/resources/cli/realtime.js +3 -0
  37. package/resources/cli/realtime.js.map +1 -1
  38. package/resources/cli/realtime.mjs +3 -0
  39. package/resources/cli/realtime.mjs.map +1 -1
  40. package/resources/connected-accounts.d.mts +899 -174
  41. package/resources/connected-accounts.d.mts.map +1 -1
  42. package/resources/connected-accounts.d.ts +899 -174
  43. package/resources/connected-accounts.d.ts.map +1 -1
  44. package/resources/connected-accounts.js +3 -0
  45. package/resources/connected-accounts.js.map +1 -1
  46. package/resources/connected-accounts.mjs +3 -0
  47. package/resources/connected-accounts.mjs.map +1 -1
  48. package/resources/files.d.mts +3 -0
  49. package/resources/files.d.mts.map +1 -1
  50. package/resources/files.d.ts +3 -0
  51. package/resources/files.d.ts.map +1 -1
  52. package/resources/files.js +3 -0
  53. package/resources/files.js.map +1 -1
  54. package/resources/files.mjs +3 -0
  55. package/resources/files.mjs.map +1 -1
  56. package/resources/link.d.mts +171 -1
  57. package/resources/link.d.mts.map +1 -1
  58. package/resources/link.d.ts +171 -1
  59. package/resources/link.d.ts.map +1 -1
  60. package/resources/link.js +3 -0
  61. package/resources/link.js.map +1 -1
  62. package/resources/link.mjs +3 -0
  63. package/resources/link.mjs.map +1 -1
  64. package/resources/logs/tools.d.mts +3 -0
  65. package/resources/logs/tools.d.mts.map +1 -1
  66. package/resources/logs/tools.d.ts +3 -0
  67. package/resources/logs/tools.d.ts.map +1 -1
  68. package/resources/logs/tools.js +3 -0
  69. package/resources/logs/tools.js.map +1 -1
  70. package/resources/logs/tools.mjs +3 -0
  71. package/resources/logs/tools.mjs.map +1 -1
  72. package/resources/logs/triggers.d.mts +3 -0
  73. package/resources/logs/triggers.d.mts.map +1 -1
  74. package/resources/logs/triggers.d.ts +3 -0
  75. package/resources/logs/triggers.d.ts.map +1 -1
  76. package/resources/logs/triggers.js +3 -0
  77. package/resources/logs/triggers.js.map +1 -1
  78. package/resources/logs/triggers.mjs +3 -0
  79. package/resources/logs/triggers.mjs.map +1 -1
  80. package/resources/mcp/custom.d.mts +3 -0
  81. package/resources/mcp/custom.d.mts.map +1 -1
  82. package/resources/mcp/custom.d.ts +3 -0
  83. package/resources/mcp/custom.d.ts.map +1 -1
  84. package/resources/mcp/custom.js +3 -0
  85. package/resources/mcp/custom.js.map +1 -1
  86. package/resources/mcp/custom.mjs +3 -0
  87. package/resources/mcp/custom.mjs.map +1 -1
  88. package/resources/mcp/generate.d.mts +3 -0
  89. package/resources/mcp/generate.d.mts.map +1 -1
  90. package/resources/mcp/generate.d.ts +3 -0
  91. package/resources/mcp/generate.d.ts.map +1 -1
  92. package/resources/mcp/generate.js +3 -0
  93. package/resources/mcp/generate.js.map +1 -1
  94. package/resources/mcp/generate.mjs +3 -0
  95. package/resources/mcp/generate.mjs.map +1 -1
  96. package/resources/mcp/mcp.d.mts +3 -0
  97. package/resources/mcp/mcp.d.mts.map +1 -1
  98. package/resources/mcp/mcp.d.ts +3 -0
  99. package/resources/mcp/mcp.d.ts.map +1 -1
  100. package/resources/mcp/mcp.js +3 -0
  101. package/resources/mcp/mcp.js.map +1 -1
  102. package/resources/mcp/mcp.mjs +3 -0
  103. package/resources/mcp/mcp.mjs.map +1 -1
  104. package/resources/migration.d.mts +3 -0
  105. package/resources/migration.d.mts.map +1 -1
  106. package/resources/migration.d.ts +3 -0
  107. package/resources/migration.d.ts.map +1 -1
  108. package/resources/migration.js +3 -0
  109. package/resources/migration.js.map +1 -1
  110. package/resources/migration.mjs +3 -0
  111. package/resources/migration.mjs.map +1 -1
  112. package/resources/tool-router/index.d.mts +1 -1
  113. package/resources/tool-router/index.d.mts.map +1 -1
  114. package/resources/tool-router/index.d.ts +1 -1
  115. package/resources/tool-router/index.d.ts.map +1 -1
  116. package/resources/tool-router/index.js +2 -2
  117. package/resources/tool-router/index.js.map +1 -1
  118. package/resources/tool-router/index.mjs +1 -1
  119. package/resources/tool-router/index.mjs.map +1 -1
  120. package/resources/tool-router/session/files.d.mts +205 -0
  121. package/resources/tool-router/session/files.d.mts.map +1 -0
  122. package/resources/tool-router/session/files.d.ts +205 -0
  123. package/resources/tool-router/session/files.d.ts.map +1 -0
  124. package/resources/tool-router/session/files.js +101 -0
  125. package/resources/tool-router/session/files.js.map +1 -0
  126. package/resources/tool-router/session/files.mjs +97 -0
  127. package/resources/tool-router/session/files.mjs.map +1 -0
  128. package/resources/tool-router/session/index.d.mts +3 -0
  129. package/resources/tool-router/session/index.d.mts.map +1 -0
  130. package/resources/tool-router/session/index.d.ts +3 -0
  131. package/resources/tool-router/session/index.d.ts.map +1 -0
  132. package/resources/tool-router/session/index.js +9 -0
  133. package/resources/tool-router/session/index.js.map +1 -0
  134. package/resources/tool-router/session/index.mjs +4 -0
  135. package/resources/tool-router/session/index.mjs.map +1 -0
  136. package/resources/tool-router/session/session.d.mts +1990 -0
  137. package/resources/tool-router/session/session.d.mts.map +1 -0
  138. package/resources/tool-router/session/session.d.ts +1990 -0
  139. package/resources/tool-router/session/session.d.ts.map +1 -0
  140. package/resources/tool-router/session/session.js +181 -0
  141. package/resources/tool-router/session/session.js.map +1 -0
  142. package/resources/tool-router/session/session.mjs +176 -0
  143. package/resources/tool-router/session/session.mjs.map +1 -0
  144. package/resources/tool-router/session.d.mts +1 -1193
  145. package/resources/tool-router/session.d.mts.map +1 -1
  146. package/resources/tool-router/session.d.ts +1 -1193
  147. package/resources/tool-router/session.d.ts.map +1 -1
  148. package/resources/tool-router/session.js +2 -138
  149. package/resources/tool-router/session.js.map +1 -1
  150. package/resources/tool-router/session.mjs +1 -136
  151. package/resources/tool-router/session.mjs.map +1 -1
  152. package/resources/tool-router/tool-router.d.mts +6 -3
  153. package/resources/tool-router/tool-router.d.mts.map +1 -1
  154. package/resources/tool-router/tool-router.d.ts +6 -3
  155. package/resources/tool-router/tool-router.d.ts.map +1 -1
  156. package/resources/tool-router/tool-router.js +5 -2
  157. package/resources/tool-router/tool-router.js.map +1 -1
  158. package/resources/tool-router/tool-router.mjs +5 -2
  159. package/resources/tool-router/tool-router.mjs.map +1 -1
  160. package/resources/toolkits.d.mts +16 -0
  161. package/resources/toolkits.d.mts.map +1 -1
  162. package/resources/toolkits.d.ts +16 -0
  163. package/resources/toolkits.d.ts.map +1 -1
  164. package/resources/toolkits.js +3 -0
  165. package/resources/toolkits.js.map +1 -1
  166. package/resources/toolkits.mjs +3 -0
  167. package/resources/toolkits.mjs.map +1 -1
  168. package/resources/tools.d.mts +83 -2
  169. package/resources/tools.d.mts.map +1 -1
  170. package/resources/tools.d.ts +83 -2
  171. package/resources/tools.d.ts.map +1 -1
  172. package/resources/tools.js +3 -0
  173. package/resources/tools.js.map +1 -1
  174. package/resources/tools.mjs +3 -0
  175. package/resources/tools.mjs.map +1 -1
  176. package/resources/trigger-instances/manage.d.mts +3 -0
  177. package/resources/trigger-instances/manage.d.mts.map +1 -1
  178. package/resources/trigger-instances/manage.d.ts +3 -0
  179. package/resources/trigger-instances/manage.d.ts.map +1 -1
  180. package/resources/trigger-instances/manage.js +3 -0
  181. package/resources/trigger-instances/manage.js.map +1 -1
  182. package/resources/trigger-instances/manage.mjs +3 -0
  183. package/resources/trigger-instances/manage.mjs.map +1 -1
  184. package/resources/trigger-instances/trigger-instances.d.mts +7 -0
  185. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  186. package/resources/trigger-instances/trigger-instances.d.ts +7 -0
  187. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  188. package/resources/trigger-instances/trigger-instances.js +3 -0
  189. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  190. package/resources/trigger-instances/trigger-instances.mjs +3 -0
  191. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  192. package/resources/triggers-types.d.mts +3 -0
  193. package/resources/triggers-types.d.mts.map +1 -1
  194. package/resources/triggers-types.d.ts +3 -0
  195. package/resources/triggers-types.d.ts.map +1 -1
  196. package/resources/triggers-types.js +3 -0
  197. package/resources/triggers-types.js.map +1 -1
  198. package/resources/triggers-types.mjs +3 -0
  199. package/resources/triggers-types.mjs.map +1 -1
  200. package/src/client.ts +44 -10
  201. package/src/internal/utils/query.ts +7 -0
  202. package/src/internal/utils.ts +1 -0
  203. package/src/resources/auth-configs.ts +24 -1
  204. package/src/resources/cli/realtime.ts +3 -0
  205. package/src/resources/connected-accounts.ts +3141 -1736
  206. package/src/resources/files.ts +3 -0
  207. package/src/resources/link.ts +332 -1
  208. package/src/resources/logs/tools.ts +3 -0
  209. package/src/resources/logs/triggers.ts +3 -0
  210. package/src/resources/mcp/custom.ts +3 -0
  211. package/src/resources/mcp/generate.ts +3 -0
  212. package/src/resources/mcp/mcp.ts +3 -0
  213. package/src/resources/migration.ts +3 -0
  214. package/src/resources/tool-router/index.ts +3 -1
  215. package/src/resources/tool-router/session/files.ts +284 -0
  216. package/src/resources/tool-router/session/index.ts +33 -0
  217. package/src/resources/tool-router/session/session.ts +2669 -0
  218. package/src/resources/tool-router/session.ts +1 -1432
  219. package/src/resources/tool-router/tool-router.ts +9 -2
  220. package/src/resources/toolkits.ts +19 -0
  221. package/src/resources/tools.ts +151 -2
  222. package/src/resources/trigger-instances/manage.ts +3 -0
  223. package/src/resources/trigger-instances/trigger-instances.ts +8 -0
  224. package/src/resources/triggers-types.ts +3 -0
  225. package/src/version.ts +1 -1
  226. package/version.d.mts +1 -1
  227. package/version.d.ts +1 -1
  228. package/version.js +1 -1
  229. package/version.mjs +1 -1
@@ -0,0 +1,2669 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as FilesAPI from './files';
5
+ import {
6
+ FileCreateDownloadURLParams,
7
+ FileCreateDownloadURLResponse,
8
+ FileCreateUploadURLParams,
9
+ FileCreateUploadURLResponse,
10
+ FileDeleteParams,
11
+ FileDeleteResponse,
12
+ FileListParams,
13
+ FileListResponse,
14
+ Files,
15
+ } from './files';
16
+ import { APIPromise } from '../../../core/api-promise';
17
+ import { RequestOptions } from '../../../internal/request-options';
18
+ import { path } from '../../../internal/utils/path';
19
+
20
+ /**
21
+ * (Labs) Tool router endpoints
22
+ */
23
+ export class Session extends APIResource {
24
+ files: FilesAPI.Files = new FilesAPI.Files(this._client);
25
+
26
+ /**
27
+ * Creates a new session for the tool router feature. This endpoint initializes a
28
+ * new session with specified toolkits and their authentication configurations. The
29
+ * session provides an isolated environment for testing and managing tool routing
30
+ * logic with scoped MCP server access.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const session = await client.toolRouter.session.create({
35
+ * user_id: 'user_123456789',
36
+ * });
37
+ * ```
38
+ */
39
+ create(body: SessionCreateParams, options?: RequestOptions): APIPromise<SessionCreateResponse> {
40
+ return this._client.post('/api/v3/tool_router/session', { body, ...options });
41
+ }
42
+
43
+ /**
44
+ * Retrieves an existing tool router session by its ID. Returns the session
45
+ * configuration, MCP server URL, and available tools.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const session = await client.toolRouter.session.retrieve(
50
+ * 'trs_123456789',
51
+ * );
52
+ * ```
53
+ */
54
+ retrieve(sessionID: string, options?: RequestOptions): APIPromise<SessionRetrieveResponse> {
55
+ return this._client.get(path`/api/v3/tool_router/session/${sessionID}`, options);
56
+ }
57
+
58
+ /**
59
+ * Executes a specific tool within a tool router session. The toolkit is
60
+ * automatically inferred from the tool slug. The tool must belong to an allowed
61
+ * toolkit and must not be disabled in the session configuration. This endpoint
62
+ * validates permissions, resolves connected accounts, and executes the tool with
63
+ * the session context.
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const response = await client.toolRouter.session.execute(
68
+ * 'trs_LX9uJKBinWWr',
69
+ * { tool_slug: 'GITHUB_CREATE_ISSUE' },
70
+ * );
71
+ * ```
72
+ */
73
+ execute(
74
+ sessionID: string,
75
+ body: SessionExecuteParams,
76
+ options?: RequestOptions,
77
+ ): APIPromise<SessionExecuteResponse> {
78
+ return this._client.post(path`/api/v3/tool_router/session/${sessionID}/execute`, { body, ...options });
79
+ }
80
+
81
+ /**
82
+ * Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const response =
87
+ * await client.toolRouter.session.executeMeta(
88
+ * 'trs_LX9uJKBinWWr',
89
+ * { slug: 'COMPOSIO_MANAGE_CONNECTIONS' },
90
+ * );
91
+ * ```
92
+ */
93
+ executeMeta(
94
+ sessionID: string,
95
+ body: SessionExecuteMetaParams,
96
+ options?: RequestOptions,
97
+ ): APIPromise<SessionExecuteMetaResponse> {
98
+ return this._client.post(path`/api/v3/tool_router/session/${sessionID}/execute_meta`, {
99
+ body,
100
+ ...options,
101
+ });
102
+ }
103
+
104
+ /**
105
+ * Initiates an authentication link session for a specific toolkit within a tool
106
+ * router session. Returns a link token and redirect URL that users can use to
107
+ * complete the OAuth flow.
108
+ *
109
+ * @example
110
+ * ```ts
111
+ * const response = await client.toolRouter.session.link(
112
+ * 'trs_LX9uJKBinWWr',
113
+ * { toolkit: 'github' },
114
+ * );
115
+ * ```
116
+ */
117
+ link(
118
+ sessionID: string,
119
+ body: SessionLinkParams,
120
+ options?: RequestOptions,
121
+ ): APIPromise<SessionLinkResponse> {
122
+ return this._client.post(path`/api/v3/tool_router/session/${sessionID}/link`, { body, ...options });
123
+ }
124
+
125
+ /**
126
+ * Execute any native API call on a toolkit with authentication automatically
127
+ * injected from Composio. This endpoint proxies HTTP requests to third-party APIs
128
+ * using connected account credentials resolved from the session context. Provide
129
+ * the toolkit slug, API endpoint, and HTTP method — Composio handles
130
+ * authentication injection, abstracting away credential management. Supports all
131
+ * HTTP methods, custom headers/query parameters, and binary request/response
132
+ * bodies.
133
+ *
134
+ * @example
135
+ * ```ts
136
+ * const response =
137
+ * await client.toolRouter.session.proxyExecute(
138
+ * 'trs_LX9uJKBinWWr',
139
+ * {
140
+ * endpoint: '/api/v1/resources',
141
+ * method: 'GET',
142
+ * toolkit_slug: 'gmail',
143
+ * },
144
+ * );
145
+ * ```
146
+ */
147
+ proxyExecute(
148
+ sessionID: string,
149
+ body: SessionProxyExecuteParams,
150
+ options?: RequestOptions,
151
+ ): APIPromise<SessionProxyExecuteResponse> {
152
+ return this._client.post(path`/api/v3/tool_router/session/${sessionID}/proxy_execute`, {
153
+ body,
154
+ ...options,
155
+ });
156
+ }
157
+
158
+ /**
159
+ * Search for tools matching a given use case query within a tool router session.
160
+ * Returns matching tool slugs, full tool schemas, toolkit connection statuses, and
161
+ * workflow guidance in a predictable format.
162
+ *
163
+ * @example
164
+ * ```ts
165
+ * const response = await client.toolRouter.session.search(
166
+ * 'trs_LX9uJKBinWWr',
167
+ * {
168
+ * queries: [
169
+ * { use_case: 'Send a slack message to a channel' },
170
+ * ],
171
+ * },
172
+ * );
173
+ * ```
174
+ */
175
+ search(
176
+ sessionID: string,
177
+ body: SessionSearchParams,
178
+ options?: RequestOptions,
179
+ ): APIPromise<SessionSearchResponse> {
180
+ return this._client.post(path`/api/v3/tool_router/session/${sessionID}/search`, { body, ...options });
181
+ }
182
+
183
+ /**
184
+ * Retrieves a cursor-paginated list of toolkits available in the tool router
185
+ * session. Includes toolkit metadata, composio-managed auth schemes, and connected
186
+ * accounts if available. Optionally filter by specific toolkit slugs.
187
+ *
188
+ * @example
189
+ * ```ts
190
+ * const response = await client.toolRouter.session.toolkits(
191
+ * 'trs_123456789',
192
+ * );
193
+ * ```
194
+ */
195
+ toolkits(
196
+ sessionID: string,
197
+ query: SessionToolkitsParams | null | undefined = {},
198
+ options?: RequestOptions,
199
+ ): APIPromise<SessionToolkitsResponse> {
200
+ return this._client.get(path`/api/v3/tool_router/session/${sessionID}/toolkits`, { query, ...options });
201
+ }
202
+
203
+ /**
204
+ * Returns the meta tools available in a tool router session with their complete
205
+ * schemas. This includes request and response schemas specific to the session
206
+ * context.
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * const response = await client.toolRouter.session.tools(
211
+ * 'session_id',
212
+ * );
213
+ * ```
214
+ */
215
+ tools(
216
+ sessionID: string,
217
+ query?: SessionToolsParams | null | undefined,
218
+ options?: RequestOptions,
219
+ ): APIPromise<SessionToolsResponse> {
220
+ return this._client.get(path`/api/v3/tool_router/session/${sessionID}/tools`, options);
221
+ }
222
+ }
223
+
224
+ export interface SessionCreateResponse {
225
+ /**
226
+ * The session configuration including user, toolkits, and overrides
227
+ */
228
+ config: SessionCreateResponse.Config;
229
+
230
+ mcp: SessionCreateResponse.Mcp;
231
+
232
+ /**
233
+ * The identifier of the session
234
+ */
235
+ session_id: string;
236
+
237
+ /**
238
+ * List of available tools in this session
239
+ */
240
+ tool_router_tools: Array<string>;
241
+
242
+ /**
243
+ * Experimental features including the generated system prompt. Only returned on
244
+ * session creation, not on GET.
245
+ */
246
+ experimental?: SessionCreateResponse.Experimental;
247
+ }
248
+
249
+ export namespace SessionCreateResponse {
250
+ /**
251
+ * The session configuration including user, toolkits, and overrides
252
+ */
253
+ export interface Config {
254
+ /**
255
+ * User identifier for this session
256
+ */
257
+ user_id: string;
258
+
259
+ /**
260
+ * Auth config overrides per toolkit
261
+ */
262
+ auth_configs?: { [key: string]: string };
263
+
264
+ /**
265
+ * Connected account overrides per toolkit
266
+ */
267
+ connected_accounts?: { [key: string]: string };
268
+
269
+ /**
270
+ * Manage connections configuration
271
+ */
272
+ manage_connections?: Config.ManageConnections;
273
+
274
+ /**
275
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
276
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
277
+ * tool must NOT have any of. Both conditions must be satisfied.
278
+ */
279
+ tags?: Config.Tags;
280
+
281
+ /**
282
+ * Toolkit configuration - either enabled list or disabled list
283
+ */
284
+ toolkits?: Config.Enabled | Config.Disabled;
285
+
286
+ /**
287
+ * Tool-level configuration per toolkit
288
+ */
289
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
290
+
291
+ /**
292
+ * Workbench configuration
293
+ */
294
+ workbench?: Config.Workbench;
295
+ }
296
+
297
+ export namespace Config {
298
+ /**
299
+ * Manage connections configuration
300
+ */
301
+ export interface ManageConnections {
302
+ /**
303
+ * Custom callback URL for connected account auth flows
304
+ */
305
+ callback_url?: string;
306
+
307
+ /**
308
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
309
+ * Default false. May not work reliably with GPT models.
310
+ */
311
+ enable_wait_for_connections?: boolean;
312
+
313
+ /**
314
+ * Whether to enable the connection manager for automatic connection handling
315
+ */
316
+ enabled?: boolean;
317
+ }
318
+
319
+ /**
320
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
321
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
322
+ * tool must NOT have any of. Both conditions must be satisfied.
323
+ */
324
+ export interface Tags {
325
+ /**
326
+ * Tags that the tool must NOT have any of
327
+ */
328
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
329
+
330
+ /**
331
+ * Tags that the tool must have at least one of
332
+ */
333
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
334
+ }
335
+
336
+ export interface Enabled {
337
+ enabled: Array<string>;
338
+ }
339
+
340
+ export interface Disabled {
341
+ disabled: Array<string>;
342
+ }
343
+
344
+ export interface Enabled {
345
+ enabled: Array<string>;
346
+ }
347
+
348
+ export interface Disabled {
349
+ disabled: Array<string>;
350
+ }
351
+
352
+ export interface Tags {
353
+ tags: Tags.Tags;
354
+ }
355
+
356
+ export namespace Tags {
357
+ export interface Tags {
358
+ /**
359
+ * Tags that the tool must NOT have any of
360
+ */
361
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
362
+
363
+ /**
364
+ * Tags that the tool must have at least one of
365
+ */
366
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
367
+ }
368
+ }
369
+
370
+ /**
371
+ * Workbench configuration
372
+ */
373
+ export interface Workbench {
374
+ /**
375
+ * Character threshold after which tool execution response are saved to a file in
376
+ * workbench. Default is 20k.
377
+ */
378
+ auto_offload_threshold?: number;
379
+
380
+ /**
381
+ * Whether the workbench (code execution sandbox) is enabled. When false,
382
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
383
+ */
384
+ enable?: boolean;
385
+
386
+ /**
387
+ * Whether proxy execution is enabled in the workbench
388
+ */
389
+ proxy_execution_enabled?: boolean;
390
+ }
391
+ }
392
+
393
+ export interface Mcp {
394
+ /**
395
+ * The type of the MCP server. Can be http
396
+ */
397
+ type: 'http';
398
+
399
+ /**
400
+ * The URL of the MCP server
401
+ */
402
+ url: string;
403
+ }
404
+
405
+ /**
406
+ * Experimental features including the generated system prompt. Only returned on
407
+ * session creation, not on GET.
408
+ */
409
+ export interface Experimental {
410
+ /**
411
+ * The assistive system prompt for the tool router session
412
+ */
413
+ assistive_prompt?: string;
414
+
415
+ /**
416
+ * User-defined custom toolkits with grouped tools (no-auth)
417
+ */
418
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
419
+
420
+ /**
421
+ * Custom tools — standalone or extending Composio toolkits
422
+ */
423
+ custom_tools?: Array<Experimental.CustomTool>;
424
+ }
425
+
426
+ export namespace Experimental {
427
+ export interface CustomToolkit {
428
+ description: string;
429
+
430
+ name: string;
431
+
432
+ slug: string;
433
+
434
+ tools: Array<CustomToolkit.Tool>;
435
+ }
436
+
437
+ export namespace CustomToolkit {
438
+ export interface Tool {
439
+ description: string;
440
+
441
+ input_schema: { [key: string]: unknown };
442
+
443
+ name: string;
444
+
445
+ /**
446
+ * Original tool slug as provided by the user
447
+ */
448
+ original_slug: string;
449
+
450
+ /**
451
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
452
+ */
453
+ slug: string;
454
+
455
+ output_schema?: { [key: string]: unknown };
456
+ }
457
+ }
458
+
459
+ export interface CustomTool {
460
+ description: string;
461
+
462
+ input_schema: { [key: string]: unknown };
463
+
464
+ name: string;
465
+
466
+ /**
467
+ * Original tool slug as provided by the user
468
+ */
469
+ original_slug: string;
470
+
471
+ /**
472
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
473
+ */
474
+ slug: string;
475
+
476
+ extends_toolkit?: string;
477
+
478
+ output_schema?: { [key: string]: unknown };
479
+ }
480
+ }
481
+ }
482
+
483
+ export interface SessionRetrieveResponse {
484
+ /**
485
+ * The session configuration including user, toolkits, and overrides
486
+ */
487
+ config: SessionRetrieveResponse.Config;
488
+
489
+ mcp: SessionRetrieveResponse.Mcp;
490
+
491
+ /**
492
+ * The identifier of the session
493
+ */
494
+ session_id: string;
495
+
496
+ /**
497
+ * List of available tools in this session
498
+ */
499
+ tool_router_tools: Array<string>;
500
+
501
+ /**
502
+ * Experimental features
503
+ */
504
+ experimental?: SessionRetrieveResponse.Experimental;
505
+ }
506
+
507
+ export namespace SessionRetrieveResponse {
508
+ /**
509
+ * The session configuration including user, toolkits, and overrides
510
+ */
511
+ export interface Config {
512
+ /**
513
+ * User identifier for this session
514
+ */
515
+ user_id: string;
516
+
517
+ /**
518
+ * Auth config overrides per toolkit
519
+ */
520
+ auth_configs?: { [key: string]: string };
521
+
522
+ /**
523
+ * Connected account overrides per toolkit
524
+ */
525
+ connected_accounts?: { [key: string]: string };
526
+
527
+ /**
528
+ * Manage connections configuration
529
+ */
530
+ manage_connections?: Config.ManageConnections;
531
+
532
+ /**
533
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
534
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
535
+ * tool must NOT have any of. Both conditions must be satisfied.
536
+ */
537
+ tags?: Config.Tags;
538
+
539
+ /**
540
+ * Toolkit configuration - either enabled list or disabled list
541
+ */
542
+ toolkits?: Config.Enabled | Config.Disabled;
543
+
544
+ /**
545
+ * Tool-level configuration per toolkit
546
+ */
547
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
548
+
549
+ /**
550
+ * Workbench configuration
551
+ */
552
+ workbench?: Config.Workbench;
553
+ }
554
+
555
+ export namespace Config {
556
+ /**
557
+ * Manage connections configuration
558
+ */
559
+ export interface ManageConnections {
560
+ /**
561
+ * Custom callback URL for connected account auth flows
562
+ */
563
+ callback_url?: string;
564
+
565
+ /**
566
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
567
+ * Default false. May not work reliably with GPT models.
568
+ */
569
+ enable_wait_for_connections?: boolean;
570
+
571
+ /**
572
+ * Whether to enable the connection manager for automatic connection handling
573
+ */
574
+ enabled?: boolean;
575
+ }
576
+
577
+ /**
578
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
579
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
580
+ * tool must NOT have any of. Both conditions must be satisfied.
581
+ */
582
+ export interface Tags {
583
+ /**
584
+ * Tags that the tool must NOT have any of
585
+ */
586
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
587
+
588
+ /**
589
+ * Tags that the tool must have at least one of
590
+ */
591
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
592
+ }
593
+
594
+ export interface Enabled {
595
+ enabled: Array<string>;
596
+ }
597
+
598
+ export interface Disabled {
599
+ disabled: Array<string>;
600
+ }
601
+
602
+ export interface Enabled {
603
+ enabled: Array<string>;
604
+ }
605
+
606
+ export interface Disabled {
607
+ disabled: Array<string>;
608
+ }
609
+
610
+ export interface Tags {
611
+ tags: Tags.Tags;
612
+ }
613
+
614
+ export namespace Tags {
615
+ export interface Tags {
616
+ /**
617
+ * Tags that the tool must NOT have any of
618
+ */
619
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
620
+
621
+ /**
622
+ * Tags that the tool must have at least one of
623
+ */
624
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
625
+ }
626
+ }
627
+
628
+ /**
629
+ * Workbench configuration
630
+ */
631
+ export interface Workbench {
632
+ /**
633
+ * Character threshold after which tool execution response are saved to a file in
634
+ * workbench. Default is 20k.
635
+ */
636
+ auto_offload_threshold?: number;
637
+
638
+ /**
639
+ * Whether the workbench (code execution sandbox) is enabled. When false,
640
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
641
+ */
642
+ enable?: boolean;
643
+
644
+ /**
645
+ * Whether proxy execution is enabled in the workbench
646
+ */
647
+ proxy_execution_enabled?: boolean;
648
+ }
649
+ }
650
+
651
+ export interface Mcp {
652
+ /**
653
+ * The type of the MCP server. Can be http
654
+ */
655
+ type: 'http';
656
+
657
+ /**
658
+ * The URL of the MCP server
659
+ */
660
+ url: string;
661
+ }
662
+
663
+ /**
664
+ * Experimental features
665
+ */
666
+ export interface Experimental {
667
+ /**
668
+ * The assistive system prompt for the tool router session
669
+ */
670
+ assistive_prompt?: string;
671
+
672
+ /**
673
+ * User-defined custom toolkits with grouped tools (no-auth)
674
+ */
675
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
676
+
677
+ /**
678
+ * Custom tools — standalone or extending Composio toolkits
679
+ */
680
+ custom_tools?: Array<Experimental.CustomTool>;
681
+ }
682
+
683
+ export namespace Experimental {
684
+ export interface CustomToolkit {
685
+ description: string;
686
+
687
+ name: string;
688
+
689
+ slug: string;
690
+
691
+ tools: Array<CustomToolkit.Tool>;
692
+ }
693
+
694
+ export namespace CustomToolkit {
695
+ export interface Tool {
696
+ description: string;
697
+
698
+ input_schema: { [key: string]: unknown };
699
+
700
+ name: string;
701
+
702
+ /**
703
+ * Original tool slug as provided by the user
704
+ */
705
+ original_slug: string;
706
+
707
+ /**
708
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
709
+ */
710
+ slug: string;
711
+
712
+ output_schema?: { [key: string]: unknown };
713
+ }
714
+ }
715
+
716
+ export interface CustomTool {
717
+ description: string;
718
+
719
+ input_schema: { [key: string]: unknown };
720
+
721
+ name: string;
722
+
723
+ /**
724
+ * Original tool slug as provided by the user
725
+ */
726
+ original_slug: string;
727
+
728
+ /**
729
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
730
+ */
731
+ slug: string;
732
+
733
+ extends_toolkit?: string;
734
+
735
+ output_schema?: { [key: string]: unknown };
736
+ }
737
+ }
738
+ }
739
+
740
+ export interface SessionExecuteResponse {
741
+ /**
742
+ * The data returned by the tool execution
743
+ */
744
+ data: { [key: string]: unknown };
745
+
746
+ /**
747
+ * Error message if the execution failed, null otherwise
748
+ */
749
+ error: string | null;
750
+
751
+ /**
752
+ * Unique identifier for the execution log
753
+ */
754
+ log_id: string;
755
+ }
756
+
757
+ export interface SessionExecuteMetaResponse {
758
+ /**
759
+ * The data returned by the tool execution
760
+ */
761
+ data: { [key: string]: unknown };
762
+
763
+ /**
764
+ * Error message if the execution failed, null otherwise
765
+ */
766
+ error: string | null;
767
+
768
+ /**
769
+ * Unique identifier for the execution log
770
+ */
771
+ log_id: string;
772
+ }
773
+
774
+ export interface SessionLinkResponse {
775
+ /**
776
+ * The unique identifier for the connected account
777
+ */
778
+ connected_account_id: string;
779
+
780
+ /**
781
+ * Token used to complete the authentication flow
782
+ */
783
+ link_token: string;
784
+
785
+ /**
786
+ * The URL where users should be redirected to complete OAuth
787
+ */
788
+ redirect_url: string;
789
+ }
790
+
791
+ export interface SessionProxyExecuteResponse {
792
+ /**
793
+ * The HTTP status code returned from the proxied API
794
+ */
795
+ status: number;
796
+
797
+ /**
798
+ * Binary body response data. Present when the response is a binary file.
799
+ */
800
+ binary_data?: SessionProxyExecuteResponse.BinaryData;
801
+
802
+ /**
803
+ * The response data returned from the proxied API
804
+ */
805
+ data?: unknown;
806
+
807
+ /**
808
+ * The HTTP headers returned from the proxied API
809
+ */
810
+ headers?: { [key: string]: string };
811
+ }
812
+
813
+ export namespace SessionProxyExecuteResponse {
814
+ /**
815
+ * Binary body response data. Present when the response is a binary file.
816
+ */
817
+ export interface BinaryData {
818
+ /**
819
+ * Content-Type of the binary data
820
+ */
821
+ content_type: string;
822
+
823
+ /**
824
+ * File size in bytes
825
+ */
826
+ size: number;
827
+
828
+ /**
829
+ * URL to download binary content
830
+ */
831
+ url: string;
832
+
833
+ /**
834
+ * ISO 8601 timestamp when the URL expires
835
+ */
836
+ expires_at?: string;
837
+ }
838
+ }
839
+
840
+ export interface SessionSearchResponse {
841
+ /**
842
+ * Error message if any searches failed, null if all succeeded. Format: "X out of Y
843
+ * searches failed, reasons: <details>"
844
+ */
845
+ error: string | null;
846
+
847
+ /**
848
+ * Combined workflow guidance covering connections, planner, and memory usage. Each
849
+ * element is a step instruction.
850
+ */
851
+ next_steps_guidance: Array<string>;
852
+
853
+ /**
854
+ * Per-query search results with tools, reasoning, and memory. One entry per query
855
+ * in request order.
856
+ */
857
+ results: Array<SessionSearchResponse.Result>;
858
+
859
+ /**
860
+ * Session info for correlating meta tool calls
861
+ */
862
+ session: SessionSearchResponse.Session;
863
+
864
+ /**
865
+ * Whether all searches completed successfully. False if any query failed.
866
+ */
867
+ success: boolean;
868
+
869
+ /**
870
+ * Time information for the query
871
+ */
872
+ time_info: SessionSearchResponse.TimeInfo;
873
+
874
+ /**
875
+ * Deduplicated tool definitions keyed by tool_slug for O(1) lookup. Each tool
876
+ * appears once even if used in multiple queries.
877
+ */
878
+ tool_schemas: { [key: string]: SessionSearchResponse.ToolSchemas };
879
+
880
+ /**
881
+ * Connection status for all toolkits mentioned across all queries, with
882
+ * descriptions merged in.
883
+ */
884
+ toolkit_connection_statuses: Array<SessionSearchResponse.ToolkitConnectionStatus>;
885
+ }
886
+
887
+ export namespace SessionSearchResponse {
888
+ export interface Result {
889
+ /**
890
+ * 1-based index of the query in the request
891
+ */
892
+ index: number;
893
+
894
+ /**
895
+ * List of main tool slugs matching the search criteria
896
+ */
897
+ primary_tool_slugs: Array<string>;
898
+
899
+ /**
900
+ * List of related tool slugs that might be useful
901
+ */
902
+ related_tool_slugs: Array<string>;
903
+
904
+ /**
905
+ * List of unique toolkit slugs used by tools in this query
906
+ */
907
+ toolkits: Array<string>;
908
+
909
+ /**
910
+ * The use case that was searched
911
+ */
912
+ use_case: string;
913
+
914
+ /**
915
+ * Task difficulty assessment (e.g., "easy - Simple single-tool operation with
916
+ * known parameters")
917
+ */
918
+ difficulty?: string;
919
+
920
+ /**
921
+ * Error message if the search for this query failed, null otherwise. Always
922
+ * present for failed queries.
923
+ */
924
+ error?: string | null;
925
+
926
+ /**
927
+ * Guidance message about the search results, particularly when a cached plan is
928
+ * available
929
+ */
930
+ execution_guidance?: string;
931
+
932
+ /**
933
+ * Common pitfalls and considerations (only present when cached plan is available)
934
+ */
935
+ known_pitfalls?: Array<string>;
936
+
937
+ /**
938
+ * Memory data relevant to this query, grouped by app. Only present for non-cached
939
+ * search results.
940
+ */
941
+ memory?: { [key: string]: Array<string> };
942
+
943
+ /**
944
+ * ID of cached plan if available
945
+ */
946
+ plan_id?: string;
947
+
948
+ /**
949
+ * Workflow steps from cached plan (only present when cached plan is available)
950
+ */
951
+ recommended_plan_steps?: Array<string>;
952
+
953
+ /**
954
+ * Reference Python code snippets for processing tool responses in the workbench
955
+ * (only present when cached plan is available)
956
+ */
957
+ reference_workbench_snippets?: Array<Result.ReferenceWorkbenchSnippet>;
958
+ }
959
+
960
+ export namespace Result {
961
+ export interface ReferenceWorkbenchSnippet {
962
+ /**
963
+ * Python code snippet for the workbench
964
+ */
965
+ code: string;
966
+
967
+ /**
968
+ * Description of what the code snippet does
969
+ */
970
+ description: string;
971
+ }
972
+ }
973
+
974
+ /**
975
+ * Session info for correlating meta tool calls
976
+ */
977
+ export interface Session {
978
+ /**
979
+ * Session identifier to be passed to subsequent meta tool calls as session_id.
980
+ */
981
+ id: string;
982
+
983
+ /**
984
+ * Whether a fresh session id was generated in this call.
985
+ */
986
+ generate_id: boolean;
987
+
988
+ /**
989
+ * LLM-facing guidance on how to reuse this session id
990
+ */
991
+ instructions: string;
992
+ }
993
+
994
+ /**
995
+ * Time information for the query
996
+ */
997
+ export interface TimeInfo {
998
+ /**
999
+ * Current time in ISO format (UTC)
1000
+ */
1001
+ current_time_utc: string;
1002
+
1003
+ /**
1004
+ * Current time as Unix epoch timestamp in seconds
1005
+ */
1006
+ current_time_utc_epoch_seconds: number;
1007
+
1008
+ /**
1009
+ * Important message about time handling and timezone considerations
1010
+ */
1011
+ message: string;
1012
+ }
1013
+
1014
+ export interface ToolSchemas {
1015
+ /**
1016
+ * The slug of the tool
1017
+ */
1018
+ tool_slug: string;
1019
+
1020
+ /**
1021
+ * The slug of the toolkit that provides this tool
1022
+ */
1023
+ toolkit: string;
1024
+
1025
+ /**
1026
+ * Description of the tool
1027
+ */
1028
+ description?: string;
1029
+
1030
+ /**
1031
+ * Whether the full input_schema is included in this response
1032
+ */
1033
+ hasFullSchema?: boolean;
1034
+
1035
+ /**
1036
+ * Input schema for the tool (only present when hasFullSchema is true)
1037
+ */
1038
+ input_schema?: { [key: string]: unknown };
1039
+
1040
+ /**
1041
+ * Output/response schema for the tool
1042
+ */
1043
+ output_schema?: { [key: string]: unknown };
1044
+
1045
+ /**
1046
+ * Reference to fetch full schema when hasFullSchema is false
1047
+ */
1048
+ schemaRef?: ToolSchemas.SchemaRef;
1049
+ }
1050
+
1051
+ export namespace ToolSchemas {
1052
+ /**
1053
+ * Reference to fetch full schema when hasFullSchema is false
1054
+ */
1055
+ export interface SchemaRef {
1056
+ /**
1057
+ * Arguments to pass to the tool
1058
+ */
1059
+ args: SchemaRef.Args;
1060
+
1061
+ /**
1062
+ * Instruction message for the LLM
1063
+ */
1064
+ message: string;
1065
+
1066
+ /**
1067
+ * Tool to call
1068
+ */
1069
+ tool: 'COMPOSIO_GET_TOOL_SCHEMAS';
1070
+ }
1071
+
1072
+ export namespace SchemaRef {
1073
+ /**
1074
+ * Arguments to pass to the tool
1075
+ */
1076
+ export interface Args {
1077
+ /**
1078
+ * Tool slugs to fetch schemas for
1079
+ */
1080
+ tool_slugs: Array<string>;
1081
+ }
1082
+ }
1083
+ }
1084
+
1085
+ export interface ToolkitConnectionStatus {
1086
+ /**
1087
+ * Description of what the toolkit does and its capabilities
1088
+ */
1089
+ description: string;
1090
+
1091
+ /**
1092
+ * Whether an active connection exists for this toolkit
1093
+ */
1094
+ has_active_connection: boolean;
1095
+
1096
+ /**
1097
+ * Human-readable message about the connection status and next steps
1098
+ */
1099
+ status_message: string;
1100
+
1101
+ /**
1102
+ * The toolkit slug identifier (e.g., "gmail", "slack")
1103
+ */
1104
+ toolkit: string;
1105
+
1106
+ /**
1107
+ * Connection details including auth config and connected account IDs. Only present
1108
+ * when has_active_connection is true.
1109
+ */
1110
+ connection_details?: { [key: string]: unknown };
1111
+
1112
+ /**
1113
+ * Information about the currently connected user (email, name, etc.)
1114
+ */
1115
+ current_user_info?: { [key: string]: unknown };
1116
+ }
1117
+ }
1118
+
1119
+ export interface SessionToolkitsResponse {
1120
+ current_page: number;
1121
+
1122
+ items: Array<SessionToolkitsResponse.Item>;
1123
+
1124
+ total_items: number;
1125
+
1126
+ total_pages: number;
1127
+
1128
+ next_cursor?: string | null;
1129
+ }
1130
+
1131
+ export namespace SessionToolkitsResponse {
1132
+ export interface Item {
1133
+ /**
1134
+ * Available Composio-managed auth schemes
1135
+ */
1136
+ composio_managed_auth_schemes: Array<string>;
1137
+
1138
+ /**
1139
+ * Connected account if available
1140
+ */
1141
+ connected_account: Item.ConnectedAccount | null;
1142
+
1143
+ /**
1144
+ * Whether the toolkit is enabled
1145
+ */
1146
+ enabled: boolean;
1147
+
1148
+ /**
1149
+ * Whether the toolkit is no-auth
1150
+ */
1151
+ is_no_auth: boolean;
1152
+
1153
+ /**
1154
+ * Toolkit metadata
1155
+ */
1156
+ meta: Item.Meta;
1157
+
1158
+ /**
1159
+ * Display name of the toolkit
1160
+ */
1161
+ name: string;
1162
+
1163
+ /**
1164
+ * Unique slug identifier
1165
+ */
1166
+ slug: string;
1167
+ }
1168
+
1169
+ export namespace Item {
1170
+ /**
1171
+ * Connected account if available
1172
+ */
1173
+ export interface ConnectedAccount {
1174
+ /**
1175
+ * Connected account identifier
1176
+ */
1177
+ id: string;
1178
+
1179
+ /**
1180
+ * Auth config details
1181
+ */
1182
+ auth_config: ConnectedAccount.AuthConfig;
1183
+
1184
+ /**
1185
+ * Creation timestamp
1186
+ */
1187
+ created_at: string;
1188
+
1189
+ /**
1190
+ * Connection status
1191
+ */
1192
+ status: string;
1193
+
1194
+ /**
1195
+ * User identifier
1196
+ */
1197
+ user_id: string;
1198
+ }
1199
+
1200
+ export namespace ConnectedAccount {
1201
+ /**
1202
+ * Auth config details
1203
+ */
1204
+ export interface AuthConfig {
1205
+ /**
1206
+ * Auth config identifier
1207
+ */
1208
+ id: string;
1209
+
1210
+ /**
1211
+ * Authentication scheme type
1212
+ */
1213
+ auth_scheme: string;
1214
+
1215
+ /**
1216
+ * Whether this is a Composio-managed auth config
1217
+ */
1218
+ is_composio_managed: boolean;
1219
+ }
1220
+ }
1221
+
1222
+ /**
1223
+ * Toolkit metadata
1224
+ */
1225
+ export interface Meta {
1226
+ /**
1227
+ * Description of the toolkit
1228
+ */
1229
+ description: string;
1230
+
1231
+ /**
1232
+ * URL to the toolkit logo
1233
+ */
1234
+ logo: string;
1235
+ }
1236
+ }
1237
+ }
1238
+
1239
+ export interface SessionToolsResponse {
1240
+ /**
1241
+ * List of tools with their complete schemas
1242
+ */
1243
+ items: Array<SessionToolsResponse.Item>;
1244
+ }
1245
+
1246
+ export namespace SessionToolsResponse {
1247
+ export interface Item {
1248
+ /**
1249
+ * List of all available versions for this tool
1250
+ */
1251
+ available_versions: Array<string>;
1252
+
1253
+ deprecated: Item.Deprecated;
1254
+
1255
+ /**
1256
+ * Detailed explanation of the tool's functionality and purpose
1257
+ */
1258
+ description: string;
1259
+
1260
+ /**
1261
+ * Schema definition of required input parameters for the tool
1262
+ */
1263
+ input_parameters: { [key: string]: unknown };
1264
+
1265
+ /**
1266
+ * Indicates if this tool is deprecated and may be removed in the future
1267
+ */
1268
+ is_deprecated: boolean;
1269
+
1270
+ /**
1271
+ * Human-readable display name of the tool
1272
+ */
1273
+ name: string;
1274
+
1275
+ /**
1276
+ * Indicates if the tool can be used without authentication
1277
+ */
1278
+ no_auth: boolean;
1279
+
1280
+ /**
1281
+ * Schema definition of return values from the tool
1282
+ */
1283
+ output_parameters: { [key: string]: unknown };
1284
+
1285
+ /**
1286
+ * List of scopes associated with the tool
1287
+ */
1288
+ scopes: Array<string>;
1289
+
1290
+ /**
1291
+ * Unique identifier for the tool
1292
+ */
1293
+ slug: string;
1294
+
1295
+ /**
1296
+ * List of tags associated with the tool for categorization and filtering
1297
+ */
1298
+ tags: Array<string>;
1299
+
1300
+ toolkit: Item.Toolkit;
1301
+
1302
+ /**
1303
+ * Current version of the tool
1304
+ */
1305
+ version: string;
1306
+
1307
+ /**
1308
+ * Human-friendly description of the tool, if available
1309
+ */
1310
+ human_description?: string;
1311
+ }
1312
+
1313
+ export namespace Item {
1314
+ export interface Deprecated {
1315
+ /**
1316
+ * List of all available versions for this tool
1317
+ */
1318
+ available_versions: Array<string>;
1319
+
1320
+ /**
1321
+ * The display name of the tool
1322
+ */
1323
+ displayName: string;
1324
+
1325
+ /**
1326
+ * Indicates if this tool is deprecated and may be removed in the future
1327
+ */
1328
+ is_deprecated: boolean;
1329
+
1330
+ toolkit: Deprecated.Toolkit;
1331
+
1332
+ /**
1333
+ * Current version identifier of the tool
1334
+ */
1335
+ version: string;
1336
+ }
1337
+
1338
+ export namespace Deprecated {
1339
+ export interface Toolkit {
1340
+ /**
1341
+ * URL to the toolkit logo image
1342
+ */
1343
+ logo: string;
1344
+ }
1345
+ }
1346
+
1347
+ export interface Toolkit {
1348
+ /**
1349
+ * URL to the toolkit logo image
1350
+ */
1351
+ logo: string;
1352
+
1353
+ /**
1354
+ * Human-readable name of the parent toolkit
1355
+ */
1356
+ name: string;
1357
+
1358
+ /**
1359
+ * Unique identifier of the parent toolkit
1360
+ */
1361
+ slug: string;
1362
+ }
1363
+ }
1364
+ }
1365
+
1366
+ export interface SessionCreateParams {
1367
+ /**
1368
+ * The identifier of the user who is initiating the session, ideally a unique
1369
+ * identifier from your database like a user ID or email address
1370
+ */
1371
+ user_id: string;
1372
+
1373
+ /**
1374
+ * The auth configs to use for the session. This will override the default behavior
1375
+ * and use the given auth config when specific toolkits are being executed
1376
+ */
1377
+ auth_configs?: { [key: string]: string };
1378
+
1379
+ /**
1380
+ * The connected accounts to use for the session. This will override the default
1381
+ * behaviour and use the given connected account when specific toolkits are being
1382
+ * executed
1383
+ */
1384
+ connected_accounts?: { [key: string]: string };
1385
+
1386
+ /**
1387
+ * Experimental features - not stable, may be modified or removed in future
1388
+ * versions.
1389
+ */
1390
+ experimental?: SessionCreateParams.Experimental;
1391
+
1392
+ /**
1393
+ * Configuration for connection management settings
1394
+ */
1395
+ manage_connections?: SessionCreateParams.ManageConnections;
1396
+
1397
+ /**
1398
+ * Global MCP tool annotation hints for filtering. Array format is treated as
1399
+ * enabled list. Object format supports both enabled (tool must have at least one)
1400
+ * and disabled (tool must NOT have any) lists. Toolkit-level tags override this.
1401
+ * Toolkit enabled/disabled lists take precedence over tag filtering.
1402
+ */
1403
+ tags?:
1404
+ | Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>
1405
+ | SessionCreateParams.UnionMember1;
1406
+
1407
+ /**
1408
+ * Toolkit configuration - specify either enable toolkits (allowlist) or disable
1409
+ * toolkits (denylist). Mutually exclusive.
1410
+ */
1411
+ toolkits?: SessionCreateParams.Enable | SessionCreateParams.Disable;
1412
+
1413
+ /**
1414
+ * Tool-level configuration per toolkit - either specify enable tools (whitelist),
1415
+ * disable tools (blacklist), or filter by MCP tags for each toolkit
1416
+ */
1417
+ tools?: {
1418
+ [key: string]: SessionCreateParams.Enable | SessionCreateParams.Disable | SessionCreateParams.Tags;
1419
+ };
1420
+
1421
+ /**
1422
+ * Configuration for workbench behavior
1423
+ */
1424
+ workbench?: SessionCreateParams.Workbench;
1425
+ }
1426
+
1427
+ export namespace SessionCreateParams {
1428
+ /**
1429
+ * Experimental features - not stable, may be modified or removed in future
1430
+ * versions.
1431
+ */
1432
+ export interface Experimental {
1433
+ /**
1434
+ * Customize assistive prompt generation (e.g., timezone).
1435
+ */
1436
+ assistive_prompt_config?: Experimental.AssistivePromptConfig;
1437
+
1438
+ /**
1439
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
1440
+ * existing Composio toolkits. All tools are no-auth.
1441
+ */
1442
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
1443
+
1444
+ /**
1445
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
1446
+ * extends_toolkit inherit the Composio toolkit's connection.
1447
+ */
1448
+ custom_tools?: Array<Experimental.CustomTool>;
1449
+ }
1450
+
1451
+ export namespace Experimental {
1452
+ /**
1453
+ * Customize assistive prompt generation (e.g., timezone).
1454
+ */
1455
+ export interface AssistivePromptConfig {
1456
+ /**
1457
+ * IANA timezone identifier (e.g., 'America/New_York', 'Europe/London'). Used to
1458
+ * customize the system prompt with timezone-aware instructions.
1459
+ */
1460
+ user_timezone?: string;
1461
+ }
1462
+
1463
+ export interface CustomToolkit {
1464
+ /**
1465
+ * Used for BM25 search matching and shown in toolkit connection statuses.
1466
+ */
1467
+ description: string;
1468
+
1469
+ /**
1470
+ * Display name shown to the LLM and in search results.
1471
+ */
1472
+ name: string;
1473
+
1474
+ /**
1475
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
1476
+ * slugs. Alphanumeric, underscores, and hyphens only.
1477
+ */
1478
+ slug: string;
1479
+
1480
+ /**
1481
+ * Tools in this custom toolkit
1482
+ */
1483
+ tools: Array<CustomToolkit.Tool>;
1484
+ }
1485
+
1486
+ export namespace CustomToolkit {
1487
+ export interface Tool {
1488
+ /**
1489
+ * Used for BM25 search matching and shown to the LLM.
1490
+ */
1491
+ description: string;
1492
+
1493
+ /**
1494
+ * Must have type: "object" and a properties field.
1495
+ */
1496
+ input_schema: { [key: string]: unknown };
1497
+
1498
+ /**
1499
+ * Human-readable display name
1500
+ */
1501
+ name: string;
1502
+
1503
+ /**
1504
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
1505
+ * chars total).
1506
+ */
1507
+ slug: string;
1508
+
1509
+ /**
1510
+ * Optional output schema for the tool response.
1511
+ */
1512
+ output_schema?: { [key: string]: unknown };
1513
+ }
1514
+ }
1515
+
1516
+ export interface CustomTool {
1517
+ /**
1518
+ * Used for BM25 search matching and shown to the LLM.
1519
+ */
1520
+ description: string;
1521
+
1522
+ /**
1523
+ * Must have type: "object" and a properties field.
1524
+ */
1525
+ input_schema: { [key: string]: unknown };
1526
+
1527
+ /**
1528
+ * Human-readable display name
1529
+ */
1530
+ name: string;
1531
+
1532
+ /**
1533
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
1534
+ * (extending). Max 60 chars total.
1535
+ */
1536
+ slug: string;
1537
+
1538
+ /**
1539
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
1540
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
1541
+ */
1542
+ extends_toolkit?: string;
1543
+
1544
+ /**
1545
+ * JSON Schema describing tool output (optional)
1546
+ */
1547
+ output_schema?: { [key: string]: unknown };
1548
+ }
1549
+ }
1550
+
1551
+ /**
1552
+ * Configuration for connection management settings
1553
+ */
1554
+ export interface ManageConnections {
1555
+ /**
1556
+ * The URL to redirect to after a user completes authentication for a connected
1557
+ * account. This allows you to handle the auth callback in your own application.
1558
+ */
1559
+ callback_url?: string;
1560
+
1561
+ /**
1562
+ * Whether to enable the connection manager for automatic connection handling. If
1563
+ * true, we will provide a tool your agent can use to initiate connections to
1564
+ * toolkits if it doesnt exist. If set to false, then you have to manage
1565
+ * connections manually.
1566
+ */
1567
+ enable?: boolean | null;
1568
+
1569
+ /**
1570
+ * When true, the COMPOSIO_WAIT_FOR_CONNECTIONS tool is available for agents to
1571
+ * poll connection status after sharing auth URLs. Default is false (disabled). May
1572
+ * not work reliably with GPT models.
1573
+ */
1574
+ enable_wait_for_connections?: boolean | null;
1575
+ }
1576
+
1577
+ export interface UnionMember1 {
1578
+ /**
1579
+ * Tags that the tool must NOT have any of
1580
+ */
1581
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1582
+
1583
+ /**
1584
+ * Tags that the tool must have at least one of
1585
+ */
1586
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1587
+ }
1588
+
1589
+ /**
1590
+ * Enable only specific toolkits (allowlist)
1591
+ */
1592
+ export interface Enable {
1593
+ /**
1594
+ * Only these specific toolkits will be enabled
1595
+ */
1596
+ enable: Array<string>;
1597
+ }
1598
+
1599
+ /**
1600
+ * Disable specific toolkits (denylist)
1601
+ */
1602
+ export interface Disable {
1603
+ /**
1604
+ * These specific toolkits will be disabled
1605
+ */
1606
+ disable: Array<string>;
1607
+ }
1608
+
1609
+ export interface Enable {
1610
+ /**
1611
+ * Only these specific tools will be available for this toolkit
1612
+ */
1613
+ enable: Array<string>;
1614
+ }
1615
+
1616
+ export interface Disable {
1617
+ /**
1618
+ * These specific tools will be disabled for this toolkit
1619
+ */
1620
+ disable: Array<string>;
1621
+ }
1622
+
1623
+ export interface Tags {
1624
+ /**
1625
+ * MCP tags to filter tools. Array format is treated as enabled list. Object format
1626
+ * supports both enabled and disabled lists.
1627
+ */
1628
+ tags: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'> | Tags.UnionMember1;
1629
+ }
1630
+
1631
+ export namespace Tags {
1632
+ export interface UnionMember1 {
1633
+ /**
1634
+ * Tags that the tool must NOT have any of
1635
+ */
1636
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1637
+
1638
+ /**
1639
+ * Tags that the tool must have at least one of
1640
+ */
1641
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1642
+ }
1643
+ }
1644
+
1645
+ /**
1646
+ * Configuration for workbench behavior
1647
+ */
1648
+ export interface Workbench {
1649
+ /**
1650
+ * Character threshold for automatic offloading. When workbench response exceeds
1651
+ * this threshold, it will be automatically offloaded. Default is picked
1652
+ * automatically based on the response size.
1653
+ */
1654
+ auto_offload_threshold?: number;
1655
+
1656
+ /**
1657
+ * Set to false to disable the workbench entirely. When disabled, no code execution
1658
+ * tools are available in the session.
1659
+ */
1660
+ enable?: boolean;
1661
+
1662
+ /**
1663
+ * Whether proxy execution is enabled. When enabled, workbench can call URLs and
1664
+ * APIs directly.
1665
+ */
1666
+ enable_proxy_execution?: boolean;
1667
+ }
1668
+ }
1669
+
1670
+ export interface SessionExecuteParams {
1671
+ /**
1672
+ * The unique slug identifier of the tool to execute
1673
+ */
1674
+ tool_slug: string;
1675
+
1676
+ /**
1677
+ * The arguments required by the tool
1678
+ */
1679
+ arguments?: { [key: string]: unknown };
1680
+ }
1681
+
1682
+ export interface SessionExecuteMetaParams {
1683
+ /**
1684
+ * The unique slug identifier of the meta tool to execute
1685
+ */
1686
+ slug:
1687
+ | 'COMPOSIO_SEARCH_TOOLS'
1688
+ | 'COMPOSIO_MULTI_EXECUTE_TOOL'
1689
+ | 'COMPOSIO_MANAGE_CONNECTIONS'
1690
+ | 'COMPOSIO_WAIT_FOR_CONNECTIONS'
1691
+ | 'COMPOSIO_REMOTE_WORKBENCH'
1692
+ | 'COMPOSIO_REMOTE_BASH_TOOL'
1693
+ | 'COMPOSIO_GET_TOOL_SCHEMAS'
1694
+ | 'COMPOSIO_UPSERT_RECIPE'
1695
+ | 'COMPOSIO_GET_RECIPE';
1696
+
1697
+ /**
1698
+ * The arguments required by the meta tool
1699
+ */
1700
+ arguments?: { [key: string]: unknown };
1701
+ }
1702
+
1703
+ export interface SessionLinkParams {
1704
+ /**
1705
+ * The unique slug identifier of the toolkit to connect
1706
+ */
1707
+ toolkit: string;
1708
+
1709
+ /**
1710
+ * URL where users will be redirected after completing auth
1711
+ */
1712
+ callback_url?: string;
1713
+ }
1714
+
1715
+ export interface SessionProxyExecuteParams {
1716
+ /**
1717
+ * The API endpoint to call (absolute URL or path relative to base URL of the
1718
+ * connected account)
1719
+ */
1720
+ endpoint: string;
1721
+
1722
+ /**
1723
+ * The HTTP method to use for the request
1724
+ */
1725
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';
1726
+
1727
+ /**
1728
+ * The slug of the toolkit to use for the request
1729
+ */
1730
+ toolkit_slug: string;
1731
+
1732
+ /**
1733
+ * Binary body to send. For binary upload via URL: use {url: "https://...",
1734
+ * content_type?: "..."}. For binary upload via base64: use {base64: "...",
1735
+ * content_type?: "..."}.
1736
+ */
1737
+ binary_body?: SessionProxyExecuteParams.UnionMember0 | SessionProxyExecuteParams.UnionMember1;
1738
+
1739
+ /**
1740
+ * The request body (for POST, PUT, and PATCH requests)
1741
+ */
1742
+ body?: unknown;
1743
+
1744
+ custom_connection_data?:
1745
+ | SessionProxyExecuteParams.UnionMember0
1746
+ | SessionProxyExecuteParams.UnionMember1
1747
+ | SessionProxyExecuteParams.UnionMember2
1748
+ | SessionProxyExecuteParams.UnionMember3
1749
+ | SessionProxyExecuteParams.UnionMember4
1750
+ | SessionProxyExecuteParams.UnionMember5
1751
+ | SessionProxyExecuteParams.UnionMember6
1752
+ | SessionProxyExecuteParams.UnionMember7
1753
+ | SessionProxyExecuteParams.UnionMember8
1754
+ | SessionProxyExecuteParams.UnionMember9
1755
+ | SessionProxyExecuteParams.UnionMember10;
1756
+
1757
+ /**
1758
+ * Additional HTTP headers or query parameters to include in the request
1759
+ */
1760
+ parameters?: Array<SessionProxyExecuteParams.Parameter>;
1761
+ }
1762
+
1763
+ export namespace SessionProxyExecuteParams {
1764
+ export interface UnionMember0 {
1765
+ /**
1766
+ * URL to fetch binary content from
1767
+ */
1768
+ url: string;
1769
+
1770
+ /**
1771
+ * Content-Type header to use for the request
1772
+ */
1773
+ content_type?: string;
1774
+ }
1775
+
1776
+ export interface UnionMember1 {
1777
+ /**
1778
+ * Base64-encoded binary data
1779
+ */
1780
+ base64: string;
1781
+
1782
+ /**
1783
+ * Content-Type header to use for the request
1784
+ */
1785
+ content_type?: string;
1786
+ }
1787
+
1788
+ export interface UnionMember0 {
1789
+ authScheme: 'OAUTH2';
1790
+
1791
+ toolkitSlug: string;
1792
+
1793
+ val: UnionMember0.Val;
1794
+ }
1795
+
1796
+ export namespace UnionMember0 {
1797
+ export interface Val {
1798
+ access_token: string;
1799
+
1800
+ account_id?: string;
1801
+
1802
+ account_url?: string;
1803
+
1804
+ api_url?: string;
1805
+
1806
+ /**
1807
+ * for slack user scopes
1808
+ */
1809
+ authed_user?: Val.AuthedUser;
1810
+
1811
+ base_url?: string;
1812
+
1813
+ borneo_dashboard_url?: string;
1814
+
1815
+ COMPANYDOMAIN?: string;
1816
+
1817
+ dc?: string;
1818
+
1819
+ domain?: string;
1820
+
1821
+ expires_in?: number | string | null;
1822
+
1823
+ extension?: string;
1824
+
1825
+ form_api_base_url?: string;
1826
+
1827
+ id_token?: string;
1828
+
1829
+ instanceEndpoint?: string;
1830
+
1831
+ instanceName?: string;
1832
+
1833
+ /**
1834
+ * Whether to return the redirect url without shortening
1835
+ */
1836
+ long_redirect_url?: boolean;
1837
+
1838
+ proxy_password?: string;
1839
+
1840
+ proxy_username?: string;
1841
+
1842
+ refresh_token?: string | null;
1843
+
1844
+ region?: string;
1845
+
1846
+ scope?: string | Array<string> | null;
1847
+
1848
+ server_location?: string;
1849
+
1850
+ shop?: string;
1851
+
1852
+ site_name?: string;
1853
+
1854
+ /**
1855
+ * The oauth2 state prefix for the connection
1856
+ */
1857
+ state_prefix?: string;
1858
+
1859
+ subdomain?: string;
1860
+
1861
+ token_type?: string;
1862
+
1863
+ version?: string;
1864
+
1865
+ webhook_signature?: string;
1866
+
1867
+ your_server?: string;
1868
+
1869
+ 'your-domain'?: string;
1870
+
1871
+ [k: string]: unknown;
1872
+ }
1873
+
1874
+ export namespace Val {
1875
+ /**
1876
+ * for slack user scopes
1877
+ */
1878
+ export interface AuthedUser {
1879
+ access_token?: string;
1880
+
1881
+ scope?: string;
1882
+ }
1883
+ }
1884
+ }
1885
+
1886
+ export interface UnionMember1 {
1887
+ authScheme: 'DCR_OAUTH';
1888
+
1889
+ toolkitSlug: string;
1890
+
1891
+ val: UnionMember1.Val;
1892
+ }
1893
+
1894
+ export namespace UnionMember1 {
1895
+ export interface Val {
1896
+ access_token: string;
1897
+
1898
+ /**
1899
+ * Dynamically registered client ID
1900
+ */
1901
+ client_id: string;
1902
+
1903
+ account_id?: string;
1904
+
1905
+ account_url?: string;
1906
+
1907
+ api_url?: string;
1908
+
1909
+ base_url?: string;
1910
+
1911
+ borneo_dashboard_url?: string;
1912
+
1913
+ client_id_issued_at?: number;
1914
+
1915
+ /**
1916
+ * Dynamically registered client secret
1917
+ */
1918
+ client_secret?: string;
1919
+
1920
+ client_secret_expires_at?: number;
1921
+
1922
+ COMPANYDOMAIN?: string;
1923
+
1924
+ dc?: string;
1925
+
1926
+ domain?: string;
1927
+
1928
+ expires_in?: number | string | null;
1929
+
1930
+ extension?: string;
1931
+
1932
+ form_api_base_url?: string;
1933
+
1934
+ id_token?: string;
1935
+
1936
+ instanceEndpoint?: string;
1937
+
1938
+ instanceName?: string;
1939
+
1940
+ /**
1941
+ * Whether to return the redirect url without shortening
1942
+ */
1943
+ long_redirect_url?: boolean;
1944
+
1945
+ proxy_password?: string;
1946
+
1947
+ proxy_username?: string;
1948
+
1949
+ refresh_token?: string | null;
1950
+
1951
+ region?: string;
1952
+
1953
+ scope?: string | Array<string> | null;
1954
+
1955
+ server_location?: string;
1956
+
1957
+ shop?: string;
1958
+
1959
+ site_name?: string;
1960
+
1961
+ /**
1962
+ * The oauth2 state prefix for the connection
1963
+ */
1964
+ state_prefix?: string;
1965
+
1966
+ subdomain?: string;
1967
+
1968
+ token_type?: string;
1969
+
1970
+ version?: string;
1971
+
1972
+ your_server?: string;
1973
+
1974
+ 'your-domain'?: string;
1975
+
1976
+ [k: string]: unknown;
1977
+ }
1978
+ }
1979
+
1980
+ export interface UnionMember2 {
1981
+ authScheme: 'API_KEY';
1982
+
1983
+ toolkitSlug: string;
1984
+
1985
+ val: UnionMember2.Val;
1986
+ }
1987
+
1988
+ export namespace UnionMember2 {
1989
+ export interface Val {
1990
+ account_id?: string;
1991
+
1992
+ account_url?: string;
1993
+
1994
+ api_key?: string;
1995
+
1996
+ api_url?: string;
1997
+
1998
+ base_url?: string;
1999
+
2000
+ basic_encoded?: string;
2001
+
2002
+ bearer_token?: string;
2003
+
2004
+ borneo_dashboard_url?: string;
2005
+
2006
+ COMPANYDOMAIN?: string;
2007
+
2008
+ dc?: string;
2009
+
2010
+ domain?: string;
2011
+
2012
+ extension?: string;
2013
+
2014
+ form_api_base_url?: string;
2015
+
2016
+ generic_api_key?: string;
2017
+
2018
+ instanceEndpoint?: string;
2019
+
2020
+ instanceName?: string;
2021
+
2022
+ proxy_password?: string;
2023
+
2024
+ proxy_username?: string;
2025
+
2026
+ region?: string;
2027
+
2028
+ server_location?: string;
2029
+
2030
+ shop?: string;
2031
+
2032
+ site_name?: string;
2033
+
2034
+ subdomain?: string;
2035
+
2036
+ version?: string;
2037
+
2038
+ your_server?: string;
2039
+
2040
+ 'your-domain'?: string;
2041
+
2042
+ [k: string]: unknown;
2043
+ }
2044
+ }
2045
+
2046
+ export interface UnionMember3 {
2047
+ authScheme: 'BASIC_WITH_JWT';
2048
+
2049
+ toolkitSlug: string;
2050
+
2051
+ val: UnionMember3.Val;
2052
+ }
2053
+
2054
+ export namespace UnionMember3 {
2055
+ export interface Val {
2056
+ password: string;
2057
+
2058
+ username: string;
2059
+
2060
+ account_id?: string;
2061
+
2062
+ account_url?: string;
2063
+
2064
+ api_url?: string;
2065
+
2066
+ base_url?: string;
2067
+
2068
+ borneo_dashboard_url?: string;
2069
+
2070
+ COMPANYDOMAIN?: string;
2071
+
2072
+ dc?: string;
2073
+
2074
+ domain?: string;
2075
+
2076
+ extension?: string;
2077
+
2078
+ form_api_base_url?: string;
2079
+
2080
+ instanceEndpoint?: string;
2081
+
2082
+ instanceName?: string;
2083
+
2084
+ proxy_password?: string;
2085
+
2086
+ proxy_username?: string;
2087
+
2088
+ region?: string;
2089
+
2090
+ server_location?: string;
2091
+
2092
+ shop?: string;
2093
+
2094
+ site_name?: string;
2095
+
2096
+ subdomain?: string;
2097
+
2098
+ version?: string;
2099
+
2100
+ your_server?: string;
2101
+
2102
+ 'your-domain'?: string;
2103
+
2104
+ [k: string]: unknown;
2105
+ }
2106
+ }
2107
+
2108
+ export interface UnionMember4 {
2109
+ authScheme: 'BASIC';
2110
+
2111
+ toolkitSlug: string;
2112
+
2113
+ val: UnionMember4.Val;
2114
+ }
2115
+
2116
+ export namespace UnionMember4 {
2117
+ export interface Val {
2118
+ username: string;
2119
+
2120
+ account_id?: string;
2121
+
2122
+ account_url?: string;
2123
+
2124
+ api_url?: string;
2125
+
2126
+ base_url?: string;
2127
+
2128
+ borneo_dashboard_url?: string;
2129
+
2130
+ COMPANYDOMAIN?: string;
2131
+
2132
+ dc?: string;
2133
+
2134
+ domain?: string;
2135
+
2136
+ extension?: string;
2137
+
2138
+ form_api_base_url?: string;
2139
+
2140
+ instanceEndpoint?: string;
2141
+
2142
+ instanceName?: string;
2143
+
2144
+ password?: string;
2145
+
2146
+ proxy_password?: string;
2147
+
2148
+ proxy_username?: string;
2149
+
2150
+ region?: string;
2151
+
2152
+ server_location?: string;
2153
+
2154
+ shop?: string;
2155
+
2156
+ site_name?: string;
2157
+
2158
+ subdomain?: string;
2159
+
2160
+ version?: string;
2161
+
2162
+ your_server?: string;
2163
+
2164
+ 'your-domain'?: string;
2165
+
2166
+ [k: string]: unknown;
2167
+ }
2168
+ }
2169
+
2170
+ export interface UnionMember5 {
2171
+ authScheme: 'BEARER_TOKEN';
2172
+
2173
+ toolkitSlug: string;
2174
+
2175
+ val: UnionMember5.Val;
2176
+ }
2177
+
2178
+ export namespace UnionMember5 {
2179
+ export interface Val {
2180
+ token: string;
2181
+
2182
+ account_id?: string;
2183
+
2184
+ account_url?: string;
2185
+
2186
+ api_url?: string;
2187
+
2188
+ base_url?: string;
2189
+
2190
+ borneo_dashboard_url?: string;
2191
+
2192
+ COMPANYDOMAIN?: string;
2193
+
2194
+ dc?: string;
2195
+
2196
+ domain?: string;
2197
+
2198
+ extension?: string;
2199
+
2200
+ form_api_base_url?: string;
2201
+
2202
+ instanceEndpoint?: string;
2203
+
2204
+ instanceName?: string;
2205
+
2206
+ proxy_password?: string;
2207
+
2208
+ proxy_username?: string;
2209
+
2210
+ region?: string;
2211
+
2212
+ server_location?: string;
2213
+
2214
+ shop?: string;
2215
+
2216
+ site_name?: string;
2217
+
2218
+ subdomain?: string;
2219
+
2220
+ version?: string;
2221
+
2222
+ your_server?: string;
2223
+
2224
+ 'your-domain'?: string;
2225
+
2226
+ [k: string]: unknown;
2227
+ }
2228
+ }
2229
+
2230
+ export interface UnionMember6 {
2231
+ authScheme: 'OAUTH1';
2232
+
2233
+ toolkitSlug: string;
2234
+
2235
+ val: UnionMember6.Val;
2236
+ }
2237
+
2238
+ export namespace UnionMember6 {
2239
+ export interface Val {
2240
+ oauth_token: string;
2241
+
2242
+ oauth_token_secret: string;
2243
+
2244
+ account_id?: string;
2245
+
2246
+ account_url?: string;
2247
+
2248
+ api_url?: string;
2249
+
2250
+ base_url?: string;
2251
+
2252
+ borneo_dashboard_url?: string;
2253
+
2254
+ callback_url?: string;
2255
+
2256
+ COMPANYDOMAIN?: string;
2257
+
2258
+ consumer_key?: string;
2259
+
2260
+ dc?: string;
2261
+
2262
+ domain?: string;
2263
+
2264
+ extension?: string;
2265
+
2266
+ form_api_base_url?: string;
2267
+
2268
+ instanceEndpoint?: string;
2269
+
2270
+ instanceName?: string;
2271
+
2272
+ oauth_verifier?: string;
2273
+
2274
+ proxy_password?: string;
2275
+
2276
+ proxy_username?: string;
2277
+
2278
+ redirectUrl?: string;
2279
+
2280
+ region?: string;
2281
+
2282
+ server_location?: string;
2283
+
2284
+ shop?: string;
2285
+
2286
+ site_name?: string;
2287
+
2288
+ subdomain?: string;
2289
+
2290
+ version?: string;
2291
+
2292
+ your_server?: string;
2293
+
2294
+ 'your-domain'?: string;
2295
+
2296
+ [k: string]: unknown;
2297
+ }
2298
+ }
2299
+
2300
+ export interface UnionMember7 {
2301
+ authScheme: 'NO_AUTH';
2302
+
2303
+ toolkitSlug: string;
2304
+
2305
+ val: UnionMember7.Val;
2306
+ }
2307
+
2308
+ export namespace UnionMember7 {
2309
+ export interface Val {
2310
+ account_id?: string;
2311
+
2312
+ account_url?: string;
2313
+
2314
+ api_url?: string;
2315
+
2316
+ base_url?: string;
2317
+
2318
+ borneo_dashboard_url?: string;
2319
+
2320
+ COMPANYDOMAIN?: string;
2321
+
2322
+ dc?: string;
2323
+
2324
+ domain?: string;
2325
+
2326
+ extension?: string;
2327
+
2328
+ form_api_base_url?: string;
2329
+
2330
+ instanceEndpoint?: string;
2331
+
2332
+ instanceName?: string;
2333
+
2334
+ proxy_password?: string;
2335
+
2336
+ proxy_username?: string;
2337
+
2338
+ region?: string;
2339
+
2340
+ server_location?: string;
2341
+
2342
+ shop?: string;
2343
+
2344
+ site_name?: string;
2345
+
2346
+ subdomain?: string;
2347
+
2348
+ version?: string;
2349
+
2350
+ your_server?: string;
2351
+
2352
+ 'your-domain'?: string;
2353
+
2354
+ [k: string]: unknown;
2355
+ }
2356
+ }
2357
+
2358
+ export interface UnionMember8 {
2359
+ authScheme: 'SERVICE_ACCOUNT';
2360
+
2361
+ toolkitSlug: string;
2362
+
2363
+ val: UnionMember8.Val;
2364
+ }
2365
+
2366
+ export namespace UnionMember8 {
2367
+ export interface Val {
2368
+ application_id: string;
2369
+
2370
+ installation_id: string;
2371
+
2372
+ private_key: string;
2373
+
2374
+ account_id?: string;
2375
+
2376
+ account_url?: string;
2377
+
2378
+ api_url?: string;
2379
+
2380
+ base_url?: string;
2381
+
2382
+ borneo_dashboard_url?: string;
2383
+
2384
+ COMPANYDOMAIN?: string;
2385
+
2386
+ dc?: string;
2387
+
2388
+ domain?: string;
2389
+
2390
+ extension?: string;
2391
+
2392
+ form_api_base_url?: string;
2393
+
2394
+ instanceEndpoint?: string;
2395
+
2396
+ instanceName?: string;
2397
+
2398
+ proxy_password?: string;
2399
+
2400
+ proxy_username?: string;
2401
+
2402
+ region?: string;
2403
+
2404
+ server_location?: string;
2405
+
2406
+ shop?: string;
2407
+
2408
+ site_name?: string;
2409
+
2410
+ subdomain?: string;
2411
+
2412
+ version?: string;
2413
+
2414
+ your_server?: string;
2415
+
2416
+ 'your-domain'?: string;
2417
+
2418
+ [k: string]: unknown;
2419
+ }
2420
+ }
2421
+
2422
+ export interface UnionMember9 {
2423
+ authScheme: 'GOOGLE_SERVICE_ACCOUNT';
2424
+
2425
+ toolkitSlug: string;
2426
+
2427
+ val: UnionMember9.Val;
2428
+ }
2429
+
2430
+ export namespace UnionMember9 {
2431
+ export interface Val {
2432
+ credentials_json: string;
2433
+
2434
+ account_id?: string;
2435
+
2436
+ account_url?: string;
2437
+
2438
+ api_url?: string;
2439
+
2440
+ base_url?: string;
2441
+
2442
+ borneo_dashboard_url?: string;
2443
+
2444
+ COMPANYDOMAIN?: string;
2445
+
2446
+ dc?: string;
2447
+
2448
+ domain?: string;
2449
+
2450
+ extension?: string;
2451
+
2452
+ form_api_base_url?: string;
2453
+
2454
+ instanceEndpoint?: string;
2455
+
2456
+ instanceName?: string;
2457
+
2458
+ proxy_password?: string;
2459
+
2460
+ proxy_username?: string;
2461
+
2462
+ region?: string;
2463
+
2464
+ server_location?: string;
2465
+
2466
+ shop?: string;
2467
+
2468
+ site_name?: string;
2469
+
2470
+ subdomain?: string;
2471
+
2472
+ version?: string;
2473
+
2474
+ your_server?: string;
2475
+
2476
+ 'your-domain'?: string;
2477
+
2478
+ [k: string]: unknown;
2479
+ }
2480
+ }
2481
+
2482
+ export interface UnionMember10 {
2483
+ authScheme: 'S2S_OAUTH2';
2484
+
2485
+ toolkitSlug: string;
2486
+
2487
+ val: UnionMember10.Val;
2488
+ }
2489
+
2490
+ export namespace UnionMember10 {
2491
+ export interface Val {
2492
+ access_token: string;
2493
+
2494
+ client_id: string;
2495
+
2496
+ client_secret: string;
2497
+
2498
+ account_id?: string;
2499
+
2500
+ account_url?: string;
2501
+
2502
+ api_url?: string;
2503
+
2504
+ base_url?: string;
2505
+
2506
+ borneo_dashboard_url?: string;
2507
+
2508
+ COMPANYDOMAIN?: string;
2509
+
2510
+ dc?: string;
2511
+
2512
+ domain?: string;
2513
+
2514
+ expires_at?: string;
2515
+
2516
+ expires_in?: number | string | null;
2517
+
2518
+ extension?: string;
2519
+
2520
+ form_api_base_url?: string;
2521
+
2522
+ instanceEndpoint?: string;
2523
+
2524
+ instanceName?: string;
2525
+
2526
+ proxy_password?: string;
2527
+
2528
+ proxy_username?: string;
2529
+
2530
+ region?: string;
2531
+
2532
+ scope?: string | Array<string> | null;
2533
+
2534
+ server_location?: string;
2535
+
2536
+ shop?: string;
2537
+
2538
+ site_name?: string;
2539
+
2540
+ subdomain?: string;
2541
+
2542
+ token_type?: string;
2543
+
2544
+ version?: string;
2545
+
2546
+ your_server?: string;
2547
+
2548
+ 'your-domain'?: string;
2549
+
2550
+ [k: string]: unknown;
2551
+ }
2552
+ }
2553
+
2554
+ export interface Parameter {
2555
+ /**
2556
+ * Parameter name
2557
+ */
2558
+ name: string;
2559
+
2560
+ /**
2561
+ * Parameter type (header or query)
2562
+ */
2563
+ type: 'header' | 'query';
2564
+
2565
+ /**
2566
+ * Parameter value
2567
+ */
2568
+ value: string;
2569
+ }
2570
+ }
2571
+
2572
+ export interface SessionSearchParams {
2573
+ /**
2574
+ * List of search queries to execute in parallel. Up to 7 queries supported.
2575
+ */
2576
+ queries: Array<SessionSearchParams.Query>;
2577
+
2578
+ /**
2579
+ * Optional model hint for search/planning behavior (e.g., "gpt-4o"). Ignored if
2580
+ * invalid.
2581
+ */
2582
+ model?: string;
2583
+ }
2584
+
2585
+ export namespace SessionSearchParams {
2586
+ export interface Query {
2587
+ /**
2588
+ * The task or use case to search tools for. Provide a detailed description to get
2589
+ * the best results.
2590
+ */
2591
+ use_case: string;
2592
+
2593
+ /**
2594
+ * Known field hints as key:value pairs (e.g., "channel_name:general,
2595
+ * user_email:john@example.com")
2596
+ */
2597
+ known_fields?: string;
2598
+ }
2599
+ }
2600
+
2601
+ export interface SessionToolkitsParams {
2602
+ /**
2603
+ * Cursor for pagination. The cursor is a base64 encoded string of the page and
2604
+ * limit. The page is the page number and the limit is the number of items per
2605
+ * page. The cursor is used to paginate through the items. The cursor is not
2606
+ * required for the first page.
2607
+ */
2608
+ cursor?: string;
2609
+
2610
+ /**
2611
+ * Whether to filter by connected toolkits. If provided, only connected toolkits
2612
+ * will be returned.
2613
+ */
2614
+ is_connected?: boolean | null;
2615
+
2616
+ /**
2617
+ * Number of items per page, max allowed is 1000
2618
+ */
2619
+ limit?: number | null;
2620
+
2621
+ /**
2622
+ * Search query to filter toolkits by name, slug, or description
2623
+ */
2624
+ search?: string;
2625
+
2626
+ /**
2627
+ * Optional comma-separated list of toolkit slugs to filter by. If provided, only
2628
+ * these toolkits will be returned, overriding the session configuration.
2629
+ */
2630
+ toolkits?: Array<string> | null;
2631
+ }
2632
+
2633
+ export interface SessionToolsParams {}
2634
+
2635
+ Session.Files = Files;
2636
+
2637
+ export declare namespace Session {
2638
+ export {
2639
+ type SessionCreateResponse as SessionCreateResponse,
2640
+ type SessionRetrieveResponse as SessionRetrieveResponse,
2641
+ type SessionExecuteResponse as SessionExecuteResponse,
2642
+ type SessionExecuteMetaResponse as SessionExecuteMetaResponse,
2643
+ type SessionLinkResponse as SessionLinkResponse,
2644
+ type SessionProxyExecuteResponse as SessionProxyExecuteResponse,
2645
+ type SessionSearchResponse as SessionSearchResponse,
2646
+ type SessionToolkitsResponse as SessionToolkitsResponse,
2647
+ type SessionToolsResponse as SessionToolsResponse,
2648
+ type SessionCreateParams as SessionCreateParams,
2649
+ type SessionExecuteParams as SessionExecuteParams,
2650
+ type SessionExecuteMetaParams as SessionExecuteMetaParams,
2651
+ type SessionLinkParams as SessionLinkParams,
2652
+ type SessionProxyExecuteParams as SessionProxyExecuteParams,
2653
+ type SessionSearchParams as SessionSearchParams,
2654
+ type SessionToolkitsParams as SessionToolkitsParams,
2655
+ type SessionToolsParams as SessionToolsParams,
2656
+ };
2657
+
2658
+ export {
2659
+ Files as Files,
2660
+ type FileListResponse as FileListResponse,
2661
+ type FileDeleteResponse as FileDeleteResponse,
2662
+ type FileCreateDownloadURLResponse as FileCreateDownloadURLResponse,
2663
+ type FileCreateUploadURLResponse as FileCreateUploadURLResponse,
2664
+ type FileListParams as FileListParams,
2665
+ type FileDeleteParams as FileDeleteParams,
2666
+ type FileCreateDownloadURLParams as FileCreateDownloadURLParams,
2667
+ type FileCreateUploadURLParams as FileCreateUploadURLParams,
2668
+ };
2669
+ }