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

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 (226) hide show
  1. package/CHANGELOG.md +25 -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 +1 -1
  24. package/resources/auth-configs.d.mts +4 -1
  25. package/resources/auth-configs.d.mts.map +1 -1
  26. package/resources/auth-configs.d.ts +4 -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 +11 -2
  41. package/resources/connected-accounts.d.mts.map +1 -1
  42. package/resources/connected-accounts.d.ts +11 -2
  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 +3 -0
  57. package/resources/link.d.mts.map +1 -1
  58. package/resources/link.d.ts +3 -0
  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.ts +1 -1
  114. package/resources/tool-router/index.js +2 -2
  115. package/resources/tool-router/index.js.map +1 -1
  116. package/resources/tool-router/index.mjs +1 -1
  117. package/resources/tool-router/session/files.d.mts +205 -0
  118. package/resources/tool-router/session/files.d.mts.map +1 -0
  119. package/resources/tool-router/session/files.d.ts +205 -0
  120. package/resources/tool-router/session/files.d.ts.map +1 -0
  121. package/resources/tool-router/session/files.js +101 -0
  122. package/resources/tool-router/session/files.js.map +1 -0
  123. package/resources/tool-router/session/files.mjs +97 -0
  124. package/resources/tool-router/session/files.mjs.map +1 -0
  125. package/resources/tool-router/session/index.d.mts +3 -0
  126. package/resources/tool-router/session/index.d.mts.map +1 -0
  127. package/resources/tool-router/session/index.d.ts +3 -0
  128. package/resources/tool-router/session/index.d.ts.map +1 -0
  129. package/resources/tool-router/session/index.js +9 -0
  130. package/resources/tool-router/session/index.js.map +1 -0
  131. package/resources/tool-router/session/index.mjs +4 -0
  132. package/resources/tool-router/session/index.mjs.map +1 -0
  133. package/resources/tool-router/session/session.d.mts +1201 -0
  134. package/resources/tool-router/session/session.d.mts.map +1 -0
  135. package/resources/tool-router/session/session.d.ts +1201 -0
  136. package/resources/tool-router/session/session.d.ts.map +1 -0
  137. package/resources/tool-router/session/session.js +153 -0
  138. package/resources/tool-router/session/session.js.map +1 -0
  139. package/resources/tool-router/session/session.mjs +148 -0
  140. package/resources/tool-router/session/session.mjs.map +1 -0
  141. package/resources/tool-router/session.d.mts +1 -1193
  142. package/resources/tool-router/session.d.mts.map +1 -1
  143. package/resources/tool-router/session.d.ts +1 -1193
  144. package/resources/tool-router/session.d.ts.map +1 -1
  145. package/resources/tool-router/session.js +2 -138
  146. package/resources/tool-router/session.js.map +1 -1
  147. package/resources/tool-router/session.mjs +1 -136
  148. package/resources/tool-router/session.mjs.map +1 -1
  149. package/resources/tool-router/tool-router.d.mts +5 -2
  150. package/resources/tool-router/tool-router.d.mts.map +1 -1
  151. package/resources/tool-router/tool-router.d.ts +5 -2
  152. package/resources/tool-router/tool-router.d.ts.map +1 -1
  153. package/resources/tool-router/tool-router.js +5 -2
  154. package/resources/tool-router/tool-router.js.map +1 -1
  155. package/resources/tool-router/tool-router.mjs +5 -2
  156. package/resources/tool-router/tool-router.mjs.map +1 -1
  157. package/resources/toolkits.d.mts +3 -0
  158. package/resources/toolkits.d.mts.map +1 -1
  159. package/resources/toolkits.d.ts +3 -0
  160. package/resources/toolkits.d.ts.map +1 -1
  161. package/resources/toolkits.js +3 -0
  162. package/resources/toolkits.js.map +1 -1
  163. package/resources/toolkits.mjs +3 -0
  164. package/resources/toolkits.mjs.map +1 -1
  165. package/resources/tools.d.mts +3 -0
  166. package/resources/tools.d.mts.map +1 -1
  167. package/resources/tools.d.ts +3 -0
  168. package/resources/tools.d.ts.map +1 -1
  169. package/resources/tools.js +3 -0
  170. package/resources/tools.js.map +1 -1
  171. package/resources/tools.mjs +3 -0
  172. package/resources/tools.mjs.map +1 -1
  173. package/resources/trigger-instances/manage.d.mts +3 -0
  174. package/resources/trigger-instances/manage.d.mts.map +1 -1
  175. package/resources/trigger-instances/manage.d.ts +3 -0
  176. package/resources/trigger-instances/manage.d.ts.map +1 -1
  177. package/resources/trigger-instances/manage.js +3 -0
  178. package/resources/trigger-instances/manage.js.map +1 -1
  179. package/resources/trigger-instances/manage.mjs +3 -0
  180. package/resources/trigger-instances/manage.mjs.map +1 -1
  181. package/resources/trigger-instances/trigger-instances.d.mts +3 -0
  182. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  183. package/resources/trigger-instances/trigger-instances.d.ts +3 -0
  184. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  185. package/resources/trigger-instances/trigger-instances.js +3 -0
  186. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  187. package/resources/trigger-instances/trigger-instances.mjs +3 -0
  188. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  189. package/resources/triggers-types.d.mts +3 -0
  190. package/resources/triggers-types.d.mts.map +1 -1
  191. package/resources/triggers-types.d.ts +3 -0
  192. package/resources/triggers-types.d.ts.map +1 -1
  193. package/resources/triggers-types.js +3 -0
  194. package/resources/triggers-types.js.map +1 -1
  195. package/resources/triggers-types.mjs +3 -0
  196. package/resources/triggers-types.mjs.map +1 -1
  197. package/src/client.ts +44 -10
  198. package/src/internal/utils/query.ts +7 -0
  199. package/src/internal/utils.ts +1 -0
  200. package/src/resources/auth-configs.ts +4 -1
  201. package/src/resources/cli/realtime.ts +3 -0
  202. package/src/resources/connected-accounts.ts +11 -2
  203. package/src/resources/files.ts +3 -0
  204. package/src/resources/link.ts +3 -0
  205. package/src/resources/logs/tools.ts +3 -0
  206. package/src/resources/logs/triggers.ts +3 -0
  207. package/src/resources/mcp/custom.ts +3 -0
  208. package/src/resources/mcp/generate.ts +3 -0
  209. package/src/resources/mcp/mcp.ts +3 -0
  210. package/src/resources/migration.ts +3 -0
  211. package/src/resources/tool-router/index.ts +1 -1
  212. package/src/resources/tool-router/session/files.ts +284 -0
  213. package/src/resources/tool-router/session/index.ts +31 -0
  214. package/src/resources/tool-router/session/session.ts +1465 -0
  215. package/src/resources/tool-router/session.ts +1 -1432
  216. package/src/resources/tool-router/tool-router.ts +5 -2
  217. package/src/resources/toolkits.ts +3 -0
  218. package/src/resources/tools.ts +3 -0
  219. package/src/resources/trigger-instances/manage.ts +3 -0
  220. package/src/resources/trigger-instances/trigger-instances.ts +3 -0
  221. package/src/resources/triggers-types.ts +3 -0
  222. package/src/version.ts +1 -1
  223. package/version.d.mts +1 -1
  224. package/version.d.ts +1 -1
  225. package/version.js +1 -1
  226. package/version.mjs +1 -1
@@ -1,1434 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../core/resource';
4
- import { APIPromise } from '../../core/api-promise';
5
- import { RequestOptions } from '../../internal/request-options';
6
- import { path } from '../../internal/utils/path';
7
-
8
- export class Session extends APIResource {
9
- /**
10
- * Creates a new session for the tool router feature. This endpoint initializes a
11
- * new session with specified toolkits and their authentication configurations. The
12
- * session provides an isolated environment for testing and managing tool routing
13
- * logic with scoped MCP server access.
14
- *
15
- * @example
16
- * ```ts
17
- * const session = await client.toolRouter.session.create({
18
- * user_id: 'user_123456789',
19
- * });
20
- * ```
21
- */
22
- create(body: SessionCreateParams, options?: RequestOptions): APIPromise<SessionCreateResponse> {
23
- return this._client.post('/api/v3/tool_router/session', { body, ...options });
24
- }
25
-
26
- /**
27
- * Retrieves an existing tool router session by its ID. Returns the session
28
- * configuration, MCP server URL, and available tools.
29
- *
30
- * @example
31
- * ```ts
32
- * const session = await client.toolRouter.session.retrieve(
33
- * 'trs_123456789',
34
- * );
35
- * ```
36
- */
37
- retrieve(sessionID: string, options?: RequestOptions): APIPromise<SessionRetrieveResponse> {
38
- return this._client.get(path`/api/v3/tool_router/session/${sessionID}`, options);
39
- }
40
-
41
- /**
42
- * Executes a specific tool within a tool router session. The toolkit is
43
- * automatically inferred from the tool slug. The tool must belong to an allowed
44
- * toolkit and must not be disabled in the session configuration. This endpoint
45
- * validates permissions, resolves connected accounts, and executes the tool with
46
- * the session context.
47
- *
48
- * @example
49
- * ```ts
50
- * const response = await client.toolRouter.session.execute(
51
- * 'trs_LX9uJKBinWWr',
52
- * { tool_slug: 'GITHUB_CREATE_ISSUE' },
53
- * );
54
- * ```
55
- */
56
- execute(
57
- sessionID: string,
58
- body: SessionExecuteParams,
59
- options?: RequestOptions,
60
- ): APIPromise<SessionExecuteResponse> {
61
- return this._client.post(path`/api/v3/tool_router/session/${sessionID}/execute`, { body, ...options });
62
- }
63
-
64
- /**
65
- * Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session.
66
- *
67
- * @example
68
- * ```ts
69
- * const response =
70
- * await client.toolRouter.session.executeMeta(
71
- * 'trs_LX9uJKBinWWr',
72
- * { slug: 'COMPOSIO_MANAGE_CONNECTIONS' },
73
- * );
74
- * ```
75
- */
76
- executeMeta(
77
- sessionID: string,
78
- body: SessionExecuteMetaParams,
79
- options?: RequestOptions,
80
- ): APIPromise<SessionExecuteMetaResponse> {
81
- return this._client.post(path`/api/v3/tool_router/session/${sessionID}/execute_meta`, {
82
- body,
83
- ...options,
84
- });
85
- }
86
-
87
- /**
88
- * Initiates an authentication link session for a specific toolkit within a tool
89
- * router session. Returns a link token and redirect URL that users can use to
90
- * complete the OAuth flow.
91
- *
92
- * @example
93
- * ```ts
94
- * const response = await client.toolRouter.session.link(
95
- * 'trs_LX9uJKBinWWr',
96
- * { toolkit: 'github' },
97
- * );
98
- * ```
99
- */
100
- link(
101
- sessionID: string,
102
- body: SessionLinkParams,
103
- options?: RequestOptions,
104
- ): APIPromise<SessionLinkResponse> {
105
- return this._client.post(path`/api/v3/tool_router/session/${sessionID}/link`, { body, ...options });
106
- }
107
-
108
- /**
109
- * Search for tools matching a given use case query within a tool router session.
110
- * Returns matching tool slugs, full tool schemas, toolkit connection statuses, and
111
- * workflow guidance in a predictable format.
112
- *
113
- * @example
114
- * ```ts
115
- * const response = await client.toolRouter.session.search(
116
- * 'trs_LX9uJKBinWWr',
117
- * {
118
- * queries: [
119
- * { use_case: 'Send a slack message to a channel' },
120
- * ],
121
- * },
122
- * );
123
- * ```
124
- */
125
- search(
126
- sessionID: string,
127
- body: SessionSearchParams,
128
- options?: RequestOptions,
129
- ): APIPromise<SessionSearchResponse> {
130
- return this._client.post(path`/api/v3/tool_router/session/${sessionID}/search`, { body, ...options });
131
- }
132
-
133
- /**
134
- * Retrieves a cursor-paginated list of toolkits available in the tool router
135
- * session. Includes toolkit metadata, composio-managed auth schemes, and connected
136
- * accounts if available. Optionally filter by specific toolkit slugs.
137
- *
138
- * @example
139
- * ```ts
140
- * const response = await client.toolRouter.session.toolkits(
141
- * 'trs_123456789',
142
- * );
143
- * ```
144
- */
145
- toolkits(
146
- sessionID: string,
147
- query: SessionToolkitsParams | null | undefined = {},
148
- options?: RequestOptions,
149
- ): APIPromise<SessionToolkitsResponse> {
150
- return this._client.get(path`/api/v3/tool_router/session/${sessionID}/toolkits`, { query, ...options });
151
- }
152
-
153
- /**
154
- * Returns the meta tools available in a tool router session with their complete
155
- * schemas. This includes request and response schemas specific to the session
156
- * context.
157
- *
158
- * @example
159
- * ```ts
160
- * const response = await client.toolRouter.session.tools(
161
- * 'session_id',
162
- * );
163
- * ```
164
- */
165
- tools(
166
- sessionID: string,
167
- query?: SessionToolsParams | null | undefined,
168
- options?: RequestOptions,
169
- ): APIPromise<SessionToolsResponse> {
170
- return this._client.get(path`/api/v3/tool_router/session/${sessionID}/tools`, options);
171
- }
172
- }
173
-
174
- export interface SessionCreateResponse {
175
- /**
176
- * The session configuration including user, toolkits, and overrides
177
- */
178
- config: SessionCreateResponse.Config;
179
-
180
- mcp: SessionCreateResponse.Mcp;
181
-
182
- /**
183
- * The identifier of the session
184
- */
185
- session_id: string;
186
-
187
- /**
188
- * List of available tools in this session
189
- */
190
- tool_router_tools: Array<string>;
191
-
192
- /**
193
- * Experimental features including the generated system prompt. Only returned on
194
- * session creation, not on GET.
195
- */
196
- experimental?: SessionCreateResponse.Experimental;
197
- }
198
-
199
- export namespace SessionCreateResponse {
200
- /**
201
- * The session configuration including user, toolkits, and overrides
202
- */
203
- export interface Config {
204
- /**
205
- * User identifier for this session
206
- */
207
- user_id: string;
208
-
209
- /**
210
- * Auth config overrides per toolkit
211
- */
212
- auth_configs?: { [key: string]: string };
213
-
214
- /**
215
- * Connected account overrides per toolkit
216
- */
217
- connected_accounts?: { [key: string]: string };
218
-
219
- /**
220
- * Manage connections configuration
221
- */
222
- manage_connections?: Config.ManageConnections;
223
-
224
- /**
225
- * MCP tool annotation hints for filtering tools with enabled/disabled support.
226
- * enabled: tags that the tool must have at least one of. disabled: tags that the
227
- * tool must NOT have any of. Both conditions must be satisfied.
228
- */
229
- tags?: Config.Tags;
230
-
231
- /**
232
- * Toolkit configuration - either enabled list or disabled list
233
- */
234
- toolkits?: Config.Enabled | Config.Disabled;
235
-
236
- /**
237
- * Tool-level configuration per toolkit
238
- */
239
- tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
240
-
241
- /**
242
- * Workbench configuration
243
- */
244
- workbench?: Config.Workbench;
245
- }
246
-
247
- export namespace Config {
248
- /**
249
- * Manage connections configuration
250
- */
251
- export interface ManageConnections {
252
- /**
253
- * Custom callback URL for connected account auth flows
254
- */
255
- callback_url?: string;
256
-
257
- /**
258
- * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
259
- * Default false. May not work reliably with GPT models.
260
- */
261
- enable_wait_for_connections?: boolean;
262
-
263
- /**
264
- * Whether to enable the connection manager for automatic connection handling
265
- */
266
- enabled?: boolean;
267
- }
268
-
269
- /**
270
- * MCP tool annotation hints for filtering tools with enabled/disabled support.
271
- * enabled: tags that the tool must have at least one of. disabled: tags that the
272
- * tool must NOT have any of. Both conditions must be satisfied.
273
- */
274
- export interface Tags {
275
- /**
276
- * Tags that the tool must NOT have any of
277
- */
278
- disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
279
-
280
- /**
281
- * Tags that the tool must have at least one of
282
- */
283
- enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
284
- }
285
-
286
- export interface Enabled {
287
- enabled: Array<string>;
288
- }
289
-
290
- export interface Disabled {
291
- disabled: Array<string>;
292
- }
293
-
294
- export interface Enabled {
295
- enabled: Array<string>;
296
- }
297
-
298
- export interface Disabled {
299
- disabled: Array<string>;
300
- }
301
-
302
- export interface Tags {
303
- tags: Tags.Tags;
304
- }
305
-
306
- export namespace Tags {
307
- export interface Tags {
308
- /**
309
- * Tags that the tool must NOT have any of
310
- */
311
- disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
312
-
313
- /**
314
- * Tags that the tool must have at least one of
315
- */
316
- enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
317
- }
318
- }
319
-
320
- /**
321
- * Workbench configuration
322
- */
323
- export interface Workbench {
324
- /**
325
- * Character threshold after which tool execution response are saved to a file in
326
- * workbench. Default is 20k.
327
- */
328
- auto_offload_threshold?: number;
329
-
330
- /**
331
- * Whether proxy execution is enabled in the workbench
332
- */
333
- proxy_execution_enabled?: boolean;
334
- }
335
- }
336
-
337
- export interface Mcp {
338
- /**
339
- * The type of the MCP server. Can be http
340
- */
341
- type: 'http';
342
-
343
- /**
344
- * The URL of the MCP server
345
- */
346
- url: string;
347
- }
348
-
349
- /**
350
- * Experimental features including the generated system prompt. Only returned on
351
- * session creation, not on GET.
352
- */
353
- export interface Experimental {
354
- /**
355
- * The assistive system prompt to inject into your agent for optimal tool router
356
- * usage
357
- */
358
- assistive_prompt: string;
359
- }
360
- }
361
-
362
- export interface SessionRetrieveResponse {
363
- /**
364
- * The session configuration including user, toolkits, and overrides
365
- */
366
- config: SessionRetrieveResponse.Config;
367
-
368
- mcp: SessionRetrieveResponse.Mcp;
369
-
370
- /**
371
- * The identifier of the session
372
- */
373
- session_id: string;
374
-
375
- /**
376
- * List of available tools in this session
377
- */
378
- tool_router_tools: Array<string>;
379
- }
380
-
381
- export namespace SessionRetrieveResponse {
382
- /**
383
- * The session configuration including user, toolkits, and overrides
384
- */
385
- export interface Config {
386
- /**
387
- * User identifier for this session
388
- */
389
- user_id: string;
390
-
391
- /**
392
- * Auth config overrides per toolkit
393
- */
394
- auth_configs?: { [key: string]: string };
395
-
396
- /**
397
- * Connected account overrides per toolkit
398
- */
399
- connected_accounts?: { [key: string]: string };
400
-
401
- /**
402
- * Manage connections configuration
403
- */
404
- manage_connections?: Config.ManageConnections;
405
-
406
- /**
407
- * MCP tool annotation hints for filtering tools with enabled/disabled support.
408
- * enabled: tags that the tool must have at least one of. disabled: tags that the
409
- * tool must NOT have any of. Both conditions must be satisfied.
410
- */
411
- tags?: Config.Tags;
412
-
413
- /**
414
- * Toolkit configuration - either enabled list or disabled list
415
- */
416
- toolkits?: Config.Enabled | Config.Disabled;
417
-
418
- /**
419
- * Tool-level configuration per toolkit
420
- */
421
- tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
422
-
423
- /**
424
- * Workbench configuration
425
- */
426
- workbench?: Config.Workbench;
427
- }
428
-
429
- export namespace Config {
430
- /**
431
- * Manage connections configuration
432
- */
433
- export interface ManageConnections {
434
- /**
435
- * Custom callback URL for connected account auth flows
436
- */
437
- callback_url?: string;
438
-
439
- /**
440
- * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
441
- * Default false. May not work reliably with GPT models.
442
- */
443
- enable_wait_for_connections?: boolean;
444
-
445
- /**
446
- * Whether to enable the connection manager for automatic connection handling
447
- */
448
- enabled?: boolean;
449
- }
450
-
451
- /**
452
- * MCP tool annotation hints for filtering tools with enabled/disabled support.
453
- * enabled: tags that the tool must have at least one of. disabled: tags that the
454
- * tool must NOT have any of. Both conditions must be satisfied.
455
- */
456
- export interface Tags {
457
- /**
458
- * Tags that the tool must NOT have any of
459
- */
460
- disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
461
-
462
- /**
463
- * Tags that the tool must have at least one of
464
- */
465
- enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
466
- }
467
-
468
- export interface Enabled {
469
- enabled: Array<string>;
470
- }
471
-
472
- export interface Disabled {
473
- disabled: Array<string>;
474
- }
475
-
476
- export interface Enabled {
477
- enabled: Array<string>;
478
- }
479
-
480
- export interface Disabled {
481
- disabled: Array<string>;
482
- }
483
-
484
- export interface Tags {
485
- tags: Tags.Tags;
486
- }
487
-
488
- export namespace Tags {
489
- export interface Tags {
490
- /**
491
- * Tags that the tool must NOT have any of
492
- */
493
- disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
494
-
495
- /**
496
- * Tags that the tool must have at least one of
497
- */
498
- enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
499
- }
500
- }
501
-
502
- /**
503
- * Workbench configuration
504
- */
505
- export interface Workbench {
506
- /**
507
- * Character threshold after which tool execution response are saved to a file in
508
- * workbench. Default is 20k.
509
- */
510
- auto_offload_threshold?: number;
511
-
512
- /**
513
- * Whether proxy execution is enabled in the workbench
514
- */
515
- proxy_execution_enabled?: boolean;
516
- }
517
- }
518
-
519
- export interface Mcp {
520
- /**
521
- * The type of the MCP server. Can be http
522
- */
523
- type: 'http';
524
-
525
- /**
526
- * The URL of the MCP server
527
- */
528
- url: string;
529
- }
530
- }
531
-
532
- export interface SessionExecuteResponse {
533
- /**
534
- * The data returned by the tool execution
535
- */
536
- data: { [key: string]: unknown };
537
-
538
- /**
539
- * Error message if the execution failed, null otherwise
540
- */
541
- error: string | null;
542
-
543
- /**
544
- * Unique identifier for the execution log
545
- */
546
- log_id: string;
547
- }
548
-
549
- export interface SessionExecuteMetaResponse {
550
- /**
551
- * The data returned by the tool execution
552
- */
553
- data: { [key: string]: unknown };
554
-
555
- /**
556
- * Error message if the execution failed, null otherwise
557
- */
558
- error: string | null;
559
-
560
- /**
561
- * Unique identifier for the execution log
562
- */
563
- log_id: string;
564
- }
565
-
566
- export interface SessionLinkResponse {
567
- /**
568
- * The unique identifier for the connected account
569
- */
570
- connected_account_id: string;
571
-
572
- /**
573
- * Token used to complete the authentication flow
574
- */
575
- link_token: string;
576
-
577
- /**
578
- * The URL where users should be redirected to complete OAuth
579
- */
580
- redirect_url: string;
581
- }
582
-
583
- export interface SessionSearchResponse {
584
- /**
585
- * Error message if any searches failed, null if all succeeded. Format: "X out of Y
586
- * searches failed, reasons: <details>"
587
- */
588
- error: string | null;
589
-
590
- /**
591
- * Combined workflow guidance covering connections, planner, and memory usage. Each
592
- * element is a step instruction.
593
- */
594
- next_steps_guidance: Array<string>;
595
-
596
- /**
597
- * Per-query search results with tools, reasoning, and memory. One entry per query
598
- * in request order.
599
- */
600
- results: Array<SessionSearchResponse.Result>;
601
-
602
- /**
603
- * Session info for correlating meta tool calls
604
- */
605
- session: SessionSearchResponse.Session;
606
-
607
- /**
608
- * Whether all searches completed successfully. False if any query failed.
609
- */
610
- success: boolean;
611
-
612
- /**
613
- * Time information for the query
614
- */
615
- time_info: SessionSearchResponse.TimeInfo;
616
-
617
- /**
618
- * Deduplicated tool definitions keyed by tool_slug for O(1) lookup. Each tool
619
- * appears once even if used in multiple queries.
620
- */
621
- tool_schemas: { [key: string]: SessionSearchResponse.ToolSchemas };
622
-
623
- /**
624
- * Connection status for all toolkits mentioned across all queries, with
625
- * descriptions merged in.
626
- */
627
- toolkit_connection_statuses: Array<SessionSearchResponse.ToolkitConnectionStatus>;
628
- }
629
-
630
- export namespace SessionSearchResponse {
631
- export interface Result {
632
- /**
633
- * 1-based index of the query in the request
634
- */
635
- index: number;
636
-
637
- /**
638
- * List of main tool slugs matching the search criteria
639
- */
640
- primary_tool_slugs: Array<string>;
641
-
642
- /**
643
- * List of related tool slugs that might be useful
644
- */
645
- related_tool_slugs: Array<string>;
646
-
647
- /**
648
- * List of unique toolkit slugs used by tools in this query
649
- */
650
- toolkits: Array<string>;
651
-
652
- /**
653
- * The use case that was searched
654
- */
655
- use_case: string;
656
-
657
- /**
658
- * Task difficulty assessment (e.g., "easy - Simple single-tool operation with
659
- * known parameters")
660
- */
661
- difficulty?: string;
662
-
663
- /**
664
- * Error message if the search for this query failed, null otherwise. Always
665
- * present for failed queries.
666
- */
667
- error?: string | null;
668
-
669
- /**
670
- * Guidance message about the search results, particularly when a cached plan is
671
- * available
672
- */
673
- execution_guidance?: string;
674
-
675
- /**
676
- * Common pitfalls and considerations (only present when cached plan is available)
677
- */
678
- known_pitfalls?: Array<string>;
679
-
680
- /**
681
- * Memory data relevant to this query, grouped by app. Only present for non-cached
682
- * search results.
683
- */
684
- memory?: { [key: string]: Array<string> };
685
-
686
- /**
687
- * ID of cached plan if available
688
- */
689
- plan_id?: string;
690
-
691
- /**
692
- * Workflow steps from cached plan (only present when cached plan is available)
693
- */
694
- recommended_plan_steps?: Array<string>;
695
-
696
- /**
697
- * Reference Python code snippets for processing tool responses in the workbench
698
- * (only present when cached plan is available)
699
- */
700
- reference_workbench_snippets?: Array<Result.ReferenceWorkbenchSnippet>;
701
- }
702
-
703
- export namespace Result {
704
- export interface ReferenceWorkbenchSnippet {
705
- /**
706
- * Python code snippet for the workbench
707
- */
708
- code: string;
709
-
710
- /**
711
- * Description of what the code snippet does
712
- */
713
- description: string;
714
- }
715
- }
716
-
717
- /**
718
- * Session info for correlating meta tool calls
719
- */
720
- export interface Session {
721
- /**
722
- * Session identifier to be passed to subsequent meta tool calls as session_id.
723
- */
724
- id: string;
725
-
726
- /**
727
- * Whether a fresh session id was generated in this call.
728
- */
729
- generate_id: boolean;
730
-
731
- /**
732
- * LLM-facing guidance on how to reuse this session id
733
- */
734
- instructions: string;
735
- }
736
-
737
- /**
738
- * Time information for the query
739
- */
740
- export interface TimeInfo {
741
- /**
742
- * Current time in ISO format (UTC)
743
- */
744
- current_time_utc: string;
745
-
746
- /**
747
- * Current time as Unix epoch timestamp in seconds
748
- */
749
- current_time_utc_epoch_seconds: number;
750
-
751
- /**
752
- * Important message about time handling and timezone considerations
753
- */
754
- message: string;
755
- }
756
-
757
- export interface ToolSchemas {
758
- /**
759
- * The slug of the tool
760
- */
761
- tool_slug: string;
762
-
763
- /**
764
- * The slug of the toolkit that provides this tool
765
- */
766
- toolkit: string;
767
-
768
- /**
769
- * Description of the tool
770
- */
771
- description?: string;
772
-
773
- /**
774
- * Whether the full input_schema is included in this response
775
- */
776
- hasFullSchema?: boolean;
777
-
778
- /**
779
- * Input schema for the tool (only present when hasFullSchema is true)
780
- */
781
- input_schema?: { [key: string]: unknown };
782
-
783
- /**
784
- * Output/response schema for the tool
785
- */
786
- output_schema?: { [key: string]: unknown };
787
-
788
- /**
789
- * Reference to fetch full schema when hasFullSchema is false
790
- */
791
- schemaRef?: ToolSchemas.SchemaRef;
792
- }
793
-
794
- export namespace ToolSchemas {
795
- /**
796
- * Reference to fetch full schema when hasFullSchema is false
797
- */
798
- export interface SchemaRef {
799
- /**
800
- * Arguments to pass to the tool
801
- */
802
- args: SchemaRef.Args;
803
-
804
- /**
805
- * Instruction message for the LLM
806
- */
807
- message: string;
808
-
809
- /**
810
- * Tool to call
811
- */
812
- tool: 'COMPOSIO_GET_TOOL_SCHEMAS';
813
- }
814
-
815
- export namespace SchemaRef {
816
- /**
817
- * Arguments to pass to the tool
818
- */
819
- export interface Args {
820
- /**
821
- * Tool slugs to fetch schemas for
822
- */
823
- tool_slugs: Array<string>;
824
- }
825
- }
826
- }
827
-
828
- export interface ToolkitConnectionStatus {
829
- /**
830
- * Description of what the toolkit does and its capabilities
831
- */
832
- description: string;
833
-
834
- /**
835
- * Whether an active connection exists for this toolkit
836
- */
837
- has_active_connection: boolean;
838
-
839
- /**
840
- * Human-readable message about the connection status and next steps
841
- */
842
- status_message: string;
843
-
844
- /**
845
- * The toolkit slug identifier (e.g., "gmail", "slack")
846
- */
847
- toolkit: string;
848
-
849
- /**
850
- * Connection details including auth config and connected account IDs. Only present
851
- * when has_active_connection is true.
852
- */
853
- connection_details?: { [key: string]: unknown };
854
-
855
- /**
856
- * Information about the currently connected user (email, name, etc.)
857
- */
858
- current_user_info?: { [key: string]: unknown };
859
- }
860
- }
861
-
862
- export interface SessionToolkitsResponse {
863
- current_page: number;
864
-
865
- items: Array<SessionToolkitsResponse.Item>;
866
-
867
- total_items: number;
868
-
869
- total_pages: number;
870
-
871
- next_cursor?: string | null;
872
- }
873
-
874
- export namespace SessionToolkitsResponse {
875
- export interface Item {
876
- /**
877
- * Available Composio-managed auth schemes
878
- */
879
- composio_managed_auth_schemes: Array<string>;
880
-
881
- /**
882
- * Connected account if available
883
- */
884
- connected_account: Item.ConnectedAccount | null;
885
-
886
- /**
887
- * Whether the toolkit is enabled
888
- */
889
- enabled: boolean;
890
-
891
- /**
892
- * Whether the toolkit is no-auth
893
- */
894
- is_no_auth: boolean;
895
-
896
- /**
897
- * Toolkit metadata
898
- */
899
- meta: Item.Meta;
900
-
901
- /**
902
- * Display name of the toolkit
903
- */
904
- name: string;
905
-
906
- /**
907
- * Unique slug identifier
908
- */
909
- slug: string;
910
- }
911
-
912
- export namespace Item {
913
- /**
914
- * Connected account if available
915
- */
916
- export interface ConnectedAccount {
917
- /**
918
- * Connected account identifier
919
- */
920
- id: string;
921
-
922
- /**
923
- * Auth config details
924
- */
925
- auth_config: ConnectedAccount.AuthConfig;
926
-
927
- /**
928
- * Creation timestamp
929
- */
930
- created_at: string;
931
-
932
- /**
933
- * Connection status
934
- */
935
- status: string;
936
-
937
- /**
938
- * User identifier
939
- */
940
- user_id: string;
941
- }
942
-
943
- export namespace ConnectedAccount {
944
- /**
945
- * Auth config details
946
- */
947
- export interface AuthConfig {
948
- /**
949
- * Auth config identifier
950
- */
951
- id: string;
952
-
953
- /**
954
- * Authentication scheme type
955
- */
956
- auth_scheme: string;
957
-
958
- /**
959
- * Whether this is a Composio-managed auth config
960
- */
961
- is_composio_managed: boolean;
962
- }
963
- }
964
-
965
- /**
966
- * Toolkit metadata
967
- */
968
- export interface Meta {
969
- /**
970
- * Description of the toolkit
971
- */
972
- description: string;
973
-
974
- /**
975
- * URL to the toolkit logo
976
- */
977
- logo: string;
978
- }
979
- }
980
- }
981
-
982
- export interface SessionToolsResponse {
983
- /**
984
- * List of tools with their complete schemas
985
- */
986
- items: Array<SessionToolsResponse.Item>;
987
- }
988
-
989
- export namespace SessionToolsResponse {
990
- export interface Item {
991
- /**
992
- * List of all available versions for this tool
993
- */
994
- available_versions: Array<string>;
995
-
996
- deprecated: Item.Deprecated;
997
-
998
- /**
999
- * Detailed explanation of the tool's functionality and purpose
1000
- */
1001
- description: string;
1002
-
1003
- /**
1004
- * Schema definition of required input parameters for the tool
1005
- */
1006
- input_parameters: { [key: string]: unknown };
1007
-
1008
- /**
1009
- * Indicates if this tool is deprecated and may be removed in the future
1010
- */
1011
- is_deprecated: boolean;
1012
-
1013
- /**
1014
- * Human-readable display name of the tool
1015
- */
1016
- name: string;
1017
-
1018
- /**
1019
- * Indicates if the tool can be used without authentication
1020
- */
1021
- no_auth: boolean;
1022
-
1023
- /**
1024
- * Schema definition of return values from the tool
1025
- */
1026
- output_parameters: { [key: string]: unknown };
1027
-
1028
- /**
1029
- * List of scopes associated with the tool
1030
- */
1031
- scopes: Array<string>;
1032
-
1033
- /**
1034
- * Unique identifier for the tool
1035
- */
1036
- slug: string;
1037
-
1038
- /**
1039
- * List of tags associated with the tool for categorization and filtering
1040
- */
1041
- tags: Array<string>;
1042
-
1043
- toolkit: Item.Toolkit;
1044
-
1045
- /**
1046
- * Current version of the tool
1047
- */
1048
- version: string;
1049
-
1050
- /**
1051
- * Human-friendly description of the tool, if available
1052
- */
1053
- human_description?: string;
1054
- }
1055
-
1056
- export namespace Item {
1057
- export interface Deprecated {
1058
- /**
1059
- * List of all available versions for this tool
1060
- */
1061
- available_versions: Array<string>;
1062
-
1063
- /**
1064
- * The display name of the tool
1065
- */
1066
- displayName: string;
1067
-
1068
- /**
1069
- * Indicates if this tool is deprecated and may be removed in the future
1070
- */
1071
- is_deprecated: boolean;
1072
-
1073
- toolkit: Deprecated.Toolkit;
1074
-
1075
- /**
1076
- * Current version identifier of the tool
1077
- */
1078
- version: string;
1079
- }
1080
-
1081
- export namespace Deprecated {
1082
- export interface Toolkit {
1083
- /**
1084
- * URL to the toolkit logo image
1085
- */
1086
- logo: string;
1087
- }
1088
- }
1089
-
1090
- export interface Toolkit {
1091
- /**
1092
- * URL to the toolkit logo image
1093
- */
1094
- logo: string;
1095
-
1096
- /**
1097
- * Human-readable name of the parent toolkit
1098
- */
1099
- name: string;
1100
-
1101
- /**
1102
- * Unique identifier of the parent toolkit
1103
- */
1104
- slug: string;
1105
- }
1106
- }
1107
- }
1108
-
1109
- export interface SessionCreateParams {
1110
- /**
1111
- * The identifier of the user who is initiating the session, ideally a unique
1112
- * identifier from your database like a user ID or email address
1113
- */
1114
- user_id: string;
1115
-
1116
- /**
1117
- * The auth configs to use for the session. This will override the default behavior
1118
- * and use the given auth config when specific toolkits are being executed
1119
- */
1120
- auth_configs?: { [key: string]: string };
1121
-
1122
- /**
1123
- * The connected accounts to use for the session. This will override the default
1124
- * behaviour and use the given connected account when specific toolkits are being
1125
- * executed
1126
- */
1127
- connected_accounts?: { [key: string]: string };
1128
-
1129
- /**
1130
- * Experimental features - not stable, may be modified or removed in future
1131
- * versions.
1132
- */
1133
- experimental?: SessionCreateParams.Experimental;
1134
-
1135
- /**
1136
- * Configuration for connection management settings
1137
- */
1138
- manage_connections?: SessionCreateParams.ManageConnections;
1139
-
1140
- /**
1141
- * Global MCP tool annotation hints for filtering. Array format is treated as
1142
- * enabled list. Object format supports both enabled (tool must have at least one)
1143
- * and disabled (tool must NOT have any) lists. Toolkit-level tags override this.
1144
- * Toolkit enabled/disabled lists take precedence over tag filtering.
1145
- */
1146
- tags?:
1147
- | Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>
1148
- | SessionCreateParams.UnionMember1;
1149
-
1150
- /**
1151
- * Toolkit configuration - specify either enable toolkits (allowlist) or disable
1152
- * toolkits (denylist). Mutually exclusive.
1153
- */
1154
- toolkits?: SessionCreateParams.Enable | SessionCreateParams.Disable;
1155
-
1156
- /**
1157
- * Tool-level configuration per toolkit - either specify enable tools (whitelist),
1158
- * disable tools (blacklist), or filter by MCP tags for each toolkit
1159
- */
1160
- tools?: {
1161
- [key: string]: SessionCreateParams.Enable | SessionCreateParams.Disable | SessionCreateParams.Tags;
1162
- };
1163
-
1164
- /**
1165
- * Configuration for workbench behavior
1166
- */
1167
- workbench?: SessionCreateParams.Workbench;
1168
- }
1169
-
1170
- export namespace SessionCreateParams {
1171
- /**
1172
- * Experimental features - not stable, may be modified or removed in future
1173
- * versions.
1174
- */
1175
- export interface Experimental {
1176
- /**
1177
- * Customize assistive prompt generation (e.g., timezone).
1178
- */
1179
- assistive_prompt_config?: Experimental.AssistivePromptConfig;
1180
- }
1181
-
1182
- export namespace Experimental {
1183
- /**
1184
- * Customize assistive prompt generation (e.g., timezone).
1185
- */
1186
- export interface AssistivePromptConfig {
1187
- /**
1188
- * IANA timezone identifier (e.g., 'America/New_York', 'Europe/London'). Used to
1189
- * customize the system prompt with timezone-aware instructions.
1190
- */
1191
- user_timezone?: string;
1192
- }
1193
- }
1194
-
1195
- /**
1196
- * Configuration for connection management settings
1197
- */
1198
- export interface ManageConnections {
1199
- /**
1200
- * The URL to redirect to after a user completes authentication for a connected
1201
- * account. This allows you to handle the auth callback in your own application.
1202
- */
1203
- callback_url?: string;
1204
-
1205
- /**
1206
- * Whether to enable the connection manager for automatic connection handling. If
1207
- * true, we will provide a tool your agent can use to initiate connections to
1208
- * toolkits if it doesnt exist. If set to false, then you have to manage
1209
- * connections manually.
1210
- */
1211
- enable?: boolean | null;
1212
-
1213
- /**
1214
- * When true, the COMPOSIO_WAIT_FOR_CONNECTIONS tool is available for agents to
1215
- * poll connection status after sharing auth URLs. Default is false (disabled). May
1216
- * not work reliably with GPT models.
1217
- */
1218
- enable_wait_for_connections?: boolean | null;
1219
- }
1220
-
1221
- export interface UnionMember1 {
1222
- /**
1223
- * Tags that the tool must NOT have any of
1224
- */
1225
- disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1226
-
1227
- /**
1228
- * Tags that the tool must have at least one of
1229
- */
1230
- enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1231
- }
1232
-
1233
- /**
1234
- * Enable only specific toolkits (allowlist)
1235
- */
1236
- export interface Enable {
1237
- /**
1238
- * Only these specific toolkits will be enabled
1239
- */
1240
- enable: Array<string>;
1241
- }
1242
-
1243
- /**
1244
- * Disable specific toolkits (denylist)
1245
- */
1246
- export interface Disable {
1247
- /**
1248
- * These specific toolkits will be disabled
1249
- */
1250
- disable: Array<string>;
1251
- }
1252
-
1253
- export interface Enable {
1254
- /**
1255
- * Only these specific tools will be available for this toolkit
1256
- */
1257
- enable: Array<string>;
1258
- }
1259
-
1260
- export interface Disable {
1261
- /**
1262
- * These specific tools will be disabled for this toolkit
1263
- */
1264
- disable: Array<string>;
1265
- }
1266
-
1267
- export interface Tags {
1268
- /**
1269
- * MCP tags to filter tools. Array format is treated as enabled list. Object format
1270
- * supports both enabled and disabled lists.
1271
- */
1272
- tags: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'> | Tags.UnionMember1;
1273
- }
1274
-
1275
- export namespace Tags {
1276
- export interface UnionMember1 {
1277
- /**
1278
- * Tags that the tool must NOT have any of
1279
- */
1280
- disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1281
-
1282
- /**
1283
- * Tags that the tool must have at least one of
1284
- */
1285
- enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1286
- }
1287
- }
1288
-
1289
- /**
1290
- * Configuration for workbench behavior
1291
- */
1292
- export interface Workbench {
1293
- /**
1294
- * Character threshold for automatic offloading. When workbench response exceeds
1295
- * this threshold, it will be automatically offloaded. Default is picked
1296
- * automatically based on the response size.
1297
- */
1298
- auto_offload_threshold?: number;
1299
-
1300
- /**
1301
- * Whether proxy execution is enabled. When enabled, workbench can call URLs and
1302
- * APIs directly.
1303
- */
1304
- enable_proxy_execution?: boolean;
1305
- }
1306
- }
1307
-
1308
- export interface SessionExecuteParams {
1309
- /**
1310
- * The unique slug identifier of the tool to execute
1311
- */
1312
- tool_slug: string;
1313
-
1314
- /**
1315
- * The arguments required by the tool
1316
- */
1317
- arguments?: { [key: string]: unknown };
1318
- }
1319
-
1320
- export interface SessionExecuteMetaParams {
1321
- /**
1322
- * The unique slug identifier of the meta tool to execute
1323
- */
1324
- slug:
1325
- | 'COMPOSIO_SEARCH_TOOLS'
1326
- | 'COMPOSIO_MULTI_EXECUTE_TOOL'
1327
- | 'COMPOSIO_MANAGE_CONNECTIONS'
1328
- | 'COMPOSIO_WAIT_FOR_CONNECTIONS'
1329
- | 'COMPOSIO_REMOTE_WORKBENCH'
1330
- | 'COMPOSIO_REMOTE_BASH_TOOL'
1331
- | 'COMPOSIO_GET_TOOL_SCHEMAS'
1332
- | 'COMPOSIO_UPSERT_RECIPE'
1333
- | 'COMPOSIO_GET_RECIPE';
1334
-
1335
- /**
1336
- * The arguments required by the meta tool
1337
- */
1338
- arguments?: { [key: string]: unknown };
1339
- }
1340
-
1341
- export interface SessionLinkParams {
1342
- /**
1343
- * The unique slug identifier of the toolkit to connect
1344
- */
1345
- toolkit: string;
1346
-
1347
- /**
1348
- * URL where users will be redirected after completing auth
1349
- */
1350
- callback_url?: string;
1351
- }
1352
-
1353
- export interface SessionSearchParams {
1354
- /**
1355
- * List of search queries to execute in parallel. Up to 7 queries supported.
1356
- */
1357
- queries: Array<SessionSearchParams.Query>;
1358
-
1359
- /**
1360
- * Optional model hint for search/planning behavior (e.g., "gpt-4o"). Ignored if
1361
- * invalid.
1362
- */
1363
- model?: string;
1364
- }
1365
-
1366
- export namespace SessionSearchParams {
1367
- export interface Query {
1368
- /**
1369
- * The task or use case to search tools for. Provide a detailed description to get
1370
- * the best results.
1371
- */
1372
- use_case: string;
1373
-
1374
- /**
1375
- * Known field hints as key:value pairs (e.g., "channel_name:general,
1376
- * user_email:john@example.com")
1377
- */
1378
- known_fields?: string;
1379
- }
1380
- }
1381
-
1382
- export interface SessionToolkitsParams {
1383
- /**
1384
- * Cursor for pagination. The cursor is a base64 encoded string of the page and
1385
- * limit. The page is the page number and the limit is the number of items per
1386
- * page. The cursor is used to paginate through the items. The cursor is not
1387
- * required for the first page.
1388
- */
1389
- cursor?: string;
1390
-
1391
- /**
1392
- * Whether to filter by connected toolkits. If provided, only connected toolkits
1393
- * will be returned.
1394
- */
1395
- is_connected?: boolean | null;
1396
-
1397
- /**
1398
- * Number of items per page, max allowed is 1000
1399
- */
1400
- limit?: number | null;
1401
-
1402
- /**
1403
- * Search query to filter toolkits by name, slug, or description
1404
- */
1405
- search?: string;
1406
-
1407
- /**
1408
- * Optional comma-separated list of toolkit slugs to filter by. If provided, only
1409
- * these toolkits will be returned, overriding the session configuration.
1410
- */
1411
- toolkits?: Array<string> | null;
1412
- }
1413
-
1414
- export interface SessionToolsParams {}
1415
-
1416
- export declare namespace Session {
1417
- export {
1418
- type SessionCreateResponse as SessionCreateResponse,
1419
- type SessionRetrieveResponse as SessionRetrieveResponse,
1420
- type SessionExecuteResponse as SessionExecuteResponse,
1421
- type SessionExecuteMetaResponse as SessionExecuteMetaResponse,
1422
- type SessionLinkResponse as SessionLinkResponse,
1423
- type SessionSearchResponse as SessionSearchResponse,
1424
- type SessionToolkitsResponse as SessionToolkitsResponse,
1425
- type SessionToolsResponse as SessionToolsResponse,
1426
- type SessionCreateParams as SessionCreateParams,
1427
- type SessionExecuteParams as SessionExecuteParams,
1428
- type SessionExecuteMetaParams as SessionExecuteMetaParams,
1429
- type SessionLinkParams as SessionLinkParams,
1430
- type SessionSearchParams as SessionSearchParams,
1431
- type SessionToolkitsParams as SessionToolkitsParams,
1432
- type SessionToolsParams as SessionToolsParams,
1433
- };
1434
- }
3
+ export * from './session/index';