@composio/client 0.1.0-alpha.7 → 0.1.0-alpha.71

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 (758) hide show
  1. package/CHANGELOG.md +977 -0
  2. package/LICENSE +1 -1
  3. package/README.md +22 -35
  4. package/api-promise.js +2 -15
  5. package/api-promise.js.map +1 -1
  6. package/client.d.mts +85 -43
  7. package/client.d.mts.map +1 -1
  8. package/client.d.ts +85 -43
  9. package/client.d.ts.map +1 -1
  10. package/client.js +162 -108
  11. package/client.js.map +1 -1
  12. package/client.mjs +144 -67
  13. package/client.mjs.map +1 -1
  14. package/core/api-promise.d.mts +0 -1
  15. package/core/api-promise.d.mts.map +1 -1
  16. package/core/api-promise.d.ts +0 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.js +4 -14
  19. package/core/api-promise.js.map +1 -1
  20. package/core/api-promise.mjs +1 -11
  21. package/core/api-promise.mjs.map +1 -1
  22. package/core/error.d.mts +0 -1
  23. package/core/error.d.mts.map +1 -1
  24. package/core/error.d.ts +0 -1
  25. package/core/error.d.ts.map +1 -1
  26. package/core/error.js.map +1 -1
  27. package/core/error.mjs.map +1 -1
  28. package/core/resource.d.mts +1 -1
  29. package/core/resource.d.mts.map +1 -1
  30. package/core/resource.d.ts +1 -1
  31. package/core/resource.d.ts.map +1 -1
  32. package/core/resource.js.map +1 -1
  33. package/core/resource.mjs.map +1 -1
  34. package/error.js +2 -15
  35. package/error.js.map +1 -1
  36. package/internal/builtin-types.d.mts +0 -2
  37. package/internal/builtin-types.d.mts.map +1 -1
  38. package/internal/builtin-types.d.ts +0 -2
  39. package/internal/builtin-types.d.ts.map +1 -1
  40. package/internal/detect-platform.js +3 -3
  41. package/internal/detect-platform.js.map +1 -1
  42. package/internal/detect-platform.mjs +3 -3
  43. package/internal/detect-platform.mjs.map +1 -1
  44. package/internal/errors.d.mts.map +1 -1
  45. package/internal/errors.d.ts.map +1 -1
  46. package/internal/errors.js +2 -2
  47. package/internal/errors.js.map +1 -1
  48. package/internal/errors.mjs.map +1 -1
  49. package/internal/headers.d.mts +1 -2
  50. package/internal/headers.d.mts.map +1 -1
  51. package/internal/headers.d.ts +1 -2
  52. package/internal/headers.d.ts.map +1 -1
  53. package/internal/headers.js +7 -5
  54. package/internal/headers.js.map +1 -1
  55. package/internal/headers.mjs +7 -5
  56. package/internal/headers.mjs.map +1 -1
  57. package/internal/parse.d.mts +0 -1
  58. package/internal/parse.d.mts.map +1 -1
  59. package/internal/parse.d.ts +0 -1
  60. package/internal/parse.d.ts.map +1 -1
  61. package/internal/parse.js +6 -2
  62. package/internal/parse.js.map +1 -1
  63. package/internal/parse.mjs +5 -0
  64. package/internal/parse.mjs.map +1 -1
  65. package/internal/qs/formats.d.mts +1 -0
  66. package/internal/qs/formats.d.mts.map +1 -1
  67. package/internal/qs/formats.d.ts +1 -0
  68. package/internal/qs/formats.d.ts.map +1 -1
  69. package/internal/qs/formats.js +4 -2
  70. package/internal/qs/formats.js.map +1 -1
  71. package/internal/qs/formats.mjs +2 -1
  72. package/internal/qs/formats.mjs.map +1 -1
  73. package/internal/qs/stringify.d.mts.map +1 -1
  74. package/internal/qs/stringify.d.ts.map +1 -1
  75. package/internal/qs/stringify.js +16 -19
  76. package/internal/qs/stringify.js.map +1 -1
  77. package/internal/qs/stringify.mjs +17 -19
  78. package/internal/qs/stringify.mjs.map +1 -1
  79. package/internal/qs/utils.d.mts +1 -0
  80. package/internal/qs/utils.d.mts.map +1 -1
  81. package/internal/qs/utils.d.ts +1 -0
  82. package/internal/qs/utils.d.ts.map +1 -1
  83. package/internal/qs/utils.js +22 -21
  84. package/internal/qs/utils.js.map +1 -1
  85. package/internal/qs/utils.mjs +12 -12
  86. package/internal/qs/utils.mjs.map +1 -1
  87. package/internal/request-options.d.mts +43 -1
  88. package/internal/request-options.d.mts.map +1 -1
  89. package/internal/request-options.d.ts +43 -1
  90. package/internal/request-options.d.ts.map +1 -1
  91. package/internal/request-options.js.map +1 -1
  92. package/internal/request-options.mjs.map +1 -1
  93. package/internal/shim-types.d.mts +11 -22
  94. package/internal/shim-types.d.mts.map +1 -0
  95. package/internal/shim-types.d.ts +11 -22
  96. package/internal/shim-types.d.ts.map +1 -0
  97. package/internal/shim-types.js +4 -0
  98. package/internal/shim-types.js.map +1 -0
  99. package/{resources/org.mjs → internal/shim-types.mjs} +2 -2
  100. package/internal/shim-types.mjs.map +1 -0
  101. package/internal/shims.d.mts +2 -2
  102. package/internal/shims.d.mts.map +1 -1
  103. package/internal/shims.d.ts +2 -2
  104. package/internal/shims.d.ts.map +1 -1
  105. package/internal/shims.js +5 -6
  106. package/internal/shims.js.map +1 -1
  107. package/internal/shims.mjs.map +1 -1
  108. package/internal/to-file.d.mts +1 -2
  109. package/internal/to-file.d.mts.map +1 -1
  110. package/internal/to-file.d.ts +1 -2
  111. package/internal/to-file.d.ts.map +1 -1
  112. package/internal/to-file.js +5 -5
  113. package/internal/to-file.js.map +1 -1
  114. package/internal/to-file.mjs +4 -3
  115. package/internal/to-file.mjs.map +1 -1
  116. package/internal/tslib.js +81 -0
  117. package/internal/tslib.mjs +17 -0
  118. package/internal/types.d.mts +12 -11
  119. package/internal/types.d.mts.map +1 -1
  120. package/internal/types.d.ts +12 -11
  121. package/internal/types.d.ts.map +1 -1
  122. package/internal/uploads.d.mts +1 -3
  123. package/internal/uploads.d.mts.map +1 -1
  124. package/internal/uploads.d.ts +1 -3
  125. package/internal/uploads.d.ts.map +1 -1
  126. package/internal/uploads.js +17 -7
  127. package/internal/uploads.js.map +1 -1
  128. package/internal/uploads.mjs +13 -4
  129. package/internal/uploads.mjs.map +1 -1
  130. package/internal/utils/base64.d.mts.map +1 -1
  131. package/internal/utils/base64.d.ts.map +1 -1
  132. package/internal/utils/base64.js +12 -7
  133. package/internal/utils/base64.js.map +1 -1
  134. package/internal/utils/base64.mjs +12 -7
  135. package/internal/utils/base64.mjs.map +1 -1
  136. package/internal/utils/bytes.d.mts +4 -0
  137. package/internal/utils/bytes.d.mts.map +1 -0
  138. package/internal/utils/bytes.d.ts +4 -0
  139. package/internal/utils/bytes.d.ts.map +1 -0
  140. package/internal/utils/bytes.js +31 -0
  141. package/internal/utils/bytes.js.map +1 -0
  142. package/internal/utils/bytes.mjs +26 -0
  143. package/internal/utils/bytes.mjs.map +1 -0
  144. package/internal/utils/env.d.mts.map +1 -1
  145. package/internal/utils/env.d.ts.map +1 -1
  146. package/internal/utils/env.js +2 -2
  147. package/internal/utils/env.js.map +1 -1
  148. package/internal/utils/env.mjs +2 -2
  149. package/internal/utils/env.mjs.map +1 -1
  150. package/internal/utils/log.d.mts +0 -1
  151. package/internal/utils/log.d.mts.map +1 -1
  152. package/internal/utils/log.d.ts +0 -1
  153. package/internal/utils/log.d.ts.map +1 -1
  154. package/internal/utils/log.js +6 -5
  155. package/internal/utils/log.js.map +1 -1
  156. package/internal/utils/log.mjs +4 -3
  157. package/internal/utils/log.mjs.map +1 -1
  158. package/internal/utils/path.d.mts.map +1 -1
  159. package/internal/utils/path.d.ts.map +1 -1
  160. package/internal/utils/path.js +28 -7
  161. package/internal/utils/path.js.map +1 -1
  162. package/internal/utils/path.mjs +27 -6
  163. package/internal/utils/path.mjs.map +1 -1
  164. package/internal/utils/query.d.mts +2 -0
  165. package/internal/utils/query.d.mts.map +1 -0
  166. package/internal/utils/query.d.ts +2 -0
  167. package/internal/utils/query.d.ts.map +1 -0
  168. package/internal/utils/query.js +10 -0
  169. package/internal/utils/query.js.map +1 -0
  170. package/internal/utils/query.mjs +6 -0
  171. package/internal/utils/query.mjs.map +1 -0
  172. package/internal/utils/sleep.d.mts.map +1 -1
  173. package/internal/utils/sleep.d.ts.map +1 -1
  174. package/internal/utils/uuid.d.mts +1 -1
  175. package/internal/utils/uuid.d.mts.map +1 -1
  176. package/internal/utils/uuid.d.ts +1 -1
  177. package/internal/utils/uuid.d.ts.map +1 -1
  178. package/internal/utils/uuid.js +1 -2
  179. package/internal/utils/uuid.js.map +1 -1
  180. package/internal/utils/uuid.mjs +1 -2
  181. package/internal/utils/uuid.mjs.map +1 -1
  182. package/internal/utils/values.d.mts +2 -0
  183. package/internal/utils/values.d.mts.map +1 -1
  184. package/internal/utils/values.d.ts +2 -0
  185. package/internal/utils/values.d.ts.map +1 -1
  186. package/internal/utils/values.js +11 -8
  187. package/internal/utils/values.js.map +1 -1
  188. package/internal/utils/values.mjs +5 -3
  189. package/internal/utils/values.mjs.map +1 -1
  190. package/internal/utils.d.mts +1 -0
  191. package/internal/utils.d.ts +1 -0
  192. package/internal/utils.js +8 -20
  193. package/internal/utils.js.map +1 -1
  194. package/internal/utils.mjs +1 -0
  195. package/package.json +14 -11
  196. package/resource.js +2 -15
  197. package/resource.js.map +1 -1
  198. package/resources/auth-configs.d.mts +511 -54
  199. package/resources/auth-configs.d.mts.map +1 -1
  200. package/resources/auth-configs.d.ts +511 -54
  201. package/resources/auth-configs.d.ts.map +1 -1
  202. package/resources/auth-configs.js +79 -6
  203. package/resources/auth-configs.js.map +1 -1
  204. package/resources/auth-configs.mjs +79 -6
  205. package/resources/auth-configs.mjs.map +1 -1
  206. package/resources/cli/cli.d.mts +120 -0
  207. package/resources/cli/cli.d.mts.map +1 -0
  208. package/resources/cli/cli.d.ts +120 -0
  209. package/resources/cli/cli.d.ts.map +1 -0
  210. package/resources/cli/cli.js +36 -0
  211. package/resources/cli/cli.js.map +1 -0
  212. package/resources/cli/cli.mjs +31 -0
  213. package/resources/cli/cli.mjs.map +1 -0
  214. package/resources/cli/index.d.mts +3 -0
  215. package/resources/cli/index.d.mts.map +1 -0
  216. package/resources/cli/index.d.ts +3 -0
  217. package/resources/cli/index.d.ts.map +1 -0
  218. package/resources/cli/index.js +9 -0
  219. package/resources/cli/index.js.map +1 -0
  220. package/resources/cli/index.mjs +4 -0
  221. package/resources/cli/index.mjs.map +1 -0
  222. package/resources/cli/realtime.d.mts +56 -0
  223. package/resources/cli/realtime.d.mts.map +1 -0
  224. package/resources/cli/realtime.d.ts +56 -0
  225. package/resources/cli/realtime.d.ts.map +1 -0
  226. package/resources/cli/realtime.js +25 -0
  227. package/resources/cli/realtime.js.map +1 -0
  228. package/resources/cli/realtime.mjs +21 -0
  229. package/resources/cli/realtime.mjs.map +1 -0
  230. package/resources/cli.d.mts +1 -123
  231. package/resources/cli.d.mts.map +1 -1
  232. package/resources/cli.d.ts +1 -123
  233. package/resources/cli.d.ts.map +1 -1
  234. package/resources/cli.js +2 -14
  235. package/resources/cli.js.map +1 -1
  236. package/resources/cli.mjs +1 -12
  237. package/resources/cli.mjs.map +1 -1
  238. package/resources/connected-accounts.d.mts +9882 -231
  239. package/resources/connected-accounts.d.mts.map +1 -1
  240. package/resources/connected-accounts.d.ts +9882 -231
  241. package/resources/connected-accounts.d.ts.map +1 -1
  242. package/resources/connected-accounts.js +124 -7
  243. package/resources/connected-accounts.js.map +1 -1
  244. package/resources/connected-accounts.mjs +124 -7
  245. package/resources/connected-accounts.mjs.map +1 -1
  246. package/resources/files.d.mts +152 -0
  247. package/resources/files.d.mts.map +1 -0
  248. package/resources/files.d.ts +152 -0
  249. package/resources/files.d.ts.map +1 -0
  250. package/resources/files.js +42 -0
  251. package/resources/files.js.map +1 -0
  252. package/resources/files.mjs +38 -0
  253. package/resources/files.mjs.map +1 -0
  254. package/resources/index.d.mts +13 -12
  255. package/resources/index.d.mts.map +1 -1
  256. package/resources/index.d.ts +13 -12
  257. package/resources/index.d.ts.map +1 -1
  258. package/resources/index.js +14 -12
  259. package/resources/index.js.map +1 -1
  260. package/resources/index.mjs +7 -6
  261. package/resources/index.mjs.map +1 -1
  262. package/resources/link.d.mts +2273 -0
  263. package/resources/link.d.mts.map +1 -0
  264. package/resources/link.d.ts +2273 -0
  265. package/resources/link.d.ts.map +1 -0
  266. package/resources/link.js +19 -0
  267. package/resources/link.js.map +1 -0
  268. package/resources/link.mjs +15 -0
  269. package/resources/link.mjs.map +1 -0
  270. package/resources/logs/index.d.mts +4 -0
  271. package/resources/logs/index.d.mts.map +1 -0
  272. package/resources/logs/index.d.ts +4 -0
  273. package/resources/logs/index.d.ts.map +1 -0
  274. package/resources/logs/index.js +11 -0
  275. package/resources/logs/index.js.map +1 -0
  276. package/resources/logs/index.mjs +5 -0
  277. package/resources/logs/index.mjs.map +1 -0
  278. package/resources/logs/logs.d.mts +14 -0
  279. package/resources/logs/logs.d.mts.map +1 -0
  280. package/resources/logs/logs.d.ts +14 -0
  281. package/resources/logs/logs.d.ts.map +1 -0
  282. package/resources/logs/logs.js +21 -0
  283. package/resources/logs/logs.js.map +1 -0
  284. package/resources/logs/logs.mjs +16 -0
  285. package/resources/logs/logs.mjs.map +1 -0
  286. package/resources/logs/tools.d.mts +173 -0
  287. package/resources/logs/tools.d.mts.map +1 -0
  288. package/resources/logs/tools.d.ts +173 -0
  289. package/resources/logs/tools.d.ts.map +1 -0
  290. package/resources/logs/tools.js +35 -0
  291. package/resources/logs/tools.js.map +1 -0
  292. package/resources/logs/tools.mjs +31 -0
  293. package/resources/logs/tools.mjs.map +1 -0
  294. package/resources/logs/triggers.d.mts +161 -0
  295. package/resources/logs/triggers.d.mts.map +1 -0
  296. package/resources/logs/triggers.d.ts +161 -0
  297. package/resources/logs/triggers.d.ts.map +1 -0
  298. package/resources/logs/triggers.js +36 -0
  299. package/resources/logs/triggers.js.map +1 -0
  300. package/resources/logs/triggers.mjs +32 -0
  301. package/resources/logs/triggers.mjs.map +1 -0
  302. package/resources/logs.d.mts +2 -0
  303. package/resources/logs.d.mts.map +1 -0
  304. package/resources/logs.d.ts +2 -0
  305. package/resources/logs.d.ts.map +1 -0
  306. package/resources/logs.js +6 -0
  307. package/resources/logs.js.map +1 -0
  308. package/resources/{auth.mjs → logs.mjs} +2 -2
  309. package/resources/logs.mjs.map +1 -0
  310. package/resources/mcp/custom.d.mts +105 -0
  311. package/resources/mcp/custom.d.mts.map +1 -0
  312. package/resources/mcp/custom.d.ts +105 -0
  313. package/resources/mcp/custom.d.ts.map +1 -0
  314. package/resources/mcp/custom.js +29 -0
  315. package/resources/mcp/custom.js.map +1 -0
  316. package/resources/mcp/custom.mjs +25 -0
  317. package/resources/mcp/custom.mjs.map +1 -0
  318. package/resources/mcp/generate.d.mts +65 -0
  319. package/resources/mcp/generate.d.mts.map +1 -0
  320. package/resources/mcp/generate.d.ts +65 -0
  321. package/resources/mcp/generate.d.ts.map +1 -0
  322. package/resources/mcp/generate.js +32 -0
  323. package/resources/mcp/generate.js.map +1 -0
  324. package/resources/mcp/generate.mjs +28 -0
  325. package/resources/mcp/generate.mjs.map +1 -0
  326. package/resources/mcp/index.d.mts +3 -2
  327. package/resources/mcp/index.d.mts.map +1 -1
  328. package/resources/mcp/index.d.ts +3 -2
  329. package/resources/mcp/index.d.ts.map +1 -1
  330. package/resources/mcp/index.js +5 -3
  331. package/resources/mcp/index.js.map +1 -1
  332. package/resources/mcp/index.mjs +2 -1
  333. package/resources/mcp/index.mjs.map +1 -1
  334. package/resources/mcp/mcp.d.mts +450 -175
  335. package/resources/mcp/mcp.d.mts.map +1 -1
  336. package/resources/mcp/mcp.d.ts +450 -175
  337. package/resources/mcp/mcp.d.ts.map +1 -1
  338. package/resources/mcp/mcp.js +95 -42
  339. package/resources/mcp/mcp.js.map +1 -1
  340. package/resources/mcp/mcp.mjs +94 -19
  341. package/resources/mcp/mcp.mjs.map +1 -1
  342. package/resources/mcp.js +2 -15
  343. package/resources/mcp.js.map +1 -1
  344. package/resources/migration.d.mts +35 -0
  345. package/resources/migration.d.mts.map +1 -0
  346. package/resources/migration.d.ts +35 -0
  347. package/resources/migration.d.ts.map +1 -0
  348. package/resources/migration.js +20 -0
  349. package/resources/migration.js.map +1 -0
  350. package/resources/migration.mjs +16 -0
  351. package/resources/migration.mjs.map +1 -0
  352. package/resources/project/config.d.mts +71 -0
  353. package/resources/project/config.d.mts.map +1 -0
  354. package/resources/project/config.d.ts +71 -0
  355. package/resources/project/config.d.ts.map +1 -0
  356. package/resources/project/config.js +33 -0
  357. package/resources/project/config.js.map +1 -0
  358. package/resources/project/config.mjs +29 -0
  359. package/resources/project/config.mjs.map +1 -0
  360. package/resources/project/index.d.mts +3 -0
  361. package/resources/project/index.d.mts.map +1 -0
  362. package/resources/project/index.d.ts +3 -0
  363. package/resources/project/index.d.ts.map +1 -0
  364. package/resources/project/index.js +9 -0
  365. package/resources/project/index.js.map +1 -0
  366. package/resources/project/index.mjs +4 -0
  367. package/resources/project/index.mjs.map +1 -0
  368. package/resources/project/project.d.mts +10 -0
  369. package/resources/project/project.d.mts.map +1 -0
  370. package/resources/project/project.d.ts +10 -0
  371. package/resources/project/project.d.ts.map +1 -0
  372. package/resources/project/project.js +17 -0
  373. package/resources/project/project.js.map +1 -0
  374. package/resources/project/project.mjs +12 -0
  375. package/resources/project/project.mjs.map +1 -0
  376. package/resources/{org/project.d.mts.map → project.d.mts.map} +1 -1
  377. package/resources/{org/project.d.ts.map → project.d.ts.map} +1 -1
  378. package/resources/project.js +6 -0
  379. package/resources/project.js.map +1 -0
  380. package/resources/project.mjs.map +1 -0
  381. package/resources/tool-router/index.d.mts +3 -0
  382. package/resources/tool-router/index.d.mts.map +1 -0
  383. package/resources/tool-router/index.d.ts +3 -0
  384. package/resources/tool-router/index.d.ts.map +1 -0
  385. package/resources/tool-router/index.js +9 -0
  386. package/resources/tool-router/index.js.map +1 -0
  387. package/resources/tool-router/index.mjs +4 -0
  388. package/resources/tool-router/index.mjs.map +1 -0
  389. package/resources/tool-router/session/files.d.mts +205 -0
  390. package/resources/tool-router/session/files.d.mts.map +1 -0
  391. package/resources/tool-router/session/files.d.ts +205 -0
  392. package/resources/tool-router/session/files.d.ts.map +1 -0
  393. package/resources/tool-router/session/files.js +98 -0
  394. package/resources/tool-router/session/files.js.map +1 -0
  395. package/resources/tool-router/session/files.mjs +94 -0
  396. package/resources/tool-router/session/files.mjs.map +1 -0
  397. package/resources/tool-router/session/index.d.mts +3 -0
  398. package/resources/tool-router/session/index.d.mts.map +1 -0
  399. package/resources/tool-router/session/index.d.ts +3 -0
  400. package/resources/tool-router/session/index.d.ts.map +1 -0
  401. package/resources/{auth → tool-router/session}/index.js +3 -3
  402. package/resources/tool-router/session/index.js.map +1 -0
  403. package/resources/tool-router/session/index.mjs +4 -0
  404. package/resources/tool-router/session/index.mjs.map +1 -0
  405. package/resources/tool-router/session/session.d.mts +4024 -0
  406. package/resources/tool-router/session/session.d.mts.map +1 -0
  407. package/resources/tool-router/session/session.d.ts +4024 -0
  408. package/resources/tool-router/session/session.d.ts.map +1 -0
  409. package/resources/tool-router/session/session.js +224 -0
  410. package/resources/tool-router/session/session.js.map +1 -0
  411. package/resources/tool-router/session/session.mjs +219 -0
  412. package/resources/tool-router/session/session.mjs.map +1 -0
  413. package/resources/tool-router/session.d.mts +2 -0
  414. package/resources/tool-router/session.d.mts.map +1 -0
  415. package/resources/tool-router/session.d.ts +2 -0
  416. package/resources/tool-router/session.d.ts.map +1 -0
  417. package/resources/tool-router/session.js +6 -0
  418. package/resources/tool-router/session.js.map +1 -0
  419. package/resources/tool-router/session.mjs +3 -0
  420. package/resources/tool-router/session.mjs.map +1 -0
  421. package/resources/tool-router/tool-router.d.mts +94 -0
  422. package/resources/tool-router/tool-router.d.mts.map +1 -0
  423. package/resources/tool-router/tool-router.d.ts +94 -0
  424. package/resources/tool-router/tool-router.d.ts.map +1 -0
  425. package/resources/tool-router/tool-router.js +49 -0
  426. package/resources/tool-router/tool-router.js.map +1 -0
  427. package/resources/tool-router/tool-router.mjs +44 -0
  428. package/resources/tool-router/tool-router.mjs.map +1 -0
  429. package/resources/tool-router.d.mts +2 -0
  430. package/resources/tool-router.d.mts.map +1 -0
  431. package/resources/tool-router.d.ts +2 -0
  432. package/resources/tool-router.d.ts.map +1 -0
  433. package/resources/tool-router.js +6 -0
  434. package/resources/tool-router.js.map +1 -0
  435. package/resources/tool-router.mjs +3 -0
  436. package/resources/tool-router.mjs.map +1 -0
  437. package/resources/toolkits.d.mts +322 -6
  438. package/resources/toolkits.d.mts.map +1 -1
  439. package/resources/toolkits.d.ts +322 -6
  440. package/resources/toolkits.d.ts.map +1 -1
  441. package/resources/toolkits.js +25 -4
  442. package/resources/toolkits.js.map +1 -1
  443. package/resources/toolkits.mjs +25 -4
  444. package/resources/toolkits.mjs.map +1 -1
  445. package/resources/tools.d.mts +1407 -41
  446. package/resources/tools.d.mts.map +1 -1
  447. package/resources/tools.d.ts +1407 -41
  448. package/resources/tools.d.ts.map +1 -1
  449. package/resources/tools.js +88 -9
  450. package/resources/tools.js.map +1 -1
  451. package/resources/tools.mjs +88 -9
  452. package/resources/tools.mjs.map +1 -1
  453. package/resources/trigger-instances/index.d.mts +2 -2
  454. package/resources/trigger-instances/index.d.mts.map +1 -1
  455. package/resources/trigger-instances/index.d.ts +2 -2
  456. package/resources/trigger-instances/index.d.ts.map +1 -1
  457. package/resources/trigger-instances/index.js +3 -3
  458. package/resources/trigger-instances/index.js.map +1 -1
  459. package/resources/trigger-instances/index.mjs +1 -1
  460. package/resources/trigger-instances/index.mjs.map +1 -1
  461. package/resources/trigger-instances/manage.d.mts +55 -0
  462. package/resources/trigger-instances/manage.d.mts.map +1 -0
  463. package/resources/trigger-instances/manage.d.ts +55 -0
  464. package/resources/trigger-instances/manage.d.ts.map +1 -0
  465. package/resources/trigger-instances/manage.js +45 -0
  466. package/resources/trigger-instances/manage.js.map +1 -0
  467. package/resources/trigger-instances/manage.mjs +41 -0
  468. package/resources/trigger-instances/manage.mjs.map +1 -0
  469. package/resources/trigger-instances/trigger-instances.d.mts +190 -43
  470. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  471. package/resources/trigger-instances/trigger-instances.d.ts +190 -43
  472. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  473. package/resources/trigger-instances/trigger-instances.js +36 -37
  474. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  475. package/resources/trigger-instances/trigger-instances.mjs +35 -14
  476. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  477. package/resources/trigger-instances.js +2 -15
  478. package/resources/trigger-instances.js.map +1 -1
  479. package/resources/triggers-types.d.mts +160 -12
  480. package/resources/triggers-types.d.mts.map +1 -1
  481. package/resources/triggers-types.d.ts +160 -12
  482. package/resources/triggers-types.d.ts.map +1 -1
  483. package/resources/triggers-types.js +19 -4
  484. package/resources/triggers-types.js.map +1 -1
  485. package/resources/triggers-types.mjs +19 -4
  486. package/resources/triggers-types.mjs.map +1 -1
  487. package/resources.js +2 -15
  488. package/resources.js.map +1 -1
  489. package/src/client.ts +239 -131
  490. package/src/core/resource.ts +1 -1
  491. package/src/internal/detect-platform.ts +3 -3
  492. package/src/internal/headers.ts +9 -8
  493. package/src/internal/parse.ts +6 -0
  494. package/src/internal/qs/formats.ts +2 -1
  495. package/src/internal/qs/stringify.ts +17 -20
  496. package/src/internal/qs/utils.ts +14 -14
  497. package/src/internal/request-options.ts +54 -0
  498. package/src/internal/shim-types.ts +26 -0
  499. package/src/internal/shims.ts +2 -2
  500. package/src/internal/to-file.ts +5 -3
  501. package/src/internal/types.ts +13 -12
  502. package/src/internal/uploads.ts +17 -5
  503. package/src/internal/utils/base64.ts +13 -10
  504. package/src/internal/utils/bytes.ts +32 -0
  505. package/src/internal/utils/env.ts +2 -2
  506. package/src/internal/utils/log.ts +3 -2
  507. package/src/internal/utils/path.ts +33 -8
  508. package/src/internal/utils/query.ts +7 -0
  509. package/src/internal/utils/uuid.ts +1 -3
  510. package/src/internal/utils/values.ts +6 -3
  511. package/src/internal/utils.ts +1 -0
  512. package/src/resources/auth-configs.ts +587 -73
  513. package/src/resources/cli/cli.ts +163 -0
  514. package/src/resources/cli/index.ts +15 -0
  515. package/src/resources/cli/realtime.ts +75 -0
  516. package/src/resources/cli.ts +1 -164
  517. package/src/resources/connected-accounts.ts +18489 -448
  518. package/src/resources/files.ts +197 -0
  519. package/src/resources/index.ts +30 -28
  520. package/src/resources/link.ts +4266 -0
  521. package/src/resources/logs/index.ts +10 -0
  522. package/src/resources/logs/logs.ts +31 -0
  523. package/src/resources/logs/tools.ts +239 -0
  524. package/src/resources/logs/triggers.ts +241 -0
  525. package/src/resources/{auth.ts → logs.ts} +1 -1
  526. package/src/resources/mcp/custom.ts +125 -0
  527. package/src/resources/mcp/generate.ts +77 -0
  528. package/src/resources/mcp/index.ts +3 -3
  529. package/src/resources/mcp/mcp.ts +490 -203
  530. package/src/resources/migration.ts +49 -0
  531. package/src/resources/project/config.ts +110 -0
  532. package/src/resources/project/index.ts +9 -0
  533. package/src/resources/project/project.ts +20 -0
  534. package/src/resources/tool-router/index.ts +33 -0
  535. package/src/resources/tool-router/session/files.ts +284 -0
  536. package/src/resources/tool-router/session/index.ts +39 -0
  537. package/src/resources/tool-router/session/session.ts +5034 -0
  538. package/src/resources/{org.ts → tool-router/session.ts} +1 -1
  539. package/src/resources/tool-router/tool-router.ts +168 -0
  540. package/src/resources/tool-router.ts +3 -0
  541. package/src/resources/toolkits.ts +377 -10
  542. package/src/resources/tools.ts +2176 -63
  543. package/src/resources/trigger-instances/index.ts +5 -9
  544. package/src/resources/trigger-instances/manage.ts +75 -0
  545. package/src/resources/trigger-instances/trigger-instances.ts +206 -69
  546. package/src/resources/triggers-types.ts +168 -16
  547. package/src/version.ts +1 -1
  548. package/uploads.js +2 -15
  549. package/uploads.js.map +1 -1
  550. package/version.d.mts +1 -1
  551. package/version.d.mts.map +1 -1
  552. package/version.d.ts +1 -1
  553. package/version.d.ts.map +1 -1
  554. package/version.js +1 -1
  555. package/version.js.map +1 -1
  556. package/version.mjs +1 -1
  557. package/version.mjs.map +1 -1
  558. package/internal/shims/crypto.d.mts +0 -13
  559. package/internal/shims/crypto.d.mts.map +0 -1
  560. package/internal/shims/crypto.d.ts +0 -13
  561. package/internal/shims/crypto.d.ts.map +0 -1
  562. package/internal/shims/crypto.js +0 -13
  563. package/internal/shims/crypto.js.map +0 -1
  564. package/internal/shims/crypto.mjs +0 -9
  565. package/internal/shims/crypto.mjs.map +0 -1
  566. package/internal/shims/file.d.mts +0 -23
  567. package/internal/shims/file.d.mts.map +0 -1
  568. package/internal/shims/file.d.ts +0 -23
  569. package/internal/shims/file.d.ts.map +0 -1
  570. package/internal/shims/file.js +0 -16
  571. package/internal/shims/file.js.map +0 -1
  572. package/internal/shims/file.mjs +0 -12
  573. package/internal/shims/file.mjs.map +0 -1
  574. package/internal/shims/getBuiltinModule.d.mts +0 -11
  575. package/internal/shims/getBuiltinModule.d.mts.map +0 -1
  576. package/internal/shims/getBuiltinModule.d.ts +0 -11
  577. package/internal/shims/getBuiltinModule.d.ts.map +0 -1
  578. package/internal/shims/getBuiltinModule.js +0 -71
  579. package/internal/shims/getBuiltinModule.js.map +0 -1
  580. package/internal/shims/getBuiltinModule.mjs +0 -67
  581. package/internal/shims/getBuiltinModule.mjs.map +0 -1
  582. package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
  583. package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
  584. package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
  585. package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
  586. package/internal/shims/nullGetBuiltinModule.js +0 -5
  587. package/internal/shims/nullGetBuiltinModule.js.map +0 -1
  588. package/internal/shims/nullGetBuiltinModule.mjs +0 -2
  589. package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
  590. package/resources/action-execution.d.mts +0 -155
  591. package/resources/action-execution.d.mts.map +0 -1
  592. package/resources/action-execution.d.ts +0 -155
  593. package/resources/action-execution.d.ts.map +0 -1
  594. package/resources/action-execution.js +0 -19
  595. package/resources/action-execution.js.map +0 -1
  596. package/resources/action-execution.mjs +0 -15
  597. package/resources/action-execution.mjs.map +0 -1
  598. package/resources/auth/auth.d.mts +0 -10
  599. package/resources/auth/auth.d.mts.map +0 -1
  600. package/resources/auth/auth.d.ts +0 -10
  601. package/resources/auth/auth.d.ts.map +0 -1
  602. package/resources/auth/auth.js +0 -39
  603. package/resources/auth/auth.js.map +0 -1
  604. package/resources/auth/auth.mjs +0 -12
  605. package/resources/auth/auth.mjs.map +0 -1
  606. package/resources/auth/index.d.mts +0 -3
  607. package/resources/auth/index.d.mts.map +0 -1
  608. package/resources/auth/index.d.ts +0 -3
  609. package/resources/auth/index.d.ts.map +0 -1
  610. package/resources/auth/index.js.map +0 -1
  611. package/resources/auth/index.mjs +0 -4
  612. package/resources/auth/index.mjs.map +0 -1
  613. package/resources/auth/session.d.mts +0 -75
  614. package/resources/auth/session.d.mts.map +0 -1
  615. package/resources/auth/session.d.ts +0 -75
  616. package/resources/auth/session.d.ts.map +0 -1
  617. package/resources/auth/session.js +0 -12
  618. package/resources/auth/session.js.map +0 -1
  619. package/resources/auth/session.mjs +0 -8
  620. package/resources/auth/session.mjs.map +0 -1
  621. package/resources/auth.d.mts +0 -2
  622. package/resources/auth.d.mts.map +0 -1
  623. package/resources/auth.d.ts +0 -2
  624. package/resources/auth.d.ts.map +0 -1
  625. package/resources/auth.js +0 -19
  626. package/resources/auth.js.map +0 -1
  627. package/resources/auth.mjs.map +0 -1
  628. package/resources/mcp/command.d.mts +0 -34
  629. package/resources/mcp/command.d.mts.map +0 -1
  630. package/resources/mcp/command.d.ts +0 -34
  631. package/resources/mcp/command.d.ts.map +0 -1
  632. package/resources/mcp/command.js +0 -12
  633. package/resources/mcp/command.js.map +0 -1
  634. package/resources/mcp/command.mjs +0 -8
  635. package/resources/mcp/command.mjs.map +0 -1
  636. package/resources/org/api-key.d.mts +0 -17
  637. package/resources/org/api-key.d.mts.map +0 -1
  638. package/resources/org/api-key.d.ts +0 -17
  639. package/resources/org/api-key.d.ts.map +0 -1
  640. package/resources/org/api-key.js +0 -15
  641. package/resources/org/api-key.js.map +0 -1
  642. package/resources/org/api-key.mjs +0 -11
  643. package/resources/org/api-key.mjs.map +0 -1
  644. package/resources/org/index.d.mts +0 -4
  645. package/resources/org/index.d.mts.map +0 -1
  646. package/resources/org/index.d.ts +0 -4
  647. package/resources/org/index.d.ts.map +0 -1
  648. package/resources/org/index.js +0 -11
  649. package/resources/org/index.js.map +0 -1
  650. package/resources/org/index.mjs +0 -5
  651. package/resources/org/index.mjs.map +0 -1
  652. package/resources/org/org.d.mts +0 -14
  653. package/resources/org/org.d.mts.map +0 -1
  654. package/resources/org/org.d.ts +0 -14
  655. package/resources/org/org.d.ts.map +0 -1
  656. package/resources/org/org.js +0 -43
  657. package/resources/org/org.js.map +0 -1
  658. package/resources/org/org.mjs +0 -16
  659. package/resources/org/org.mjs.map +0 -1
  660. package/resources/org/project/api-keys.d.mts +0 -109
  661. package/resources/org/project/api-keys.d.mts.map +0 -1
  662. package/resources/org/project/api-keys.d.ts +0 -109
  663. package/resources/org/project/api-keys.d.ts.map +0 -1
  664. package/resources/org/project/api-keys.js +0 -23
  665. package/resources/org/project/api-keys.js.map +0 -1
  666. package/resources/org/project/api-keys.mjs +0 -19
  667. package/resources/org/project/api-keys.mjs.map +0 -1
  668. package/resources/org/project/index.d.mts +0 -5
  669. package/resources/org/project/index.d.mts.map +0 -1
  670. package/resources/org/project/index.d.ts +0 -5
  671. package/resources/org/project/index.d.ts.map +0 -1
  672. package/resources/org/project/index.js +0 -13
  673. package/resources/org/project/index.js.map +0 -1
  674. package/resources/org/project/index.mjs +0 -6
  675. package/resources/org/project/index.mjs.map +0 -1
  676. package/resources/org/project/project.d.mts +0 -90
  677. package/resources/org/project/project.d.mts.map +0 -1
  678. package/resources/org/project/project.d.ts +0 -90
  679. package/resources/org/project/project.d.ts.map +0 -1
  680. package/resources/org/project/project.js +0 -60
  681. package/resources/org/project/project.js.map +0 -1
  682. package/resources/org/project/project.mjs +0 -33
  683. package/resources/org/project/project.mjs.map +0 -1
  684. package/resources/org/project/trigger.d.mts +0 -51
  685. package/resources/org/project/trigger.d.mts.map +0 -1
  686. package/resources/org/project/trigger.d.ts +0 -51
  687. package/resources/org/project/trigger.d.ts.map +0 -1
  688. package/resources/org/project/trigger.js +0 -16
  689. package/resources/org/project/trigger.js.map +0 -1
  690. package/resources/org/project/trigger.mjs +0 -12
  691. package/resources/org/project/trigger.mjs.map +0 -1
  692. package/resources/org/project/webhook.d.mts +0 -92
  693. package/resources/org/project/webhook.d.mts.map +0 -1
  694. package/resources/org/project/webhook.d.ts +0 -92
  695. package/resources/org/project/webhook.d.ts.map +0 -1
  696. package/resources/org/project/webhook.js +0 -24
  697. package/resources/org/project/webhook.js.map +0 -1
  698. package/resources/org/project/webhook.mjs +0 -20
  699. package/resources/org/project/webhook.mjs.map +0 -1
  700. package/resources/org/project.js +0 -19
  701. package/resources/org/project.js.map +0 -1
  702. package/resources/org/project.mjs.map +0 -1
  703. package/resources/org.d.mts +0 -2
  704. package/resources/org.d.mts.map +0 -1
  705. package/resources/org.d.ts +0 -2
  706. package/resources/org.d.ts.map +0 -1
  707. package/resources/org.js +0 -19
  708. package/resources/org.js.map +0 -1
  709. package/resources/org.mjs.map +0 -1
  710. package/resources/team-members.d.mts +0 -57
  711. package/resources/team-members.d.mts.map +0 -1
  712. package/resources/team-members.d.ts +0 -57
  713. package/resources/team-members.d.ts.map +0 -1
  714. package/resources/team-members.js +0 -22
  715. package/resources/team-members.js.map +0 -1
  716. package/resources/team-members.mjs +0 -18
  717. package/resources/team-members.mjs.map +0 -1
  718. package/resources/trigger-instances/handle.d.mts +0 -25
  719. package/resources/trigger-instances/handle.d.mts.map +0 -1
  720. package/resources/trigger-instances/handle.d.ts +0 -25
  721. package/resources/trigger-instances/handle.d.ts.map +0 -1
  722. package/resources/trigger-instances/handle.js +0 -18
  723. package/resources/trigger-instances/handle.js.map +0 -1
  724. package/resources/trigger-instances/handle.mjs +0 -14
  725. package/resources/trigger-instances/handle.mjs.map +0 -1
  726. package/resources/trigger.d.mts +0 -73
  727. package/resources/trigger.d.mts.map +0 -1
  728. package/resources/trigger.d.ts +0 -73
  729. package/resources/trigger.d.ts.map +0 -1
  730. package/resources/trigger.js +0 -12
  731. package/resources/trigger.js.map +0 -1
  732. package/resources/trigger.mjs +0 -8
  733. package/resources/trigger.mjs.map +0 -1
  734. package/src/internal/shim-types.d.ts +0 -28
  735. package/src/internal/shims/crypto.ts +0 -18
  736. package/src/internal/shims/file.ts +0 -32
  737. package/src/internal/shims/getBuiltinModule.ts +0 -66
  738. package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
  739. package/src/resources/action-execution.ts +0 -244
  740. package/src/resources/auth/auth.ts +0 -15
  741. package/src/resources/auth/index.ts +0 -4
  742. package/src/resources/auth/session.ts +0 -127
  743. package/src/resources/mcp/command.ts +0 -47
  744. package/src/resources/org/api-key.ts +0 -30
  745. package/src/resources/org/index.ts +0 -12
  746. package/src/resources/org/org.ts +0 -39
  747. package/src/resources/org/project/api-keys.ts +0 -156
  748. package/src/resources/org/project/index.ts +0 -35
  749. package/src/resources/org/project/project.ts +0 -206
  750. package/src/resources/org/project/trigger.ts +0 -95
  751. package/src/resources/org/project/webhook.ts +0 -131
  752. package/src/resources/team-members.ts +0 -111
  753. package/src/resources/trigger-instances/handle.ts +0 -45
  754. package/src/resources/trigger.ts +0 -108
  755. /package/resources/{org/project.d.mts → project.d.mts} +0 -0
  756. /package/resources/{org/project.d.ts → project.d.ts} +0 -0
  757. /package/resources/{org/project.mjs → project.mjs} +0 -0
  758. /package/src/resources/{org/project.ts → project.ts} +0 -0
@@ -0,0 +1,5034 @@
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.1/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_1a2b3c4d5e6f',
51
+ * );
52
+ * ```
53
+ */
54
+ retrieve(sessionID: string, options?: RequestOptions): APIPromise<SessionRetrieveResponse> {
55
+ return this._client.get(path`/api/v3.1/tool_router/session/${sessionID}`, options);
56
+ }
57
+
58
+ /**
59
+ * Fetch an existing tool router session by ID.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * const response = await client.toolRouter.session.attach(
64
+ * 'trs_1a2b3c4d5e6f',
65
+ * );
66
+ * ```
67
+ */
68
+ attach(
69
+ sessionID: string,
70
+ body: SessionAttachParams | null | undefined = {},
71
+ options?: RequestOptions,
72
+ ): APIPromise<SessionAttachResponse> {
73
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/attach`, { body, ...options });
74
+ }
75
+
76
+ /**
77
+ * Returns the session config history ordered by version DESC (newest first). The
78
+ * live (current) config appears once, on the first page only, with
79
+ * `is_current: true`; archived versions have `is_current: false`.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * const response =
84
+ * await client.toolRouter.session.configHistory(
85
+ * 'trs_1a2b3c4d5e6f',
86
+ * );
87
+ * ```
88
+ */
89
+ configHistory(
90
+ sessionID: string,
91
+ query: SessionConfigHistoryParams | null | undefined = {},
92
+ options?: RequestOptions,
93
+ ): APIPromise<SessionConfigHistoryResponse> {
94
+ return this._client.get(path`/api/v3.1/tool_router/session/${sessionID}/config_history`, {
95
+ query,
96
+ ...options,
97
+ });
98
+ }
99
+
100
+ /**
101
+ * Execute a tool (meta or app) within an existing tool router session.
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * const response = await client.toolRouter.session.execute(
106
+ * 'trs_LX9uJKBinWWr',
107
+ * { tool_slug: 'GITHUB_CREATE_AN_ISSUE' },
108
+ * );
109
+ * ```
110
+ */
111
+ execute(
112
+ sessionID: string,
113
+ body: SessionExecuteParams,
114
+ options?: RequestOptions,
115
+ ): APIPromise<SessionExecuteResponse> {
116
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/execute`, { body, ...options });
117
+ }
118
+
119
+ /**
120
+ * Execute a Composio meta tool (COMPOSIO\_\*) within an existing tool router
121
+ * session.
122
+ *
123
+ * @example
124
+ * ```ts
125
+ * const response =
126
+ * await client.toolRouter.session.executeMeta(
127
+ * 'trs_LX9uJKBinWWr',
128
+ * { slug: 'COMPOSIO_MANAGE_CONNECTIONS' },
129
+ * );
130
+ * ```
131
+ */
132
+ executeMeta(
133
+ sessionID: string,
134
+ body: SessionExecuteMetaParams,
135
+ options?: RequestOptions,
136
+ ): APIPromise<SessionExecuteMetaResponse> {
137
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/execute_meta`, {
138
+ body,
139
+ ...options,
140
+ });
141
+ }
142
+
143
+ /**
144
+ * Initiates an authentication link session for a specific toolkit within a tool
145
+ * router session. Returns a link token and redirect URL that users can use to
146
+ * complete the OAuth flow.
147
+ *
148
+ * @example
149
+ * ```ts
150
+ * const response = await client.toolRouter.session.link(
151
+ * 'trs_LX9uJKBinWWr',
152
+ * { toolkit: 'github' },
153
+ * );
154
+ * ```
155
+ */
156
+ link(
157
+ sessionID: string,
158
+ body: SessionLinkParams,
159
+ options?: RequestOptions,
160
+ ): APIPromise<SessionLinkResponse> {
161
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/link`, { body, ...options });
162
+ }
163
+
164
+ /**
165
+ * Partially updates the configuration of an existing tool router session. Only the
166
+ * fields provided in the request body will be updated. Uses optimistic concurrency
167
+ * control to prevent lost updates. The previous config is stored in config
168
+ * history.
169
+ *
170
+ * @example
171
+ * ```ts
172
+ * const response = await client.toolRouter.session.patch(
173
+ * 'trs_1a2b3c4d5e6f',
174
+ * );
175
+ * ```
176
+ */
177
+ patch(
178
+ sessionID: string,
179
+ body: SessionPatchParams | null | undefined = {},
180
+ options?: RequestOptions,
181
+ ): APIPromise<SessionPatchResponse> {
182
+ return this._client.patch(path`/api/v3.1/tool_router/session/${sessionID}`, { body, ...options });
183
+ }
184
+
185
+ /**
186
+ * Execute any native API call on a toolkit with authentication automatically
187
+ * injected from Composio. This endpoint proxies HTTP requests to third-party APIs
188
+ * using connected account credentials resolved from the session context. Provide
189
+ * the toolkit slug, API endpoint, and HTTP method — Composio handles
190
+ * authentication injection, abstracting away credential management. Supports all
191
+ * HTTP methods, custom headers/query parameters, and binary request/response
192
+ * bodies.
193
+ *
194
+ * @example
195
+ * ```ts
196
+ * const response =
197
+ * await client.toolRouter.session.proxyExecute(
198
+ * 'trs_LX9uJKBinWWr',
199
+ * {
200
+ * endpoint: '/api/v1/resources',
201
+ * method: 'GET',
202
+ * toolkit_slug: 'gmail',
203
+ * },
204
+ * );
205
+ * ```
206
+ */
207
+ proxyExecute(
208
+ sessionID: string,
209
+ body: SessionProxyExecuteParams,
210
+ options?: RequestOptions,
211
+ ): APIPromise<SessionProxyExecuteResponse> {
212
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/proxy_execute`, {
213
+ body,
214
+ ...options,
215
+ });
216
+ }
217
+
218
+ /**
219
+ * Search for tools matching a use case query within an existing tool router
220
+ * session.
221
+ *
222
+ * @example
223
+ * ```ts
224
+ * const response = await client.toolRouter.session.search(
225
+ * 'trs_LX9uJKBinWWr',
226
+ * {
227
+ * queries: [
228
+ * { use_case: 'Send a slack message to a channel' },
229
+ * ],
230
+ * },
231
+ * );
232
+ * ```
233
+ */
234
+ search(
235
+ sessionID: string,
236
+ body: SessionSearchParams,
237
+ options?: RequestOptions,
238
+ ): APIPromise<SessionSearchResponse> {
239
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/search`, { body, ...options });
240
+ }
241
+
242
+ /**
243
+ * Retrieves a cursor-paginated list of toolkits available in the tool router
244
+ * session. Includes toolkit metadata, composio-managed auth schemes, and connected
245
+ * accounts if available. Optionally filter by specific toolkit slugs.
246
+ *
247
+ * @example
248
+ * ```ts
249
+ * const response = await client.toolRouter.session.toolkits(
250
+ * 'trs_1a2b3c4d5e6f',
251
+ * );
252
+ * ```
253
+ */
254
+ toolkits(
255
+ sessionID: string,
256
+ query: SessionToolkitsParams | null | undefined = {},
257
+ options?: RequestOptions,
258
+ ): APIPromise<SessionToolkitsResponse> {
259
+ return this._client.get(path`/api/v3.1/tool_router/session/${sessionID}/toolkits`, { query, ...options });
260
+ }
261
+
262
+ /**
263
+ * Returns tools available in a tool router session with complete schemas. Results
264
+ * are paginated; use `next_cursor` to fetch the next page.
265
+ *
266
+ * @example
267
+ * ```ts
268
+ * const response = await client.toolRouter.session.tools(
269
+ * 'session_id',
270
+ * );
271
+ * ```
272
+ */
273
+ tools(
274
+ sessionID: string,
275
+ query: SessionToolsParams | null | undefined = {},
276
+ options?: RequestOptions,
277
+ ): APIPromise<SessionToolsResponse> {
278
+ return this._client.get(path`/api/v3.1/tool_router/session/${sessionID}/tools`, { query, ...options });
279
+ }
280
+ }
281
+
282
+ export interface SessionCreateResponse {
283
+ /**
284
+ * The configuration used to create this session
285
+ */
286
+ config: SessionCreateResponse.Config;
287
+
288
+ /**
289
+ * Monotonic version of the config. Incremented on each PATCH. Use for optimistic
290
+ * concurrency control.
291
+ */
292
+ config_version: number;
293
+
294
+ mcp: SessionCreateResponse.Mcp;
295
+
296
+ /**
297
+ * The identifier of the session
298
+ */
299
+ session_id: string;
300
+
301
+ /**
302
+ * List of available tools in this session
303
+ */
304
+ tool_router_tools: Array<string>;
305
+
306
+ /**
307
+ * Experimental features including the generated system prompt. Only returned on
308
+ * session creation, not on GET.
309
+ */
310
+ experimental?: SessionCreateResponse.Experimental;
311
+
312
+ /**
313
+ * Advisory list — the session exists and is usable, but the listed issues may
314
+ * warrant attention.
315
+ */
316
+ warnings?: Array<SessionCreateResponse.Warning>;
317
+ }
318
+
319
+ export namespace SessionCreateResponse {
320
+ /**
321
+ * The configuration used to create this session
322
+ */
323
+ export interface Config {
324
+ /**
325
+ * Execute helper configuration
326
+ */
327
+ execute: Config.Execute;
328
+
329
+ /**
330
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
331
+ * is returned as "all".
332
+ */
333
+ preload: Config.Preload;
334
+
335
+ /**
336
+ * Search helper configuration
337
+ */
338
+ search: Config.Search;
339
+
340
+ /**
341
+ * User identifier for this session
342
+ */
343
+ user_id: string;
344
+
345
+ /**
346
+ * Auth config overrides per toolkit
347
+ */
348
+ auth_configs?: { [key: string]: string };
349
+
350
+ /**
351
+ * Per-toolkit connected account overrides (array of nano-IDs). Multi-account
352
+ * sessions can pin more than one account per toolkit; otherwise length is 1.
353
+ */
354
+ connected_accounts?: { [key: string]: Array<string> };
355
+
356
+ /**
357
+ * Manage connections configuration
358
+ */
359
+ manage_connections?: Config.ManageConnections;
360
+
361
+ /**
362
+ * Multi-account configuration for this session.
363
+ */
364
+ multi_account?: Config.MultiAccount;
365
+
366
+ /**
367
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
368
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
369
+ * tool must NOT have any of. Both conditions must be satisfied.
370
+ */
371
+ tags?: Config.Tags;
372
+
373
+ /**
374
+ * Toolkit configuration - either enabled list or disabled list
375
+ */
376
+ toolkits?: Config.Enabled | Config.Disabled;
377
+
378
+ /**
379
+ * Tool-level configuration per toolkit
380
+ */
381
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
382
+
383
+ /**
384
+ * Workbench configuration
385
+ */
386
+ workbench?: Config.Workbench;
387
+ }
388
+
389
+ export namespace Config {
390
+ /**
391
+ * Execute helper configuration
392
+ */
393
+ export interface Execute {
394
+ enable_multi_execute?: boolean;
395
+ }
396
+
397
+ /**
398
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
399
+ * is returned as "all".
400
+ */
401
+ export interface Preload {
402
+ /**
403
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
404
+ * app tools allowed by its filters.
405
+ */
406
+ tools: Array<string> | 'all';
407
+ }
408
+
409
+ /**
410
+ * Search helper configuration
411
+ */
412
+ export interface Search {
413
+ enable?: boolean;
414
+ }
415
+
416
+ /**
417
+ * Manage connections configuration
418
+ */
419
+ export interface ManageConnections {
420
+ /**
421
+ * Custom callback URL for connected account auth flows
422
+ */
423
+ callback_url?: string;
424
+
425
+ /**
426
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
427
+ */
428
+ enable_connection_removal?: boolean;
429
+
430
+ /**
431
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
432
+ * Default false. May not work reliably with GPT models.
433
+ */
434
+ enable_wait_for_connections?: boolean;
435
+
436
+ /**
437
+ * Whether to enable the connection manager for automatic connection handling
438
+ */
439
+ enabled?: boolean;
440
+ }
441
+
442
+ /**
443
+ * Multi-account configuration for this session.
444
+ */
445
+ export interface MultiAccount {
446
+ /**
447
+ * When true, enables multi-account mode for this session. When not set, falls back
448
+ * to org/project-level configuration.
449
+ */
450
+ enable?: boolean;
451
+
452
+ /**
453
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
454
+ * multi-account is enabled.
455
+ */
456
+ max_accounts_per_toolkit?: number;
457
+
458
+ /**
459
+ * When true, require explicit account selection when multiple accounts are
460
+ * connected. When false (default), use the first/default account.
461
+ */
462
+ require_explicit_selection?: boolean;
463
+ }
464
+
465
+ /**
466
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
467
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
468
+ * tool must NOT have any of. Both conditions must be satisfied.
469
+ */
470
+ export interface Tags {
471
+ /**
472
+ * Tags that the tool must NOT have any of
473
+ */
474
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
475
+
476
+ /**
477
+ * Tags that the tool must have at least one of
478
+ */
479
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
480
+ }
481
+
482
+ export interface Enabled {
483
+ enabled: Array<string>;
484
+ }
485
+
486
+ export interface Disabled {
487
+ disabled: Array<string>;
488
+ }
489
+
490
+ export interface Enabled {
491
+ enabled: Array<string>;
492
+ }
493
+
494
+ export interface Disabled {
495
+ disabled: Array<string>;
496
+ }
497
+
498
+ export interface Tags {
499
+ tags: Tags.Tags;
500
+ }
501
+
502
+ export namespace Tags {
503
+ export interface Tags {
504
+ /**
505
+ * Tags that the tool must NOT have any of
506
+ */
507
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
508
+
509
+ /**
510
+ * Tags that the tool must have at least one of
511
+ */
512
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
513
+ }
514
+ }
515
+
516
+ /**
517
+ * Workbench configuration
518
+ */
519
+ export interface Workbench {
520
+ /**
521
+ * Character threshold after which tool execution response are saved to a file in
522
+ * workbench. Default is 20k.
523
+ */
524
+ auto_offload_threshold?: number;
525
+
526
+ /**
527
+ * Whether the workbench (code execution sandbox) is enabled. When false,
528
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
529
+ */
530
+ enable?: boolean;
531
+
532
+ /**
533
+ * Whether proxy execution is enabled in the workbench
534
+ */
535
+ proxy_execution_enabled?: boolean;
536
+
537
+ /**
538
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
539
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
540
+ */
541
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
542
+ }
543
+ }
544
+
545
+ export interface Mcp {
546
+ /**
547
+ * The type of the MCP server. Can be http
548
+ */
549
+ type: 'http';
550
+
551
+ /**
552
+ * The URL of the MCP server
553
+ */
554
+ url: string;
555
+ }
556
+
557
+ /**
558
+ * Experimental features including the generated system prompt. Only returned on
559
+ * session creation, not on GET.
560
+ */
561
+ export interface Experimental {
562
+ /**
563
+ * The assistive system prompt for the tool router session
564
+ */
565
+ assistive_prompt?: string;
566
+
567
+ /**
568
+ * User-defined custom toolkits with grouped tools (no-auth)
569
+ */
570
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
571
+
572
+ /**
573
+ * Custom tools — standalone or extending Composio toolkits
574
+ */
575
+ custom_tools?: Array<Experimental.CustomTool>;
576
+ }
577
+
578
+ export namespace Experimental {
579
+ export interface CustomToolkit {
580
+ description: string;
581
+
582
+ name: string;
583
+
584
+ slug: string;
585
+
586
+ tools: Array<CustomToolkit.Tool>;
587
+ }
588
+
589
+ export namespace CustomToolkit {
590
+ export interface Tool {
591
+ description: string;
592
+
593
+ input_schema: { [key: string]: unknown };
594
+
595
+ name: string;
596
+
597
+ /**
598
+ * Original tool slug as provided by the user
599
+ */
600
+ original_slug: string;
601
+
602
+ /**
603
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
604
+ */
605
+ slug: string;
606
+
607
+ output_schema?: { [key: string]: unknown };
608
+ }
609
+ }
610
+
611
+ export interface CustomTool {
612
+ description: string;
613
+
614
+ input_schema: { [key: string]: unknown };
615
+
616
+ name: string;
617
+
618
+ /**
619
+ * Original tool slug as provided by the user
620
+ */
621
+ original_slug: string;
622
+
623
+ /**
624
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
625
+ */
626
+ slug: string;
627
+
628
+ extends_toolkit?: string;
629
+
630
+ output_schema?: { [key: string]: unknown };
631
+ }
632
+ }
633
+
634
+ export interface Warning {
635
+ /**
636
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
637
+ */
638
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
639
+
640
+ /**
641
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
642
+ * end users.
643
+ */
644
+ message: string;
645
+ }
646
+ }
647
+
648
+ export interface SessionRetrieveResponse {
649
+ /**
650
+ * The configuration used to create this session
651
+ */
652
+ config: SessionRetrieveResponse.Config;
653
+
654
+ /**
655
+ * Monotonic version of the config. Incremented on each PATCH. Use for optimistic
656
+ * concurrency control.
657
+ */
658
+ config_version: number;
659
+
660
+ mcp: SessionRetrieveResponse.Mcp;
661
+
662
+ /**
663
+ * The identifier of the session
664
+ */
665
+ session_id: string;
666
+
667
+ /**
668
+ * List of available tools in this session
669
+ */
670
+ tool_router_tools: Array<string>;
671
+
672
+ /**
673
+ * Experimental features
674
+ */
675
+ experimental?: SessionRetrieveResponse.Experimental;
676
+
677
+ /**
678
+ * Advisory list — the session exists and is usable, but the listed issues may
679
+ * warrant attention.
680
+ */
681
+ warnings?: Array<SessionRetrieveResponse.Warning>;
682
+ }
683
+
684
+ export namespace SessionRetrieveResponse {
685
+ /**
686
+ * The configuration used to create this session
687
+ */
688
+ export interface Config {
689
+ /**
690
+ * Execute helper configuration
691
+ */
692
+ execute: Config.Execute;
693
+
694
+ /**
695
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
696
+ * is returned as "all".
697
+ */
698
+ preload: Config.Preload;
699
+
700
+ /**
701
+ * Search helper configuration
702
+ */
703
+ search: Config.Search;
704
+
705
+ /**
706
+ * User identifier for this session
707
+ */
708
+ user_id: string;
709
+
710
+ /**
711
+ * Auth config overrides per toolkit
712
+ */
713
+ auth_configs?: { [key: string]: string };
714
+
715
+ /**
716
+ * Per-toolkit connected account overrides (array of nano-IDs). Multi-account
717
+ * sessions can pin more than one account per toolkit; otherwise length is 1.
718
+ */
719
+ connected_accounts?: { [key: string]: Array<string> };
720
+
721
+ /**
722
+ * Manage connections configuration
723
+ */
724
+ manage_connections?: Config.ManageConnections;
725
+
726
+ /**
727
+ * Multi-account configuration for this session.
728
+ */
729
+ multi_account?: Config.MultiAccount;
730
+
731
+ /**
732
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
733
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
734
+ * tool must NOT have any of. Both conditions must be satisfied.
735
+ */
736
+ tags?: Config.Tags;
737
+
738
+ /**
739
+ * Toolkit configuration - either enabled list or disabled list
740
+ */
741
+ toolkits?: Config.Enabled | Config.Disabled;
742
+
743
+ /**
744
+ * Tool-level configuration per toolkit
745
+ */
746
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
747
+
748
+ /**
749
+ * Workbench configuration
750
+ */
751
+ workbench?: Config.Workbench;
752
+ }
753
+
754
+ export namespace Config {
755
+ /**
756
+ * Execute helper configuration
757
+ */
758
+ export interface Execute {
759
+ enable_multi_execute?: boolean;
760
+ }
761
+
762
+ /**
763
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
764
+ * is returned as "all".
765
+ */
766
+ export interface Preload {
767
+ /**
768
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
769
+ * app tools allowed by its filters.
770
+ */
771
+ tools: Array<string> | 'all';
772
+ }
773
+
774
+ /**
775
+ * Search helper configuration
776
+ */
777
+ export interface Search {
778
+ enable?: boolean;
779
+ }
780
+
781
+ /**
782
+ * Manage connections configuration
783
+ */
784
+ export interface ManageConnections {
785
+ /**
786
+ * Custom callback URL for connected account auth flows
787
+ */
788
+ callback_url?: string;
789
+
790
+ /**
791
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
792
+ */
793
+ enable_connection_removal?: boolean;
794
+
795
+ /**
796
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
797
+ * Default false. May not work reliably with GPT models.
798
+ */
799
+ enable_wait_for_connections?: boolean;
800
+
801
+ /**
802
+ * Whether to enable the connection manager for automatic connection handling
803
+ */
804
+ enabled?: boolean;
805
+ }
806
+
807
+ /**
808
+ * Multi-account configuration for this session.
809
+ */
810
+ export interface MultiAccount {
811
+ /**
812
+ * When true, enables multi-account mode for this session. When not set, falls back
813
+ * to org/project-level configuration.
814
+ */
815
+ enable?: boolean;
816
+
817
+ /**
818
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
819
+ * multi-account is enabled.
820
+ */
821
+ max_accounts_per_toolkit?: number;
822
+
823
+ /**
824
+ * When true, require explicit account selection when multiple accounts are
825
+ * connected. When false (default), use the first/default account.
826
+ */
827
+ require_explicit_selection?: boolean;
828
+ }
829
+
830
+ /**
831
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
832
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
833
+ * tool must NOT have any of. Both conditions must be satisfied.
834
+ */
835
+ export interface Tags {
836
+ /**
837
+ * Tags that the tool must NOT have any of
838
+ */
839
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
840
+
841
+ /**
842
+ * Tags that the tool must have at least one of
843
+ */
844
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
845
+ }
846
+
847
+ export interface Enabled {
848
+ enabled: Array<string>;
849
+ }
850
+
851
+ export interface Disabled {
852
+ disabled: Array<string>;
853
+ }
854
+
855
+ export interface Enabled {
856
+ enabled: Array<string>;
857
+ }
858
+
859
+ export interface Disabled {
860
+ disabled: Array<string>;
861
+ }
862
+
863
+ export interface Tags {
864
+ tags: Tags.Tags;
865
+ }
866
+
867
+ export namespace Tags {
868
+ export interface Tags {
869
+ /**
870
+ * Tags that the tool must NOT have any of
871
+ */
872
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
873
+
874
+ /**
875
+ * Tags that the tool must have at least one of
876
+ */
877
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
878
+ }
879
+ }
880
+
881
+ /**
882
+ * Workbench configuration
883
+ */
884
+ export interface Workbench {
885
+ /**
886
+ * Character threshold after which tool execution response are saved to a file in
887
+ * workbench. Default is 20k.
888
+ */
889
+ auto_offload_threshold?: number;
890
+
891
+ /**
892
+ * Whether the workbench (code execution sandbox) is enabled. When false,
893
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
894
+ */
895
+ enable?: boolean;
896
+
897
+ /**
898
+ * Whether proxy execution is enabled in the workbench
899
+ */
900
+ proxy_execution_enabled?: boolean;
901
+
902
+ /**
903
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
904
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
905
+ */
906
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
907
+ }
908
+ }
909
+
910
+ export interface Mcp {
911
+ /**
912
+ * The type of the MCP server. Can be http
913
+ */
914
+ type: 'http';
915
+
916
+ /**
917
+ * The URL of the MCP server
918
+ */
919
+ url: string;
920
+ }
921
+
922
+ /**
923
+ * Experimental features
924
+ */
925
+ export interface Experimental {
926
+ /**
927
+ * The assistive system prompt for the tool router session
928
+ */
929
+ assistive_prompt?: string;
930
+
931
+ /**
932
+ * User-defined custom toolkits with grouped tools (no-auth)
933
+ */
934
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
935
+
936
+ /**
937
+ * Custom tools — standalone or extending Composio toolkits
938
+ */
939
+ custom_tools?: Array<Experimental.CustomTool>;
940
+ }
941
+
942
+ export namespace Experimental {
943
+ export interface CustomToolkit {
944
+ description: string;
945
+
946
+ name: string;
947
+
948
+ slug: string;
949
+
950
+ tools: Array<CustomToolkit.Tool>;
951
+ }
952
+
953
+ export namespace CustomToolkit {
954
+ export interface Tool {
955
+ description: string;
956
+
957
+ input_schema: { [key: string]: unknown };
958
+
959
+ name: string;
960
+
961
+ /**
962
+ * Original tool slug as provided by the user
963
+ */
964
+ original_slug: string;
965
+
966
+ /**
967
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
968
+ */
969
+ slug: string;
970
+
971
+ output_schema?: { [key: string]: unknown };
972
+ }
973
+ }
974
+
975
+ export interface CustomTool {
976
+ description: string;
977
+
978
+ input_schema: { [key: string]: unknown };
979
+
980
+ name: string;
981
+
982
+ /**
983
+ * Original tool slug as provided by the user
984
+ */
985
+ original_slug: string;
986
+
987
+ /**
988
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
989
+ */
990
+ slug: string;
991
+
992
+ extends_toolkit?: string;
993
+
994
+ output_schema?: { [key: string]: unknown };
995
+ }
996
+ }
997
+
998
+ export interface Warning {
999
+ /**
1000
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
1001
+ */
1002
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
1003
+
1004
+ /**
1005
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
1006
+ * end users.
1007
+ */
1008
+ message: string;
1009
+ }
1010
+ }
1011
+
1012
+ export interface SessionAttachResponse {
1013
+ /**
1014
+ * The configuration used to create this session
1015
+ */
1016
+ config: SessionAttachResponse.Config;
1017
+
1018
+ /**
1019
+ * Monotonic version of the config. Incremented on each PATCH. Use for optimistic
1020
+ * concurrency control.
1021
+ */
1022
+ config_version: number;
1023
+
1024
+ mcp: SessionAttachResponse.Mcp;
1025
+
1026
+ /**
1027
+ * The identifier of the session
1028
+ */
1029
+ session_id: string;
1030
+
1031
+ /**
1032
+ * List of available tools in this session
1033
+ */
1034
+ tool_router_tools: Array<string>;
1035
+
1036
+ /**
1037
+ * Experimental features
1038
+ */
1039
+ experimental?: SessionAttachResponse.Experimental;
1040
+
1041
+ /**
1042
+ * Advisory list — the session exists and is usable, but the listed issues may
1043
+ * warrant attention.
1044
+ */
1045
+ warnings?: Array<SessionAttachResponse.Warning>;
1046
+ }
1047
+
1048
+ export namespace SessionAttachResponse {
1049
+ /**
1050
+ * The configuration used to create this session
1051
+ */
1052
+ export interface Config {
1053
+ /**
1054
+ * Execute helper configuration
1055
+ */
1056
+ execute: Config.Execute;
1057
+
1058
+ /**
1059
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1060
+ * is returned as "all".
1061
+ */
1062
+ preload: Config.Preload;
1063
+
1064
+ /**
1065
+ * Search helper configuration
1066
+ */
1067
+ search: Config.Search;
1068
+
1069
+ /**
1070
+ * User identifier for this session
1071
+ */
1072
+ user_id: string;
1073
+
1074
+ /**
1075
+ * Auth config overrides per toolkit
1076
+ */
1077
+ auth_configs?: { [key: string]: string };
1078
+
1079
+ /**
1080
+ * Per-toolkit connected account overrides (array of nano-IDs). Multi-account
1081
+ * sessions can pin more than one account per toolkit; otherwise length is 1.
1082
+ */
1083
+ connected_accounts?: { [key: string]: Array<string> };
1084
+
1085
+ /**
1086
+ * Manage connections configuration
1087
+ */
1088
+ manage_connections?: Config.ManageConnections;
1089
+
1090
+ /**
1091
+ * Multi-account configuration for this session.
1092
+ */
1093
+ multi_account?: Config.MultiAccount;
1094
+
1095
+ /**
1096
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1097
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1098
+ * tool must NOT have any of. Both conditions must be satisfied.
1099
+ */
1100
+ tags?: Config.Tags;
1101
+
1102
+ /**
1103
+ * Toolkit configuration - either enabled list or disabled list
1104
+ */
1105
+ toolkits?: Config.Enabled | Config.Disabled;
1106
+
1107
+ /**
1108
+ * Tool-level configuration per toolkit
1109
+ */
1110
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
1111
+
1112
+ /**
1113
+ * Workbench configuration
1114
+ */
1115
+ workbench?: Config.Workbench;
1116
+ }
1117
+
1118
+ export namespace Config {
1119
+ /**
1120
+ * Execute helper configuration
1121
+ */
1122
+ export interface Execute {
1123
+ enable_multi_execute?: boolean;
1124
+ }
1125
+
1126
+ /**
1127
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1128
+ * is returned as "all".
1129
+ */
1130
+ export interface Preload {
1131
+ /**
1132
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
1133
+ * app tools allowed by its filters.
1134
+ */
1135
+ tools: Array<string> | 'all';
1136
+ }
1137
+
1138
+ /**
1139
+ * Search helper configuration
1140
+ */
1141
+ export interface Search {
1142
+ enable?: boolean;
1143
+ }
1144
+
1145
+ /**
1146
+ * Manage connections configuration
1147
+ */
1148
+ export interface ManageConnections {
1149
+ /**
1150
+ * Custom callback URL for connected account auth flows
1151
+ */
1152
+ callback_url?: string;
1153
+
1154
+ /**
1155
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
1156
+ */
1157
+ enable_connection_removal?: boolean;
1158
+
1159
+ /**
1160
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
1161
+ * Default false. May not work reliably with GPT models.
1162
+ */
1163
+ enable_wait_for_connections?: boolean;
1164
+
1165
+ /**
1166
+ * Whether to enable the connection manager for automatic connection handling
1167
+ */
1168
+ enabled?: boolean;
1169
+ }
1170
+
1171
+ /**
1172
+ * Multi-account configuration for this session.
1173
+ */
1174
+ export interface MultiAccount {
1175
+ /**
1176
+ * When true, enables multi-account mode for this session. When not set, falls back
1177
+ * to org/project-level configuration.
1178
+ */
1179
+ enable?: boolean;
1180
+
1181
+ /**
1182
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
1183
+ * multi-account is enabled.
1184
+ */
1185
+ max_accounts_per_toolkit?: number;
1186
+
1187
+ /**
1188
+ * When true, require explicit account selection when multiple accounts are
1189
+ * connected. When false (default), use the first/default account.
1190
+ */
1191
+ require_explicit_selection?: boolean;
1192
+ }
1193
+
1194
+ /**
1195
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1196
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1197
+ * tool must NOT have any of. Both conditions must be satisfied.
1198
+ */
1199
+ export interface Tags {
1200
+ /**
1201
+ * Tags that the tool must NOT have any of
1202
+ */
1203
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1204
+
1205
+ /**
1206
+ * Tags that the tool must have at least one of
1207
+ */
1208
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1209
+ }
1210
+
1211
+ export interface Enabled {
1212
+ enabled: Array<string>;
1213
+ }
1214
+
1215
+ export interface Disabled {
1216
+ disabled: Array<string>;
1217
+ }
1218
+
1219
+ export interface Enabled {
1220
+ enabled: Array<string>;
1221
+ }
1222
+
1223
+ export interface Disabled {
1224
+ disabled: Array<string>;
1225
+ }
1226
+
1227
+ export interface Tags {
1228
+ tags: Tags.Tags;
1229
+ }
1230
+
1231
+ export namespace Tags {
1232
+ export interface Tags {
1233
+ /**
1234
+ * Tags that the tool must NOT have any of
1235
+ */
1236
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1237
+
1238
+ /**
1239
+ * Tags that the tool must have at least one of
1240
+ */
1241
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1242
+ }
1243
+ }
1244
+
1245
+ /**
1246
+ * Workbench configuration
1247
+ */
1248
+ export interface Workbench {
1249
+ /**
1250
+ * Character threshold after which tool execution response are saved to a file in
1251
+ * workbench. Default is 20k.
1252
+ */
1253
+ auto_offload_threshold?: number;
1254
+
1255
+ /**
1256
+ * Whether the workbench (code execution sandbox) is enabled. When false,
1257
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
1258
+ */
1259
+ enable?: boolean;
1260
+
1261
+ /**
1262
+ * Whether proxy execution is enabled in the workbench
1263
+ */
1264
+ proxy_execution_enabled?: boolean;
1265
+
1266
+ /**
1267
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
1268
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
1269
+ */
1270
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
1271
+ }
1272
+ }
1273
+
1274
+ export interface Mcp {
1275
+ /**
1276
+ * The type of the MCP server. Can be http
1277
+ */
1278
+ type: 'http';
1279
+
1280
+ /**
1281
+ * The URL of the MCP server
1282
+ */
1283
+ url: string;
1284
+ }
1285
+
1286
+ /**
1287
+ * Experimental features
1288
+ */
1289
+ export interface Experimental {
1290
+ /**
1291
+ * The assistive system prompt for the tool router session
1292
+ */
1293
+ assistive_prompt?: string;
1294
+
1295
+ /**
1296
+ * User-defined custom toolkits with grouped tools (no-auth)
1297
+ */
1298
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
1299
+
1300
+ /**
1301
+ * Custom tools — standalone or extending Composio toolkits
1302
+ */
1303
+ custom_tools?: Array<Experimental.CustomTool>;
1304
+ }
1305
+
1306
+ export namespace Experimental {
1307
+ export interface CustomToolkit {
1308
+ description: string;
1309
+
1310
+ name: string;
1311
+
1312
+ slug: string;
1313
+
1314
+ tools: Array<CustomToolkit.Tool>;
1315
+ }
1316
+
1317
+ export namespace CustomToolkit {
1318
+ export interface Tool {
1319
+ description: string;
1320
+
1321
+ input_schema: { [key: string]: unknown };
1322
+
1323
+ name: string;
1324
+
1325
+ /**
1326
+ * Original tool slug as provided by the user
1327
+ */
1328
+ original_slug: string;
1329
+
1330
+ /**
1331
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
1332
+ */
1333
+ slug: string;
1334
+
1335
+ output_schema?: { [key: string]: unknown };
1336
+ }
1337
+ }
1338
+
1339
+ export interface CustomTool {
1340
+ description: string;
1341
+
1342
+ input_schema: { [key: string]: unknown };
1343
+
1344
+ name: string;
1345
+
1346
+ /**
1347
+ * Original tool slug as provided by the user
1348
+ */
1349
+ original_slug: string;
1350
+
1351
+ /**
1352
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
1353
+ */
1354
+ slug: string;
1355
+
1356
+ extends_toolkit?: string;
1357
+
1358
+ output_schema?: { [key: string]: unknown };
1359
+ }
1360
+ }
1361
+
1362
+ export interface Warning {
1363
+ /**
1364
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
1365
+ */
1366
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
1367
+
1368
+ /**
1369
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
1370
+ * end users.
1371
+ */
1372
+ message: string;
1373
+ }
1374
+ }
1375
+
1376
+ export interface SessionConfigHistoryResponse {
1377
+ current_page: number;
1378
+
1379
+ items: Array<SessionConfigHistoryResponse.Item>;
1380
+
1381
+ total_items: number;
1382
+
1383
+ total_pages: number;
1384
+
1385
+ next_cursor?: string | null;
1386
+ }
1387
+
1388
+ export namespace SessionConfigHistoryResponse {
1389
+ export interface Item {
1390
+ /**
1391
+ * The session configuration at this version
1392
+ */
1393
+ config: Item.Config;
1394
+
1395
+ /**
1396
+ * ISO timestamp. For history rows, when the entry was archived (i.e. the moment
1397
+ * the version was superseded by a PATCH).
1398
+ */
1399
+ created_at: string;
1400
+
1401
+ /**
1402
+ * True only for the live (current) session config, present on the first page.
1403
+ * False for archived history rows.
1404
+ */
1405
+ is_current: boolean;
1406
+
1407
+ /**
1408
+ * The config version this entry represents
1409
+ */
1410
+ version: number;
1411
+ }
1412
+
1413
+ export namespace Item {
1414
+ /**
1415
+ * The session configuration at this version
1416
+ */
1417
+ export interface Config {
1418
+ /**
1419
+ * Execute helper configuration
1420
+ */
1421
+ execute: Config.Execute;
1422
+
1423
+ /**
1424
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1425
+ * is returned as "all".
1426
+ */
1427
+ preload: Config.Preload;
1428
+
1429
+ /**
1430
+ * Search helper configuration
1431
+ */
1432
+ search: Config.Search;
1433
+
1434
+ /**
1435
+ * User identifier for this session
1436
+ */
1437
+ user_id: string;
1438
+
1439
+ /**
1440
+ * Auth config overrides per toolkit
1441
+ */
1442
+ auth_configs?: { [key: string]: string };
1443
+
1444
+ /**
1445
+ * Per-toolkit connected account overrides (array of nano-IDs). Multi-account
1446
+ * sessions can pin more than one account per toolkit; otherwise length is 1.
1447
+ */
1448
+ connected_accounts?: { [key: string]: Array<string> };
1449
+
1450
+ /**
1451
+ * Manage connections configuration
1452
+ */
1453
+ manage_connections?: Config.ManageConnections;
1454
+
1455
+ /**
1456
+ * Multi-account configuration for this session.
1457
+ */
1458
+ multi_account?: Config.MultiAccount;
1459
+
1460
+ /**
1461
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1462
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1463
+ * tool must NOT have any of. Both conditions must be satisfied.
1464
+ */
1465
+ tags?: Config.Tags;
1466
+
1467
+ /**
1468
+ * Toolkit configuration - either enabled list or disabled list
1469
+ */
1470
+ toolkits?: Config.Enabled | Config.Disabled;
1471
+
1472
+ /**
1473
+ * Tool-level configuration per toolkit
1474
+ */
1475
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
1476
+
1477
+ /**
1478
+ * Workbench configuration
1479
+ */
1480
+ workbench?: Config.Workbench;
1481
+ }
1482
+
1483
+ export namespace Config {
1484
+ /**
1485
+ * Execute helper configuration
1486
+ */
1487
+ export interface Execute {
1488
+ enable_multi_execute?: boolean;
1489
+ }
1490
+
1491
+ /**
1492
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1493
+ * is returned as "all".
1494
+ */
1495
+ export interface Preload {
1496
+ /**
1497
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
1498
+ * app tools allowed by its filters.
1499
+ */
1500
+ tools: Array<string> | 'all';
1501
+ }
1502
+
1503
+ /**
1504
+ * Search helper configuration
1505
+ */
1506
+ export interface Search {
1507
+ enable?: boolean;
1508
+ }
1509
+
1510
+ /**
1511
+ * Manage connections configuration
1512
+ */
1513
+ export interface ManageConnections {
1514
+ /**
1515
+ * Custom callback URL for connected account auth flows
1516
+ */
1517
+ callback_url?: string;
1518
+
1519
+ /**
1520
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
1521
+ */
1522
+ enable_connection_removal?: boolean;
1523
+
1524
+ /**
1525
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
1526
+ * Default false. May not work reliably with GPT models.
1527
+ */
1528
+ enable_wait_for_connections?: boolean;
1529
+
1530
+ /**
1531
+ * Whether to enable the connection manager for automatic connection handling
1532
+ */
1533
+ enabled?: boolean;
1534
+ }
1535
+
1536
+ /**
1537
+ * Multi-account configuration for this session.
1538
+ */
1539
+ export interface MultiAccount {
1540
+ /**
1541
+ * When true, enables multi-account mode for this session. When not set, falls back
1542
+ * to org/project-level configuration.
1543
+ */
1544
+ enable?: boolean;
1545
+
1546
+ /**
1547
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
1548
+ * multi-account is enabled.
1549
+ */
1550
+ max_accounts_per_toolkit?: number;
1551
+
1552
+ /**
1553
+ * When true, require explicit account selection when multiple accounts are
1554
+ * connected. When false (default), use the first/default account.
1555
+ */
1556
+ require_explicit_selection?: boolean;
1557
+ }
1558
+
1559
+ /**
1560
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1561
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1562
+ * tool must NOT have any of. Both conditions must be satisfied.
1563
+ */
1564
+ export interface Tags {
1565
+ /**
1566
+ * Tags that the tool must NOT have any of
1567
+ */
1568
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1569
+
1570
+ /**
1571
+ * Tags that the tool must have at least one of
1572
+ */
1573
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1574
+ }
1575
+
1576
+ export interface Enabled {
1577
+ enabled: Array<string>;
1578
+ }
1579
+
1580
+ export interface Disabled {
1581
+ disabled: Array<string>;
1582
+ }
1583
+
1584
+ export interface Enabled {
1585
+ enabled: Array<string>;
1586
+ }
1587
+
1588
+ export interface Disabled {
1589
+ disabled: Array<string>;
1590
+ }
1591
+
1592
+ export interface Tags {
1593
+ tags: Tags.Tags;
1594
+ }
1595
+
1596
+ export namespace Tags {
1597
+ export interface Tags {
1598
+ /**
1599
+ * Tags that the tool must NOT have any of
1600
+ */
1601
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1602
+
1603
+ /**
1604
+ * Tags that the tool must have at least one of
1605
+ */
1606
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1607
+ }
1608
+ }
1609
+
1610
+ /**
1611
+ * Workbench configuration
1612
+ */
1613
+ export interface Workbench {
1614
+ /**
1615
+ * Character threshold after which tool execution response are saved to a file in
1616
+ * workbench. Default is 20k.
1617
+ */
1618
+ auto_offload_threshold?: number;
1619
+
1620
+ /**
1621
+ * Whether the workbench (code execution sandbox) is enabled. When false,
1622
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
1623
+ */
1624
+ enable?: boolean;
1625
+
1626
+ /**
1627
+ * Whether proxy execution is enabled in the workbench
1628
+ */
1629
+ proxy_execution_enabled?: boolean;
1630
+
1631
+ /**
1632
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
1633
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
1634
+ */
1635
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
1636
+ }
1637
+ }
1638
+ }
1639
+ }
1640
+
1641
+ export interface SessionExecuteResponse {
1642
+ /**
1643
+ * The data returned by the tool execution
1644
+ */
1645
+ data: { [key: string]: unknown };
1646
+
1647
+ /**
1648
+ * Error message if the execution failed, null otherwise
1649
+ */
1650
+ error: string | null;
1651
+
1652
+ /**
1653
+ * Unique identifier for the execution log
1654
+ */
1655
+ log_id: string;
1656
+ }
1657
+
1658
+ export interface SessionExecuteMetaResponse {
1659
+ /**
1660
+ * The data returned by the tool execution
1661
+ */
1662
+ data: { [key: string]: unknown };
1663
+
1664
+ /**
1665
+ * Error message if the execution failed, null otherwise
1666
+ */
1667
+ error: string | null;
1668
+
1669
+ /**
1670
+ * Unique identifier for the execution log
1671
+ */
1672
+ log_id: string;
1673
+ }
1674
+
1675
+ export interface SessionLinkResponse {
1676
+ /**
1677
+ * PRIVATE (default) is usable only by the owning user_id. SHARED is reachable from
1678
+ * a tool-router session ONLY when explicitly pinned, with at most one SHARED per
1679
+ * toolkit per session.
1680
+ */
1681
+ account_type: 'PRIVATE' | 'SHARED';
1682
+
1683
+ /**
1684
+ * The unique identifier for the connected account
1685
+ */
1686
+ connected_account_id: string;
1687
+
1688
+ /**
1689
+ * Token used to complete the authentication flow
1690
+ */
1691
+ link_token: string;
1692
+
1693
+ /**
1694
+ * The URL where users should be redirected to complete OAuth
1695
+ */
1696
+ redirect_url: string;
1697
+ }
1698
+
1699
+ export interface SessionPatchResponse {
1700
+ /**
1701
+ * The configuration used to create this session
1702
+ */
1703
+ config: SessionPatchResponse.Config;
1704
+
1705
+ /**
1706
+ * Monotonic version of the config. Incremented on each PATCH. Use for optimistic
1707
+ * concurrency control.
1708
+ */
1709
+ config_version: number;
1710
+
1711
+ mcp: SessionPatchResponse.Mcp;
1712
+
1713
+ /**
1714
+ * The identifier of the session
1715
+ */
1716
+ session_id: string;
1717
+
1718
+ /**
1719
+ * List of available tools in this session
1720
+ */
1721
+ tool_router_tools: Array<string>;
1722
+
1723
+ /**
1724
+ * Experimental features
1725
+ */
1726
+ experimental?: SessionPatchResponse.Experimental;
1727
+
1728
+ /**
1729
+ * Advisory list — the session exists and is usable, but the listed issues may
1730
+ * warrant attention.
1731
+ */
1732
+ warnings?: Array<SessionPatchResponse.Warning>;
1733
+ }
1734
+
1735
+ export namespace SessionPatchResponse {
1736
+ /**
1737
+ * The configuration used to create this session
1738
+ */
1739
+ export interface Config {
1740
+ /**
1741
+ * Execute helper configuration
1742
+ */
1743
+ execute: Config.Execute;
1744
+
1745
+ /**
1746
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1747
+ * is returned as "all".
1748
+ */
1749
+ preload: Config.Preload;
1750
+
1751
+ /**
1752
+ * Search helper configuration
1753
+ */
1754
+ search: Config.Search;
1755
+
1756
+ /**
1757
+ * User identifier for this session
1758
+ */
1759
+ user_id: string;
1760
+
1761
+ /**
1762
+ * Auth config overrides per toolkit
1763
+ */
1764
+ auth_configs?: { [key: string]: string };
1765
+
1766
+ /**
1767
+ * Per-toolkit connected account overrides (array of nano-IDs). Multi-account
1768
+ * sessions can pin more than one account per toolkit; otherwise length is 1.
1769
+ */
1770
+ connected_accounts?: { [key: string]: Array<string> };
1771
+
1772
+ /**
1773
+ * Manage connections configuration
1774
+ */
1775
+ manage_connections?: Config.ManageConnections;
1776
+
1777
+ /**
1778
+ * Multi-account configuration for this session.
1779
+ */
1780
+ multi_account?: Config.MultiAccount;
1781
+
1782
+ /**
1783
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1784
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1785
+ * tool must NOT have any of. Both conditions must be satisfied.
1786
+ */
1787
+ tags?: Config.Tags;
1788
+
1789
+ /**
1790
+ * Toolkit configuration - either enabled list or disabled list
1791
+ */
1792
+ toolkits?: Config.Enabled | Config.Disabled;
1793
+
1794
+ /**
1795
+ * Tool-level configuration per toolkit
1796
+ */
1797
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
1798
+
1799
+ /**
1800
+ * Workbench configuration
1801
+ */
1802
+ workbench?: Config.Workbench;
1803
+ }
1804
+
1805
+ export namespace Config {
1806
+ /**
1807
+ * Execute helper configuration
1808
+ */
1809
+ export interface Execute {
1810
+ enable_multi_execute?: boolean;
1811
+ }
1812
+
1813
+ /**
1814
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1815
+ * is returned as "all".
1816
+ */
1817
+ export interface Preload {
1818
+ /**
1819
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
1820
+ * app tools allowed by its filters.
1821
+ */
1822
+ tools: Array<string> | 'all';
1823
+ }
1824
+
1825
+ /**
1826
+ * Search helper configuration
1827
+ */
1828
+ export interface Search {
1829
+ enable?: boolean;
1830
+ }
1831
+
1832
+ /**
1833
+ * Manage connections configuration
1834
+ */
1835
+ export interface ManageConnections {
1836
+ /**
1837
+ * Custom callback URL for connected account auth flows
1838
+ */
1839
+ callback_url?: string;
1840
+
1841
+ /**
1842
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
1843
+ */
1844
+ enable_connection_removal?: boolean;
1845
+
1846
+ /**
1847
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
1848
+ * Default false. May not work reliably with GPT models.
1849
+ */
1850
+ enable_wait_for_connections?: boolean;
1851
+
1852
+ /**
1853
+ * Whether to enable the connection manager for automatic connection handling
1854
+ */
1855
+ enabled?: boolean;
1856
+ }
1857
+
1858
+ /**
1859
+ * Multi-account configuration for this session.
1860
+ */
1861
+ export interface MultiAccount {
1862
+ /**
1863
+ * When true, enables multi-account mode for this session. When not set, falls back
1864
+ * to org/project-level configuration.
1865
+ */
1866
+ enable?: boolean;
1867
+
1868
+ /**
1869
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
1870
+ * multi-account is enabled.
1871
+ */
1872
+ max_accounts_per_toolkit?: number;
1873
+
1874
+ /**
1875
+ * When true, require explicit account selection when multiple accounts are
1876
+ * connected. When false (default), use the first/default account.
1877
+ */
1878
+ require_explicit_selection?: boolean;
1879
+ }
1880
+
1881
+ /**
1882
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1883
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1884
+ * tool must NOT have any of. Both conditions must be satisfied.
1885
+ */
1886
+ export interface Tags {
1887
+ /**
1888
+ * Tags that the tool must NOT have any of
1889
+ */
1890
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1891
+
1892
+ /**
1893
+ * Tags that the tool must have at least one of
1894
+ */
1895
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1896
+ }
1897
+
1898
+ export interface Enabled {
1899
+ enabled: Array<string>;
1900
+ }
1901
+
1902
+ export interface Disabled {
1903
+ disabled: Array<string>;
1904
+ }
1905
+
1906
+ export interface Enabled {
1907
+ enabled: Array<string>;
1908
+ }
1909
+
1910
+ export interface Disabled {
1911
+ disabled: Array<string>;
1912
+ }
1913
+
1914
+ export interface Tags {
1915
+ tags: Tags.Tags;
1916
+ }
1917
+
1918
+ export namespace Tags {
1919
+ export interface Tags {
1920
+ /**
1921
+ * Tags that the tool must NOT have any of
1922
+ */
1923
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1924
+
1925
+ /**
1926
+ * Tags that the tool must have at least one of
1927
+ */
1928
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1929
+ }
1930
+ }
1931
+
1932
+ /**
1933
+ * Workbench configuration
1934
+ */
1935
+ export interface Workbench {
1936
+ /**
1937
+ * Character threshold after which tool execution response are saved to a file in
1938
+ * workbench. Default is 20k.
1939
+ */
1940
+ auto_offload_threshold?: number;
1941
+
1942
+ /**
1943
+ * Whether the workbench (code execution sandbox) is enabled. When false,
1944
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
1945
+ */
1946
+ enable?: boolean;
1947
+
1948
+ /**
1949
+ * Whether proxy execution is enabled in the workbench
1950
+ */
1951
+ proxy_execution_enabled?: boolean;
1952
+
1953
+ /**
1954
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
1955
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
1956
+ */
1957
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
1958
+ }
1959
+ }
1960
+
1961
+ export interface Mcp {
1962
+ /**
1963
+ * The type of the MCP server. Can be http
1964
+ */
1965
+ type: 'http';
1966
+
1967
+ /**
1968
+ * The URL of the MCP server
1969
+ */
1970
+ url: string;
1971
+ }
1972
+
1973
+ /**
1974
+ * Experimental features
1975
+ */
1976
+ export interface Experimental {
1977
+ /**
1978
+ * The assistive system prompt for the tool router session
1979
+ */
1980
+ assistive_prompt?: string;
1981
+
1982
+ /**
1983
+ * User-defined custom toolkits with grouped tools (no-auth)
1984
+ */
1985
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
1986
+
1987
+ /**
1988
+ * Custom tools — standalone or extending Composio toolkits
1989
+ */
1990
+ custom_tools?: Array<Experimental.CustomTool>;
1991
+ }
1992
+
1993
+ export namespace Experimental {
1994
+ export interface CustomToolkit {
1995
+ description: string;
1996
+
1997
+ name: string;
1998
+
1999
+ slug: string;
2000
+
2001
+ tools: Array<CustomToolkit.Tool>;
2002
+ }
2003
+
2004
+ export namespace CustomToolkit {
2005
+ export interface Tool {
2006
+ description: string;
2007
+
2008
+ input_schema: { [key: string]: unknown };
2009
+
2010
+ name: string;
2011
+
2012
+ /**
2013
+ * Original tool slug as provided by the user
2014
+ */
2015
+ original_slug: string;
2016
+
2017
+ /**
2018
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
2019
+ */
2020
+ slug: string;
2021
+
2022
+ output_schema?: { [key: string]: unknown };
2023
+ }
2024
+ }
2025
+
2026
+ export interface CustomTool {
2027
+ description: string;
2028
+
2029
+ input_schema: { [key: string]: unknown };
2030
+
2031
+ name: string;
2032
+
2033
+ /**
2034
+ * Original tool slug as provided by the user
2035
+ */
2036
+ original_slug: string;
2037
+
2038
+ /**
2039
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
2040
+ */
2041
+ slug: string;
2042
+
2043
+ extends_toolkit?: string;
2044
+
2045
+ output_schema?: { [key: string]: unknown };
2046
+ }
2047
+ }
2048
+
2049
+ export interface Warning {
2050
+ /**
2051
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
2052
+ */
2053
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
2054
+
2055
+ /**
2056
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
2057
+ * end users.
2058
+ */
2059
+ message: string;
2060
+ }
2061
+ }
2062
+
2063
+ export interface SessionProxyExecuteResponse {
2064
+ /**
2065
+ * The HTTP status code returned from the proxied API
2066
+ */
2067
+ status: number;
2068
+
2069
+ /**
2070
+ * Binary body response data. Present when the response is a binary file.
2071
+ */
2072
+ binary_data?: SessionProxyExecuteResponse.BinaryData;
2073
+
2074
+ /**
2075
+ * The response data returned from the proxied API
2076
+ */
2077
+ data?: unknown;
2078
+
2079
+ /**
2080
+ * The HTTP headers returned from the proxied API
2081
+ */
2082
+ headers?: { [key: string]: string };
2083
+ }
2084
+
2085
+ export namespace SessionProxyExecuteResponse {
2086
+ /**
2087
+ * Binary body response data. Present when the response is a binary file.
2088
+ */
2089
+ export interface BinaryData {
2090
+ /**
2091
+ * Content-Type of the binary data
2092
+ */
2093
+ content_type: string;
2094
+
2095
+ /**
2096
+ * File size in bytes
2097
+ */
2098
+ size: number;
2099
+
2100
+ /**
2101
+ * URL to download binary content
2102
+ */
2103
+ url: string;
2104
+
2105
+ /**
2106
+ * ISO 8601 timestamp when the URL expires
2107
+ */
2108
+ expires_at?: string;
2109
+ }
2110
+ }
2111
+
2112
+ export interface SessionSearchResponse {
2113
+ /**
2114
+ * Error message if any searches failed, null if all succeeded. Format: "X out of Y
2115
+ * searches failed, reasons: <details>"
2116
+ */
2117
+ error: string | null;
2118
+
2119
+ /**
2120
+ * Combined workflow guidance covering connections, planner, and memory usage. Each
2121
+ * element is a step instruction.
2122
+ */
2123
+ next_steps_guidance: Array<string>;
2124
+
2125
+ /**
2126
+ * Per-query search results with tools, reasoning, and memory. One entry per query
2127
+ * in request order.
2128
+ */
2129
+ results: Array<SessionSearchResponse.Result>;
2130
+
2131
+ /**
2132
+ * Session info for correlating meta tool calls
2133
+ */
2134
+ session: SessionSearchResponse.Session;
2135
+
2136
+ /**
2137
+ * Whether all searches completed successfully. False if any query failed.
2138
+ */
2139
+ success: boolean;
2140
+
2141
+ /**
2142
+ * Time information for the query
2143
+ */
2144
+ time_info: SessionSearchResponse.TimeInfo;
2145
+
2146
+ /**
2147
+ * Deduplicated tool definitions keyed by tool_slug for O(1) lookup. Each tool
2148
+ * appears once even if used in multiple queries.
2149
+ */
2150
+ tool_schemas: { [key: string]: SessionSearchResponse.ToolSchemas };
2151
+
2152
+ /**
2153
+ * Connection status for all toolkits mentioned across all queries, with
2154
+ * descriptions merged in.
2155
+ */
2156
+ toolkit_connection_statuses: Array<SessionSearchResponse.ToolkitConnectionStatus>;
2157
+ }
2158
+
2159
+ export namespace SessionSearchResponse {
2160
+ export interface Result {
2161
+ /**
2162
+ * 1-based index of the query in the request
2163
+ */
2164
+ index: number;
2165
+
2166
+ /**
2167
+ * List of main tool slugs matching the search criteria
2168
+ */
2169
+ primary_tool_slugs: Array<string>;
2170
+
2171
+ /**
2172
+ * List of related tool slugs that might be useful
2173
+ */
2174
+ related_tool_slugs: Array<string>;
2175
+
2176
+ /**
2177
+ * List of unique toolkit slugs used by tools in this query
2178
+ */
2179
+ toolkits: Array<string>;
2180
+
2181
+ /**
2182
+ * The use case that was searched
2183
+ */
2184
+ use_case: string;
2185
+
2186
+ /**
2187
+ * Task difficulty assessment (e.g., "easy - Simple single-tool operation with
2188
+ * known parameters")
2189
+ */
2190
+ difficulty?: string;
2191
+
2192
+ /**
2193
+ * Error message if the search for this query failed, null otherwise. Always
2194
+ * present for failed queries.
2195
+ */
2196
+ error?: string | null;
2197
+
2198
+ /**
2199
+ * Guidance message about the search results, particularly when a cached plan is
2200
+ * available
2201
+ */
2202
+ execution_guidance?: string;
2203
+
2204
+ /**
2205
+ * Common pitfalls and considerations (only present when cached plan is available)
2206
+ */
2207
+ known_pitfalls?: Array<string>;
2208
+
2209
+ /**
2210
+ * Memory data relevant to this query, grouped by app. Only present for non-cached
2211
+ * search results.
2212
+ */
2213
+ memory?: { [key: string]: Array<string> };
2214
+
2215
+ /**
2216
+ * ID of cached plan if available
2217
+ */
2218
+ plan_id?: string;
2219
+
2220
+ /**
2221
+ * Workflow steps from cached plan (only present when cached plan is available)
2222
+ */
2223
+ recommended_plan_steps?: Array<string>;
2224
+
2225
+ /**
2226
+ * Reference Python code snippets for processing tool responses in the workbench
2227
+ * (only present when cached plan is available)
2228
+ */
2229
+ reference_workbench_snippets?: Array<Result.ReferenceWorkbenchSnippet>;
2230
+ }
2231
+
2232
+ export namespace Result {
2233
+ export interface ReferenceWorkbenchSnippet {
2234
+ /**
2235
+ * Python code snippet for the workbench
2236
+ */
2237
+ code: string;
2238
+
2239
+ /**
2240
+ * Description of what the code snippet does
2241
+ */
2242
+ description: string;
2243
+ }
2244
+ }
2245
+
2246
+ /**
2247
+ * Session info for correlating meta tool calls
2248
+ */
2249
+ export interface Session {
2250
+ /**
2251
+ * Session identifier to be passed to subsequent meta tool calls as session_id.
2252
+ */
2253
+ id: string;
2254
+
2255
+ /**
2256
+ * Whether a fresh session id was generated in this call.
2257
+ */
2258
+ generate_id: boolean;
2259
+
2260
+ /**
2261
+ * LLM-facing guidance on how to reuse this session id
2262
+ */
2263
+ instructions: string;
2264
+ }
2265
+
2266
+ /**
2267
+ * Time information for the query
2268
+ */
2269
+ export interface TimeInfo {
2270
+ /**
2271
+ * Current time in ISO format (UTC)
2272
+ */
2273
+ current_time_utc: string;
2274
+
2275
+ /**
2276
+ * Current time as Unix epoch timestamp in seconds
2277
+ */
2278
+ current_time_utc_epoch_seconds: number;
2279
+
2280
+ /**
2281
+ * Important message about time handling and timezone considerations
2282
+ */
2283
+ message: string;
2284
+ }
2285
+
2286
+ export interface ToolSchemas {
2287
+ /**
2288
+ * The slug of the tool
2289
+ */
2290
+ tool_slug: string;
2291
+
2292
+ /**
2293
+ * The slug of the toolkit that provides this tool
2294
+ */
2295
+ toolkit: string;
2296
+
2297
+ /**
2298
+ * Description of the tool
2299
+ */
2300
+ description?: string;
2301
+
2302
+ /**
2303
+ * Whether the full input_schema is included in this response
2304
+ */
2305
+ hasFullSchema?: boolean;
2306
+
2307
+ /**
2308
+ * Input schema for the tool (only present when hasFullSchema is true)
2309
+ */
2310
+ input_schema?: { [key: string]: unknown };
2311
+
2312
+ /**
2313
+ * Output/response schema for the tool. Only included when include_output_schemas
2314
+ * is true.
2315
+ */
2316
+ output_schema?: { [key: string]: unknown };
2317
+
2318
+ /**
2319
+ * Reference to fetch full schema when hasFullSchema is false
2320
+ */
2321
+ schemaRef?: ToolSchemas.SchemaRef;
2322
+ }
2323
+
2324
+ export namespace ToolSchemas {
2325
+ /**
2326
+ * Reference to fetch full schema when hasFullSchema is false
2327
+ */
2328
+ export interface SchemaRef {
2329
+ /**
2330
+ * Arguments to pass to the tool
2331
+ */
2332
+ args: SchemaRef.Args;
2333
+
2334
+ /**
2335
+ * Tool to call
2336
+ */
2337
+ tool: 'COMPOSIO_GET_TOOL_SCHEMAS';
2338
+
2339
+ /**
2340
+ * Instruction message for the LLM
2341
+ */
2342
+ message?: string;
2343
+ }
2344
+
2345
+ export namespace SchemaRef {
2346
+ /**
2347
+ * Arguments to pass to the tool
2348
+ */
2349
+ export interface Args {
2350
+ /**
2351
+ * Tool slugs to fetch schemas for
2352
+ */
2353
+ tool_slugs: Array<string>;
2354
+ }
2355
+ }
2356
+ }
2357
+
2358
+ export interface ToolkitConnectionStatus {
2359
+ /**
2360
+ * Description of what the toolkit does and its capabilities
2361
+ */
2362
+ description: string;
2363
+
2364
+ /**
2365
+ * Whether an active connection exists for this toolkit
2366
+ */
2367
+ has_active_connection: boolean;
2368
+
2369
+ /**
2370
+ * Human-readable message about the connection status and next steps
2371
+ */
2372
+ status_message: string;
2373
+
2374
+ /**
2375
+ * The toolkit slug identifier (e.g., "gmail", "slack")
2376
+ */
2377
+ toolkit: string;
2378
+
2379
+ /**
2380
+ * When "required", the agent must specify which account to use. Present only when
2381
+ * multiple accounts exist.
2382
+ */
2383
+ account_selection?: 'required';
2384
+
2385
+ /**
2386
+ * List of connected accounts for this toolkit. Present when multi-account is
2387
+ * enabled.
2388
+ */
2389
+ accounts?: Array<ToolkitConnectionStatus.Account>;
2390
+
2391
+ /**
2392
+ * Connection details including auth config and connected account IDs. Only present
2393
+ * when has_active_connection is true.
2394
+ */
2395
+ connection_details?: { [key: string]: unknown };
2396
+
2397
+ /**
2398
+ * Information about the currently connected user (email, name, etc.)
2399
+ */
2400
+ current_user_info?: { [key: string]: unknown };
2401
+ }
2402
+
2403
+ export namespace ToolkitConnectionStatus {
2404
+ export interface Account {
2405
+ /**
2406
+ * Unique identifier for this account
2407
+ */
2408
+ id: string;
2409
+
2410
+ /**
2411
+ * ISO 8601 timestamp of when the account was connected
2412
+ */
2413
+ created_at: string;
2414
+
2415
+ /**
2416
+ * Whether this is the default account for the toolkit
2417
+ */
2418
+ is_default: boolean;
2419
+
2420
+ /**
2421
+ * Connection status (e.g., "active")
2422
+ */
2423
+ status: string;
2424
+
2425
+ /**
2426
+ * User-assigned alias for this account
2427
+ */
2428
+ alias?: string;
2429
+
2430
+ /**
2431
+ * Information about the connected user (email, name, etc.)
2432
+ */
2433
+ user_info?: { [key: string]: unknown };
2434
+ }
2435
+ }
2436
+ }
2437
+
2438
+ export interface SessionToolkitsResponse {
2439
+ current_page: number;
2440
+
2441
+ items: Array<SessionToolkitsResponse.Item>;
2442
+
2443
+ total_items: number;
2444
+
2445
+ total_pages: number;
2446
+
2447
+ next_cursor?: string | null;
2448
+ }
2449
+
2450
+ export namespace SessionToolkitsResponse {
2451
+ export interface Item {
2452
+ /**
2453
+ * Available Composio-managed auth schemes
2454
+ */
2455
+ composio_managed_auth_schemes: Array<string>;
2456
+
2457
+ /**
2458
+ * Connected account if available
2459
+ */
2460
+ connected_account: Item.ConnectedAccount | null;
2461
+
2462
+ /**
2463
+ * Whether the toolkit is enabled
2464
+ */
2465
+ enabled: boolean;
2466
+
2467
+ /**
2468
+ * Whether the toolkit is no-auth
2469
+ */
2470
+ is_no_auth: boolean;
2471
+
2472
+ /**
2473
+ * Toolkit metadata
2474
+ */
2475
+ meta: Item.Meta;
2476
+
2477
+ /**
2478
+ * Display name of the toolkit
2479
+ */
2480
+ name: string;
2481
+
2482
+ /**
2483
+ * Unique slug identifier
2484
+ */
2485
+ slug: string;
2486
+ }
2487
+
2488
+ export namespace Item {
2489
+ /**
2490
+ * Connected account if available
2491
+ */
2492
+ export interface ConnectedAccount {
2493
+ /**
2494
+ * Connected account identifier
2495
+ */
2496
+ id: string;
2497
+
2498
+ /**
2499
+ * Auth config details
2500
+ */
2501
+ auth_config: ConnectedAccount.AuthConfig;
2502
+
2503
+ /**
2504
+ * Creation timestamp
2505
+ */
2506
+ created_at: string;
2507
+
2508
+ /**
2509
+ * Connection status
2510
+ */
2511
+ status: string;
2512
+
2513
+ /**
2514
+ * User identifier
2515
+ */
2516
+ user_id: string;
2517
+ }
2518
+
2519
+ export namespace ConnectedAccount {
2520
+ /**
2521
+ * Auth config details
2522
+ */
2523
+ export interface AuthConfig {
2524
+ /**
2525
+ * Auth config identifier
2526
+ */
2527
+ id: string;
2528
+
2529
+ /**
2530
+ * Authentication scheme type
2531
+ */
2532
+ auth_scheme: string;
2533
+
2534
+ /**
2535
+ * Whether this is a Composio-managed auth config
2536
+ */
2537
+ is_composio_managed: boolean;
2538
+ }
2539
+ }
2540
+
2541
+ /**
2542
+ * Toolkit metadata
2543
+ */
2544
+ export interface Meta {
2545
+ /**
2546
+ * Description of the toolkit
2547
+ */
2548
+ description: string;
2549
+
2550
+ /**
2551
+ * URL to the toolkit logo
2552
+ */
2553
+ logo: string;
2554
+ }
2555
+ }
2556
+ }
2557
+
2558
+ export interface SessionToolsResponse {
2559
+ current_page: number;
2560
+
2561
+ items: Array<SessionToolsResponse.Item>;
2562
+
2563
+ total_items: number;
2564
+
2565
+ total_pages: number;
2566
+
2567
+ next_cursor?: string | null;
2568
+ }
2569
+
2570
+ export namespace SessionToolsResponse {
2571
+ export interface Item {
2572
+ /**
2573
+ * List of all available versions for this tool
2574
+ */
2575
+ available_versions: Array<string>;
2576
+
2577
+ deprecated: Item.Deprecated;
2578
+
2579
+ /**
2580
+ * Detailed explanation of the tool's functionality and purpose
2581
+ */
2582
+ description: string;
2583
+
2584
+ /**
2585
+ * Schema definition of required input parameters for the tool
2586
+ */
2587
+ input_parameters: { [key: string]: unknown };
2588
+
2589
+ /**
2590
+ * Indicates if this tool is deprecated and may be removed in the future
2591
+ */
2592
+ is_deprecated: boolean;
2593
+
2594
+ /**
2595
+ * Human-readable display name of the tool
2596
+ */
2597
+ name: string;
2598
+
2599
+ /**
2600
+ * Indicates if the tool can be used without authentication
2601
+ */
2602
+ no_auth: boolean;
2603
+
2604
+ /**
2605
+ * Schema definition of return values from the tool
2606
+ */
2607
+ output_parameters: { [key: string]: unknown };
2608
+
2609
+ /**
2610
+ * Structured scope requirements for the tool. Null means the tool is legacy and
2611
+ * only exposes flat scopes.
2612
+ */
2613
+ scope_requirements: Item.ScopeRequirements | null;
2614
+
2615
+ /**
2616
+ * List of scopes associated with the tool
2617
+ */
2618
+ scopes: Array<string>;
2619
+
2620
+ /**
2621
+ * Unique identifier for the tool
2622
+ */
2623
+ slug: string;
2624
+
2625
+ /**
2626
+ * List of tags associated with the tool for categorization and filtering
2627
+ */
2628
+ tags: Array<string>;
2629
+
2630
+ toolkit: Item.Toolkit;
2631
+
2632
+ /**
2633
+ * Current version of the tool
2634
+ */
2635
+ version: string;
2636
+
2637
+ /**
2638
+ * Human-friendly description of the tool, if available
2639
+ */
2640
+ human_description?: string;
2641
+ }
2642
+
2643
+ export namespace Item {
2644
+ export interface Deprecated {
2645
+ /**
2646
+ * List of all available versions for this tool
2647
+ */
2648
+ available_versions: Array<string>;
2649
+
2650
+ /**
2651
+ * The display name of the tool
2652
+ */
2653
+ displayName: string;
2654
+
2655
+ /**
2656
+ * Indicates if this tool is deprecated and may be removed in the future
2657
+ */
2658
+ is_deprecated: boolean;
2659
+
2660
+ toolkit: Deprecated.Toolkit;
2661
+
2662
+ /**
2663
+ * Current version identifier of the tool
2664
+ */
2665
+ version: string;
2666
+ }
2667
+
2668
+ export namespace Deprecated {
2669
+ export interface Toolkit {
2670
+ /**
2671
+ * URL to the toolkit logo image
2672
+ */
2673
+ logo: string;
2674
+ }
2675
+ }
2676
+
2677
+ /**
2678
+ * Structured scope requirements for the tool. Null means the tool is legacy and
2679
+ * only exposes flat scopes.
2680
+ */
2681
+ export interface ScopeRequirements {
2682
+ all_of: Array<string | ScopeRequirements.AnyOf>;
2683
+ }
2684
+
2685
+ export namespace ScopeRequirements {
2686
+ export interface AnyOf {
2687
+ any_of: Array<string>;
2688
+ }
2689
+ }
2690
+
2691
+ export interface Toolkit {
2692
+ /**
2693
+ * URL to the toolkit logo image
2694
+ */
2695
+ logo: string;
2696
+
2697
+ /**
2698
+ * Human-readable name of the parent toolkit
2699
+ */
2700
+ name: string;
2701
+
2702
+ /**
2703
+ * Unique identifier of the parent toolkit
2704
+ */
2705
+ slug: string;
2706
+ }
2707
+ }
2708
+ }
2709
+
2710
+ export interface SessionCreateParams {
2711
+ /**
2712
+ * The identifier of the user who is initiating the session, ideally a unique
2713
+ * identifier from your database like a user ID or email address
2714
+ */
2715
+ user_id: string;
2716
+
2717
+ /**
2718
+ * The auth configs to use for the session. This will override the default behavior
2719
+ * and use the given auth config when specific toolkits are being executed
2720
+ */
2721
+ auth_configs?: { [key: string]: string };
2722
+
2723
+ /**
2724
+ * The connected accounts to use for the session, as an array of nano-IDs per
2725
+ * toolkit. This overrides the default behaviour and pins specific connected
2726
+ * accounts when toolkits are executed. Each account must exist (not deleted or
2727
+ * disabled) and belong to the same `user_id` as the session. Multi-account
2728
+ * sessions can pin multiple; non-multi-account sessions are capped at length 1.
2729
+ */
2730
+ connected_accounts?: { [key: string]: Array<string> };
2731
+
2732
+ execute?: SessionCreateParams.Execute;
2733
+
2734
+ /**
2735
+ * Experimental features - not stable, may be modified or removed in future
2736
+ * versions.
2737
+ */
2738
+ experimental?: SessionCreateParams.Experimental;
2739
+
2740
+ /**
2741
+ * Configuration for connection management settings
2742
+ */
2743
+ manage_connections?: SessionCreateParams.ManageConnections;
2744
+
2745
+ /**
2746
+ * Configure multi-account behavior. When enabled, users can connect multiple
2747
+ * accounts per toolkit.
2748
+ */
2749
+ multi_account?: SessionCreateParams.MultiAccount;
2750
+
2751
+ /**
2752
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
2753
+ * "all" to dynamically expose every app tool allowed by positive
2754
+ * toolkits/tools/tags filters.
2755
+ */
2756
+ preload?: SessionCreateParams.Preload;
2757
+
2758
+ search?: SessionCreateParams.Search;
2759
+
2760
+ /**
2761
+ * Global MCP tool annotation hints for filtering. Array format is treated as
2762
+ * enabled list. Object format supports both enabled (tool must have at least one)
2763
+ * and disabled (tool must NOT have any) lists. Toolkit-level tags override this.
2764
+ * Toolkit enabled/disabled lists take precedence over tag filtering.
2765
+ */
2766
+ tags?:
2767
+ | Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>
2768
+ | SessionCreateParams.UnionMember1;
2769
+
2770
+ /**
2771
+ * Toolkit configuration - specify either enable toolkits (allowlist) or disable
2772
+ * toolkits (denylist). Mutually exclusive.
2773
+ */
2774
+ toolkits?: SessionCreateParams.Enable | SessionCreateParams.Disable;
2775
+
2776
+ /**
2777
+ * Tool-level configuration per toolkit. Allows you to enable, disable, or filter
2778
+ * by tags for specific tools within each toolkit. Every slug passed in `enable` /
2779
+ * `disable` must be a valid Composio tool slug for that toolkit — invalid or
2780
+ * typo'd slugs fail session creation with a clear error listing which ones didn't
2781
+ * match.
2782
+ */
2783
+ tools?: {
2784
+ [key: string]: SessionCreateParams.Enable | SessionCreateParams.Disable | SessionCreateParams.Tags;
2785
+ };
2786
+
2787
+ /**
2788
+ * Configuration for workbench behavior
2789
+ */
2790
+ workbench?: SessionCreateParams.Workbench;
2791
+ }
2792
+
2793
+ export namespace SessionCreateParams {
2794
+ export interface Execute {
2795
+ enable_multi_execute?: boolean;
2796
+ }
2797
+
2798
+ /**
2799
+ * Experimental features - not stable, may be modified or removed in future
2800
+ * versions.
2801
+ */
2802
+ export interface Experimental {
2803
+ /**
2804
+ * Customize assistive prompt generation (e.g., timezone).
2805
+ */
2806
+ assistive_prompt_config?: Experimental.AssistivePromptConfig;
2807
+
2808
+ /**
2809
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
2810
+ * existing Composio toolkits. All tools are no-auth.
2811
+ */
2812
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
2813
+
2814
+ /**
2815
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
2816
+ * extends_toolkit inherit the Composio toolkit's connection.
2817
+ */
2818
+ custom_tools?: Array<Experimental.CustomTool>;
2819
+
2820
+ /**
2821
+ * Experimental base URL override for connection link redirects created from this
2822
+ * tool-router session. When set, link creation returns
2823
+ * `${link_url_overwrite}/link/{link_token}` instead of the default Composio
2824
+ * Connect base URL. Use only when your integration needs links to open through a
2825
+ * custom Connect host.
2826
+ */
2827
+ link_url_overwrite?: string;
2828
+
2829
+ /**
2830
+ * Per-tool elicitation permission config. Default behavior + per-tool
2831
+ * always_allow/always_deny overrides. Mutation via PATCH.
2832
+ */
2833
+ permissions?: Experimental.Permissions;
2834
+ }
2835
+
2836
+ export namespace Experimental {
2837
+ /**
2838
+ * Customize assistive prompt generation (e.g., timezone).
2839
+ */
2840
+ export interface AssistivePromptConfig {
2841
+ /**
2842
+ * IANA timezone identifier (e.g., 'America/New_York', 'Europe/London'). Used to
2843
+ * customize the system prompt with timezone-aware instructions.
2844
+ */
2845
+ user_timezone?: string;
2846
+ }
2847
+
2848
+ export interface CustomToolkit {
2849
+ /**
2850
+ * Used for BM25 search matching and shown in toolkit connection statuses.
2851
+ */
2852
+ description: string;
2853
+
2854
+ /**
2855
+ * Display name shown to the LLM and in search results.
2856
+ */
2857
+ name: string;
2858
+
2859
+ /**
2860
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
2861
+ * slugs. Alphanumeric, underscores, and hyphens only.
2862
+ */
2863
+ slug: string;
2864
+
2865
+ /**
2866
+ * Tools in this custom toolkit
2867
+ */
2868
+ tools: Array<CustomToolkit.Tool>;
2869
+
2870
+ /**
2871
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
2872
+ * in create/attach responses for inline custom definitions.
2873
+ */
2874
+ preload?: boolean;
2875
+ }
2876
+
2877
+ export namespace CustomToolkit {
2878
+ export interface Tool {
2879
+ /**
2880
+ * Used for BM25 search matching and shown to the LLM.
2881
+ */
2882
+ description: string;
2883
+
2884
+ /**
2885
+ * Must have type: "object" and a properties field.
2886
+ */
2887
+ input_schema: { [key: string]: unknown };
2888
+
2889
+ /**
2890
+ * Human-readable display name
2891
+ */
2892
+ name: string;
2893
+
2894
+ /**
2895
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
2896
+ * chars total).
2897
+ */
2898
+ slug: string;
2899
+
2900
+ /**
2901
+ * Optional output schema for the tool response.
2902
+ */
2903
+ output_schema?: { [key: string]: unknown };
2904
+
2905
+ /**
2906
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
2907
+ * in create/attach responses for inline custom definitions.
2908
+ */
2909
+ preload?: boolean;
2910
+ }
2911
+ }
2912
+
2913
+ export interface CustomTool {
2914
+ /**
2915
+ * Used for BM25 search matching and shown to the LLM.
2916
+ */
2917
+ description: string;
2918
+
2919
+ /**
2920
+ * Must have type: "object" and a properties field.
2921
+ */
2922
+ input_schema: { [key: string]: unknown };
2923
+
2924
+ /**
2925
+ * Human-readable display name
2926
+ */
2927
+ name: string;
2928
+
2929
+ /**
2930
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
2931
+ * (extending). Max 60 chars total.
2932
+ */
2933
+ slug: string;
2934
+
2935
+ /**
2936
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
2937
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
2938
+ */
2939
+ extends_toolkit?: string;
2940
+
2941
+ /**
2942
+ * JSON Schema describing tool output (optional)
2943
+ */
2944
+ output_schema?: { [key: string]: unknown };
2945
+
2946
+ /**
2947
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
2948
+ * in create/attach responses for inline custom definitions.
2949
+ */
2950
+ preload?: boolean;
2951
+ }
2952
+
2953
+ /**
2954
+ * Per-tool elicitation permission config. Default behavior + per-tool
2955
+ * always_allow/always_deny overrides. Mutation via PATCH.
2956
+ */
2957
+ export interface Permissions {
2958
+ /**
2959
+ * Default elicitation behavior when no override matches. `allow_all` runs every
2960
+ * tool without prompting; `ask_every_call` prompts on each invocation;
2961
+ * `ask_once_per_session` prompts once and remembers the answer for the rest of the
2962
+ * session.
2963
+ */
2964
+ default: 'allow_all' | 'ask_every_call' | 'ask_once_per_session';
2965
+
2966
+ /**
2967
+ * Per-tool overrides keyed by `${toolSlug}:${connectedAccountId ?? "__none__"}`,
2968
+ * plus account-wide overrides keyed by `*:${connectedAccountId ?? "__none__"}`.
2969
+ * Exact tool overrides take precedence over account-wide overrides. `always_allow`
2970
+ * skips the prompt and runs the tool; `always_deny` blocks the tool; `ask_once`
2971
+ * prompts once per session (allow/deny) and remembers; `ask_always` prompts on
2972
+ * every call with allow-once/allow-session/deny, ignoring any cached session
2973
+ * allow. Overrides take precedence over `default`.
2974
+ */
2975
+ overrides?: { [key: string]: 'always_allow' | 'always_deny' | 'ask_once' | 'ask_always' };
2976
+ }
2977
+ }
2978
+
2979
+ /**
2980
+ * Configuration for connection management settings
2981
+ */
2982
+ export interface ManageConnections {
2983
+ /**
2984
+ * The URL to redirect to after a user completes authentication for a connected
2985
+ * account. This allows you to handle the auth callback in your own application.
2986
+ */
2987
+ callback_url?: string;
2988
+
2989
+ /**
2990
+ * Whether to enable the connection manager for automatic connection handling. If
2991
+ * true, we will provide a tool your agent can use to initiate connections to
2992
+ * toolkits if it doesnt exist. If set to false, then you have to manage
2993
+ * connections manually.
2994
+ */
2995
+ enable?: boolean | null;
2996
+
2997
+ /**
2998
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS to allow deleting
2999
+ * connected accounts. Default true.
3000
+ */
3001
+ enable_connection_removal?: boolean | null;
3002
+
3003
+ /**
3004
+ * When true, the COMPOSIO_WAIT_FOR_CONNECTIONS tool is available for agents to
3005
+ * poll connection status after sharing auth URLs. Default is false (disabled). May
3006
+ * not work reliably with GPT models.
3007
+ */
3008
+ enable_wait_for_connections?: boolean | null;
3009
+ }
3010
+
3011
+ /**
3012
+ * Configure multi-account behavior. When enabled, users can connect multiple
3013
+ * accounts per toolkit.
3014
+ */
3015
+ export interface MultiAccount {
3016
+ /**
3017
+ * When true, enables multi-account mode for this session. When not set, falls back
3018
+ * to org/project-level configuration.
3019
+ */
3020
+ enable?: boolean;
3021
+
3022
+ /**
3023
+ * Maximum number of connected accounts allowed per toolkit. Must be between 2
3024
+ * and 10.
3025
+ */
3026
+ max_accounts_per_toolkit?: number;
3027
+
3028
+ /**
3029
+ * When true, the agent must explicitly select which account to use. When false
3030
+ * (default), the first/default account is used automatically.
3031
+ */
3032
+ require_explicit_selection?: boolean;
3033
+ }
3034
+
3035
+ /**
3036
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
3037
+ * "all" to dynamically expose every app tool allowed by positive
3038
+ * toolkits/tools/tags filters.
3039
+ */
3040
+ export interface Preload {
3041
+ /**
3042
+ * Explicit tool slugs to preload, or "all" to dynamically expose all current and
3043
+ * future app tools allowed by the positive session filters. "all" is capped at
3044
+ * 1000 tools and is not supported without a positive allowlist.
3045
+ */
3046
+ tools?: Array<string> | string;
3047
+ }
3048
+
3049
+ export interface Search {
3050
+ enable?: boolean;
3051
+ }
3052
+
3053
+ export interface UnionMember1 {
3054
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3055
+
3056
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3057
+ }
3058
+
3059
+ /**
3060
+ * Enable only specific toolkits (allowlist)
3061
+ */
3062
+ export interface Enable {
3063
+ /**
3064
+ * Only these specific toolkits will be enabled
3065
+ */
3066
+ enable: Array<string>;
3067
+ }
3068
+
3069
+ /**
3070
+ * Disable specific toolkits (denylist)
3071
+ */
3072
+ export interface Disable {
3073
+ /**
3074
+ * These specific toolkits will be disabled
3075
+ */
3076
+ disable: Array<string>;
3077
+ }
3078
+
3079
+ export interface Enable {
3080
+ /**
3081
+ * Only these specific tools will be available for this toolkit
3082
+ */
3083
+ enable: Array<string>;
3084
+ }
3085
+
3086
+ export interface Disable {
3087
+ /**
3088
+ * These specific tools will be disabled for this toolkit
3089
+ */
3090
+ disable: Array<string>;
3091
+ }
3092
+
3093
+ export interface Tags {
3094
+ /**
3095
+ * MCP tags to filter tools. Array format is treated as enabled list. Object format
3096
+ * supports both enabled and disabled lists.
3097
+ */
3098
+ tags: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'> | Tags.UnionMember1;
3099
+ }
3100
+
3101
+ export namespace Tags {
3102
+ export interface UnionMember1 {
3103
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3104
+
3105
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3106
+ }
3107
+ }
3108
+
3109
+ /**
3110
+ * Configuration for workbench behavior
3111
+ */
3112
+ export interface Workbench {
3113
+ /**
3114
+ * Character threshold for automatic offloading. When workbench response exceeds
3115
+ * this threshold, it will be automatically offloaded. Default is picked
3116
+ * automatically based on the response size.
3117
+ */
3118
+ auto_offload_threshold?: number;
3119
+
3120
+ /**
3121
+ * Set to false to disable the workbench entirely. When disabled, no code execution
3122
+ * tools are available in the session.
3123
+ */
3124
+ enable?: boolean;
3125
+
3126
+ /**
3127
+ * Whether proxy execution is enabled. When enabled, workbench can call URLs and
3128
+ * APIs directly.
3129
+ */
3130
+ enable_proxy_execution?: boolean;
3131
+
3132
+ /**
3133
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
3134
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
3135
+ */
3136
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
3137
+ }
3138
+ }
3139
+
3140
+ export interface SessionAttachParams {
3141
+ /**
3142
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3143
+ * customs — pass them on every request that needs them.
3144
+ */
3145
+ experimental?: SessionAttachParams.Experimental;
3146
+ }
3147
+
3148
+ export namespace SessionAttachParams {
3149
+ /**
3150
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3151
+ * customs — pass them on every request that needs them.
3152
+ */
3153
+ export interface Experimental {
3154
+ /**
3155
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
3156
+ * existing Composio toolkits. All tools are no-auth.
3157
+ */
3158
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
3159
+
3160
+ /**
3161
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
3162
+ * extends_toolkit inherit the Composio toolkit's connection.
3163
+ */
3164
+ custom_tools?: Array<Experimental.CustomTool>;
3165
+ }
3166
+
3167
+ export namespace Experimental {
3168
+ export interface CustomToolkit {
3169
+ /**
3170
+ * Used for BM25 search matching and shown in toolkit connection statuses.
3171
+ */
3172
+ description: string;
3173
+
3174
+ /**
3175
+ * Display name shown to the LLM and in search results.
3176
+ */
3177
+ name: string;
3178
+
3179
+ /**
3180
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
3181
+ * slugs. Alphanumeric, underscores, and hyphens only.
3182
+ */
3183
+ slug: string;
3184
+
3185
+ /**
3186
+ * Tools in this custom toolkit
3187
+ */
3188
+ tools: Array<CustomToolkit.Tool>;
3189
+
3190
+ /**
3191
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3192
+ * in create/attach responses for inline custom definitions.
3193
+ */
3194
+ preload?: boolean;
3195
+ }
3196
+
3197
+ export namespace CustomToolkit {
3198
+ export interface Tool {
3199
+ /**
3200
+ * Used for BM25 search matching and shown to the LLM.
3201
+ */
3202
+ description: string;
3203
+
3204
+ /**
3205
+ * Must have type: "object" and a properties field.
3206
+ */
3207
+ input_schema: { [key: string]: unknown };
3208
+
3209
+ /**
3210
+ * Human-readable display name
3211
+ */
3212
+ name: string;
3213
+
3214
+ /**
3215
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
3216
+ * chars total).
3217
+ */
3218
+ slug: string;
3219
+
3220
+ /**
3221
+ * Optional output schema for the tool response.
3222
+ */
3223
+ output_schema?: { [key: string]: unknown };
3224
+
3225
+ /**
3226
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3227
+ * in create/attach responses for inline custom definitions.
3228
+ */
3229
+ preload?: boolean;
3230
+ }
3231
+ }
3232
+
3233
+ export interface CustomTool {
3234
+ /**
3235
+ * Used for BM25 search matching and shown to the LLM.
3236
+ */
3237
+ description: string;
3238
+
3239
+ /**
3240
+ * Must have type: "object" and a properties field.
3241
+ */
3242
+ input_schema: { [key: string]: unknown };
3243
+
3244
+ /**
3245
+ * Human-readable display name
3246
+ */
3247
+ name: string;
3248
+
3249
+ /**
3250
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
3251
+ * (extending). Max 60 chars total.
3252
+ */
3253
+ slug: string;
3254
+
3255
+ /**
3256
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
3257
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
3258
+ */
3259
+ extends_toolkit?: string;
3260
+
3261
+ /**
3262
+ * JSON Schema describing tool output (optional)
3263
+ */
3264
+ output_schema?: { [key: string]: unknown };
3265
+
3266
+ /**
3267
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3268
+ * in create/attach responses for inline custom definitions.
3269
+ */
3270
+ preload?: boolean;
3271
+ }
3272
+ }
3273
+ }
3274
+
3275
+ export interface SessionConfigHistoryParams {
3276
+ /**
3277
+ * Cursor for pagination. The cursor is a base64 encoded string of the page and
3278
+ * limit. The page is the page number and the limit is the number of items per
3279
+ * page. The cursor is used to paginate through the items. The cursor is not
3280
+ * required for the first page.
3281
+ */
3282
+ cursor?: string;
3283
+
3284
+ /**
3285
+ * Number of items per page, max allowed is 100
3286
+ */
3287
+ limit?: number;
3288
+ }
3289
+
3290
+ export interface SessionExecuteParams {
3291
+ /**
3292
+ * The unique slug identifier of the tool to execute. Supports both meta tools and
3293
+ * app tools exposed by the session.
3294
+ */
3295
+ tool_slug: string;
3296
+
3297
+ /**
3298
+ * Account identifier to specify which connected account to use for direct tool
3299
+ * execution. Use the account ID (e.g. "coup_hurricane_dal_analytical") or an
3300
+ * alias. When omitted with a single account, the default is used. When omitted
3301
+ * with multiple accounts, an error lists available accounts. Meta/helper tools
3302
+ * either ignore this top-level field or define their own account-selection fields,
3303
+ * for example COMPOSIO_MULTI_EXECUTE_TOOL.tools[].account.
3304
+ */
3305
+ account?: string;
3306
+
3307
+ /**
3308
+ * The arguments required by the tool
3309
+ */
3310
+ arguments?: { [key: string]: unknown };
3311
+
3312
+ /**
3313
+ * When true, direct non-meta tool execution may return a workbench offload preview
3314
+ * if the response exceeds the configured threshold and the session workbench is
3315
+ * enabled. When omitted or false, direct tool execution returns the normal inline
3316
+ * response. Meta/helper tools are unaffected, and COMPOSIO_MULTI_EXECUTE_TOOL uses
3317
+ * session.workbench configuration for its own batch-level offload behavior.
3318
+ */
3319
+ enable_auto_workbench_offload?: boolean;
3320
+
3321
+ /**
3322
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3323
+ * customs — pass them on every request that needs them.
3324
+ */
3325
+ experimental?: SessionExecuteParams.Experimental;
3326
+ }
3327
+
3328
+ export namespace SessionExecuteParams {
3329
+ /**
3330
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3331
+ * customs — pass them on every request that needs them.
3332
+ */
3333
+ export interface Experimental {
3334
+ /**
3335
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
3336
+ * existing Composio toolkits. All tools are no-auth.
3337
+ */
3338
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
3339
+
3340
+ /**
3341
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
3342
+ * extends_toolkit inherit the Composio toolkit's connection.
3343
+ */
3344
+ custom_tools?: Array<Experimental.CustomTool>;
3345
+ }
3346
+
3347
+ export namespace Experimental {
3348
+ export interface CustomToolkit {
3349
+ /**
3350
+ * Used for BM25 search matching and shown in toolkit connection statuses.
3351
+ */
3352
+ description: string;
3353
+
3354
+ /**
3355
+ * Display name shown to the LLM and in search results.
3356
+ */
3357
+ name: string;
3358
+
3359
+ /**
3360
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
3361
+ * slugs. Alphanumeric, underscores, and hyphens only.
3362
+ */
3363
+ slug: string;
3364
+
3365
+ /**
3366
+ * Tools in this custom toolkit
3367
+ */
3368
+ tools: Array<CustomToolkit.Tool>;
3369
+
3370
+ /**
3371
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3372
+ * in create/attach responses for inline custom definitions.
3373
+ */
3374
+ preload?: boolean;
3375
+ }
3376
+
3377
+ export namespace CustomToolkit {
3378
+ export interface Tool {
3379
+ /**
3380
+ * Used for BM25 search matching and shown to the LLM.
3381
+ */
3382
+ description: string;
3383
+
3384
+ /**
3385
+ * Must have type: "object" and a properties field.
3386
+ */
3387
+ input_schema: { [key: string]: unknown };
3388
+
3389
+ /**
3390
+ * Human-readable display name
3391
+ */
3392
+ name: string;
3393
+
3394
+ /**
3395
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
3396
+ * chars total).
3397
+ */
3398
+ slug: string;
3399
+
3400
+ /**
3401
+ * Optional output schema for the tool response.
3402
+ */
3403
+ output_schema?: { [key: string]: unknown };
3404
+
3405
+ /**
3406
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3407
+ * in create/attach responses for inline custom definitions.
3408
+ */
3409
+ preload?: boolean;
3410
+ }
3411
+ }
3412
+
3413
+ export interface CustomTool {
3414
+ /**
3415
+ * Used for BM25 search matching and shown to the LLM.
3416
+ */
3417
+ description: string;
3418
+
3419
+ /**
3420
+ * Must have type: "object" and a properties field.
3421
+ */
3422
+ input_schema: { [key: string]: unknown };
3423
+
3424
+ /**
3425
+ * Human-readable display name
3426
+ */
3427
+ name: string;
3428
+
3429
+ /**
3430
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
3431
+ * (extending). Max 60 chars total.
3432
+ */
3433
+ slug: string;
3434
+
3435
+ /**
3436
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
3437
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
3438
+ */
3439
+ extends_toolkit?: string;
3440
+
3441
+ /**
3442
+ * JSON Schema describing tool output (optional)
3443
+ */
3444
+ output_schema?: { [key: string]: unknown };
3445
+
3446
+ /**
3447
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3448
+ * in create/attach responses for inline custom definitions.
3449
+ */
3450
+ preload?: boolean;
3451
+ }
3452
+ }
3453
+ }
3454
+
3455
+ export interface SessionExecuteMetaParams {
3456
+ /**
3457
+ * The unique slug identifier of the meta tool to execute
3458
+ */
3459
+ slug:
3460
+ | 'COMPOSIO_SEARCH_TOOLS'
3461
+ | 'COMPOSIO_MULTI_EXECUTE_TOOL'
3462
+ | 'COMPOSIO_MANAGE_CONNECTIONS'
3463
+ | 'COMPOSIO_WAIT_FOR_CONNECTIONS'
3464
+ | 'COMPOSIO_REMOTE_WORKBENCH'
3465
+ | 'COMPOSIO_REMOTE_BASH_TOOL'
3466
+ | 'COMPOSIO_GET_TOOL_SCHEMAS'
3467
+ | 'COMPOSIO_UPSERT_RECIPE'
3468
+ | 'COMPOSIO_GET_RECIPE';
3469
+
3470
+ /**
3471
+ * The arguments required by the meta tool
3472
+ */
3473
+ arguments?: { [key: string]: unknown };
3474
+
3475
+ /**
3476
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3477
+ * customs — pass them on every request that needs them.
3478
+ */
3479
+ experimental?: SessionExecuteMetaParams.Experimental;
3480
+ }
3481
+
3482
+ export namespace SessionExecuteMetaParams {
3483
+ /**
3484
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3485
+ * customs — pass them on every request that needs them.
3486
+ */
3487
+ export interface Experimental {
3488
+ /**
3489
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
3490
+ * existing Composio toolkits. All tools are no-auth.
3491
+ */
3492
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
3493
+
3494
+ /**
3495
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
3496
+ * extends_toolkit inherit the Composio toolkit's connection.
3497
+ */
3498
+ custom_tools?: Array<Experimental.CustomTool>;
3499
+ }
3500
+
3501
+ export namespace Experimental {
3502
+ export interface CustomToolkit {
3503
+ /**
3504
+ * Used for BM25 search matching and shown in toolkit connection statuses.
3505
+ */
3506
+ description: string;
3507
+
3508
+ /**
3509
+ * Display name shown to the LLM and in search results.
3510
+ */
3511
+ name: string;
3512
+
3513
+ /**
3514
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
3515
+ * slugs. Alphanumeric, underscores, and hyphens only.
3516
+ */
3517
+ slug: string;
3518
+
3519
+ /**
3520
+ * Tools in this custom toolkit
3521
+ */
3522
+ tools: Array<CustomToolkit.Tool>;
3523
+
3524
+ /**
3525
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3526
+ * in create/attach responses for inline custom definitions.
3527
+ */
3528
+ preload?: boolean;
3529
+ }
3530
+
3531
+ export namespace CustomToolkit {
3532
+ export interface Tool {
3533
+ /**
3534
+ * Used for BM25 search matching and shown to the LLM.
3535
+ */
3536
+ description: string;
3537
+
3538
+ /**
3539
+ * Must have type: "object" and a properties field.
3540
+ */
3541
+ input_schema: { [key: string]: unknown };
3542
+
3543
+ /**
3544
+ * Human-readable display name
3545
+ */
3546
+ name: string;
3547
+
3548
+ /**
3549
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
3550
+ * chars total).
3551
+ */
3552
+ slug: string;
3553
+
3554
+ /**
3555
+ * Optional output schema for the tool response.
3556
+ */
3557
+ output_schema?: { [key: string]: unknown };
3558
+
3559
+ /**
3560
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3561
+ * in create/attach responses for inline custom definitions.
3562
+ */
3563
+ preload?: boolean;
3564
+ }
3565
+ }
3566
+
3567
+ export interface CustomTool {
3568
+ /**
3569
+ * Used for BM25 search matching and shown to the LLM.
3570
+ */
3571
+ description: string;
3572
+
3573
+ /**
3574
+ * Must have type: "object" and a properties field.
3575
+ */
3576
+ input_schema: { [key: string]: unknown };
3577
+
3578
+ /**
3579
+ * Human-readable display name
3580
+ */
3581
+ name: string;
3582
+
3583
+ /**
3584
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
3585
+ * (extending). Max 60 chars total.
3586
+ */
3587
+ slug: string;
3588
+
3589
+ /**
3590
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
3591
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
3592
+ */
3593
+ extends_toolkit?: string;
3594
+
3595
+ /**
3596
+ * JSON Schema describing tool output (optional)
3597
+ */
3598
+ output_schema?: { [key: string]: unknown };
3599
+
3600
+ /**
3601
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3602
+ * in create/attach responses for inline custom definitions.
3603
+ */
3604
+ preload?: boolean;
3605
+ }
3606
+ }
3607
+ }
3608
+
3609
+ export interface SessionLinkParams {
3610
+ /**
3611
+ * The unique slug identifier of the toolkit to connect
3612
+ */
3613
+ toolkit: string;
3614
+
3615
+ /**
3616
+ * Sharing model for this connected account. PRIVATE (default) is usable only by
3617
+ * the owning user_id. SHARED is reachable from a tool-router session ONLY when
3618
+ * explicitly pinned in the session config — at most one SHARED connection per
3619
+ * toolkit per session. Sessions never use a SHARED connection implicitly.
3620
+ */
3621
+ account_type?: 'PRIVATE' | 'SHARED';
3622
+
3623
+ /**
3624
+ * Access control for SHARED connections. Resolution rule (only fires when caller
3625
+ * != creator): user in not_allowed_user_ids → DENY; allow_all_users=true → ALLOW;
3626
+ * user in allowed_user_ids → ALLOW; else DENY. Default state (omitted or {}) is
3627
+ * deny-by-default — only the creator can use.
3628
+ */
3629
+ acl_config_for_shared?: SessionLinkParams.ACLConfigForShared;
3630
+
3631
+ /**
3632
+ * A human-readable alias for this connected account. Must be unique per entity and
3633
+ * toolkit within the project.
3634
+ */
3635
+ alias?: string;
3636
+
3637
+ /**
3638
+ * URL where users will be redirected after completing auth
3639
+ */
3640
+ callback_url?: string;
3641
+ }
3642
+
3643
+ export namespace SessionLinkParams {
3644
+ /**
3645
+ * Access control for SHARED connections. Resolution rule (only fires when caller
3646
+ * != creator): user in not_allowed_user_ids → DENY; allow_all_users=true → ALLOW;
3647
+ * user in allowed_user_ids → ALLOW; else DENY. Default state (omitted or {}) is
3648
+ * deny-by-default — only the creator can use.
3649
+ */
3650
+ export interface ACLConfigForShared {
3651
+ /**
3652
+ * Wildcard "any user_id in the project" allow toggle. Only valid on SHARED
3653
+ * connections.
3654
+ */
3655
+ allow_all_users?: boolean;
3656
+
3657
+ /**
3658
+ * Explicit allow list of user_ids who can use this SHARED connection.
3659
+ */
3660
+ allowed_user_ids?: Array<string>;
3661
+
3662
+ /**
3663
+ * Explicit deny list. Wins on conflict with allow_all_users and allowed_user_ids.
3664
+ */
3665
+ not_allowed_user_ids?: Array<string>;
3666
+ }
3667
+ }
3668
+
3669
+ export interface SessionPatchParams {
3670
+ /**
3671
+ * The auth configs to use for the session. This will override the default behavior
3672
+ * and use the given auth config when specific toolkits are being executed
3673
+ */
3674
+ auth_configs?: { [key: string]: string };
3675
+
3676
+ /**
3677
+ * The connected accounts to use for the session, as an array of nano-IDs per
3678
+ * toolkit. This overrides the default behaviour and pins specific connected
3679
+ * accounts when toolkits are executed. Each account must exist (not deleted or
3680
+ * disabled) and belong to the same `user_id` as the session. Multi-account
3681
+ * sessions can pin multiple; non-multi-account sessions are capped at length 1.
3682
+ */
3683
+ connected_accounts?: { [key: string]: Array<string> } | null;
3684
+
3685
+ execute?: SessionPatchParams.Execute;
3686
+
3687
+ experimental?: SessionPatchParams.Experimental | null;
3688
+
3689
+ manage_connections?: SessionPatchParams.ManageConnections | null;
3690
+
3691
+ multi_account?: SessionPatchParams.MultiAccount | null;
3692
+
3693
+ /**
3694
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
3695
+ * "all" to dynamically expose every app tool allowed by positive
3696
+ * toolkits/tools/tags filters.
3697
+ */
3698
+ preload?: SessionPatchParams.Preload;
3699
+
3700
+ search?: SessionPatchParams.Search;
3701
+
3702
+ /**
3703
+ * Global MCP tool annotation hints for filtering. Array format is treated as
3704
+ * enabled list. Object format supports both enabled (tool must have at least one)
3705
+ * and disabled (tool must NOT have any) lists. Toolkit-level tags override this.
3706
+ * Toolkit enabled/disabled lists take precedence over tag filtering.
3707
+ */
3708
+ tags?:
3709
+ | Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>
3710
+ | SessionPatchParams.UnionMember1;
3711
+
3712
+ /**
3713
+ * Toolkit configuration - specify either enable toolkits (allowlist) or disable
3714
+ * toolkits (denylist). Mutually exclusive.
3715
+ */
3716
+ toolkits?: SessionPatchParams.Enable | SessionPatchParams.Disable;
3717
+
3718
+ /**
3719
+ * Tool-level configuration per toolkit. Allows you to enable, disable, or filter
3720
+ * by tags for specific tools within each toolkit. Every slug passed in `enable` /
3721
+ * `disable` must be a valid Composio tool slug for that toolkit — invalid or
3722
+ * typo'd slugs fail session creation with a clear error listing which ones didn't
3723
+ * match.
3724
+ */
3725
+ tools?: { [key: string]: SessionPatchParams.Enable | SessionPatchParams.Disable | SessionPatchParams.Tags };
3726
+
3727
+ workbench?: SessionPatchParams.Workbench | null;
3728
+ }
3729
+
3730
+ export namespace SessionPatchParams {
3731
+ export interface Execute {
3732
+ enable_multi_execute?: boolean;
3733
+ }
3734
+
3735
+ export interface Experimental {
3736
+ /**
3737
+ * Experimental base URL override for connection link redirects created from this
3738
+ * tool-router session. When set, link creation returns
3739
+ * `${link_url_overwrite}/link/{link_token}` instead of the default Composio
3740
+ * Connect base URL. Use only when your integration needs links to open through a
3741
+ * custom Connect host.
3742
+ */
3743
+ link_url_overwrite?: string;
3744
+
3745
+ /**
3746
+ * Per-tool elicitation permission config. Replaces the stored block when provided.
3747
+ */
3748
+ permissions?: Experimental.Permissions;
3749
+ }
3750
+
3751
+ export namespace Experimental {
3752
+ /**
3753
+ * Per-tool elicitation permission config. Replaces the stored block when provided.
3754
+ */
3755
+ export interface Permissions {
3756
+ /**
3757
+ * Default elicitation behavior when no override matches. `allow_all` runs every
3758
+ * tool without prompting; `ask_every_call` prompts on each invocation;
3759
+ * `ask_once_per_session` prompts once and remembers the answer for the rest of the
3760
+ * session.
3761
+ */
3762
+ default: 'allow_all' | 'ask_every_call' | 'ask_once_per_session';
3763
+
3764
+ /**
3765
+ * Per-tool overrides keyed by `${toolSlug}:${connectedAccountId ?? "__none__"}`,
3766
+ * plus account-wide overrides keyed by `*:${connectedAccountId ?? "__none__"}`.
3767
+ * Exact tool overrides take precedence over account-wide overrides. `always_allow`
3768
+ * skips the prompt and runs the tool; `always_deny` blocks the tool; `ask_once`
3769
+ * prompts once per session (allow/deny) and remembers; `ask_always` prompts on
3770
+ * every call with allow-once/allow-session/deny, ignoring any cached session
3771
+ * allow. Overrides take precedence over `default`.
3772
+ */
3773
+ overrides?: { [key: string]: 'always_allow' | 'always_deny' | 'ask_once' | 'ask_always' };
3774
+ }
3775
+ }
3776
+
3777
+ export interface ManageConnections {
3778
+ /**
3779
+ * The URL to redirect to after a user completes authentication for a connected
3780
+ * account. This allows you to handle the auth callback in your own application.
3781
+ */
3782
+ callback_url?: string;
3783
+
3784
+ /**
3785
+ * Whether to enable the connection manager for automatic connection handling. If
3786
+ * true, we will provide a tool your agent can use to initiate connections to
3787
+ * toolkits if it doesnt exist. If set to false, then you have to manage
3788
+ * connections manually.
3789
+ */
3790
+ enable?: boolean | null;
3791
+
3792
+ /**
3793
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS to allow deleting
3794
+ * connected accounts. Default true.
3795
+ */
3796
+ enable_connection_removal?: boolean | null;
3797
+
3798
+ /**
3799
+ * When true, the COMPOSIO_WAIT_FOR_CONNECTIONS tool is available for agents to
3800
+ * poll connection status after sharing auth URLs. Default is false (disabled). May
3801
+ * not work reliably with GPT models.
3802
+ */
3803
+ enable_wait_for_connections?: boolean | null;
3804
+ }
3805
+
3806
+ export interface MultiAccount {
3807
+ /**
3808
+ * When true, enables multi-account mode for this session. When not set, falls back
3809
+ * to org/project-level configuration.
3810
+ */
3811
+ enable?: boolean;
3812
+
3813
+ /**
3814
+ * Maximum number of connected accounts allowed per toolkit. Must be between 2
3815
+ * and 10.
3816
+ */
3817
+ max_accounts_per_toolkit?: number;
3818
+
3819
+ /**
3820
+ * When true, the agent must explicitly select which account to use. When false
3821
+ * (default), the first/default account is used automatically.
3822
+ */
3823
+ require_explicit_selection?: boolean;
3824
+ }
3825
+
3826
+ /**
3827
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
3828
+ * "all" to dynamically expose every app tool allowed by positive
3829
+ * toolkits/tools/tags filters.
3830
+ */
3831
+ export interface Preload {
3832
+ /**
3833
+ * Explicit tool slugs to preload, or "all" to dynamically expose all current and
3834
+ * future app tools allowed by the positive session filters. "all" is capped at
3835
+ * 1000 tools and is not supported without a positive allowlist.
3836
+ */
3837
+ tools?: Array<string> | string;
3838
+ }
3839
+
3840
+ export interface Search {
3841
+ enable?: boolean;
3842
+ }
3843
+
3844
+ export interface UnionMember1 {
3845
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3846
+
3847
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3848
+ }
3849
+
3850
+ /**
3851
+ * Enable only specific toolkits (allowlist)
3852
+ */
3853
+ export interface Enable {
3854
+ /**
3855
+ * Only these specific toolkits will be enabled
3856
+ */
3857
+ enable: Array<string>;
3858
+ }
3859
+
3860
+ /**
3861
+ * Disable specific toolkits (denylist)
3862
+ */
3863
+ export interface Disable {
3864
+ /**
3865
+ * These specific toolkits will be disabled
3866
+ */
3867
+ disable: Array<string>;
3868
+ }
3869
+
3870
+ export interface Enable {
3871
+ /**
3872
+ * Only these specific tools will be available for this toolkit
3873
+ */
3874
+ enable: Array<string>;
3875
+ }
3876
+
3877
+ export interface Disable {
3878
+ /**
3879
+ * These specific tools will be disabled for this toolkit
3880
+ */
3881
+ disable: Array<string>;
3882
+ }
3883
+
3884
+ export interface Tags {
3885
+ /**
3886
+ * MCP tags to filter tools. Array format is treated as enabled list. Object format
3887
+ * supports both enabled and disabled lists.
3888
+ */
3889
+ tags: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'> | Tags.UnionMember1;
3890
+ }
3891
+
3892
+ export namespace Tags {
3893
+ export interface UnionMember1 {
3894
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3895
+
3896
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3897
+ }
3898
+ }
3899
+
3900
+ export interface Workbench {
3901
+ /**
3902
+ * Character threshold for automatic offloading. When workbench response exceeds
3903
+ * this threshold, it will be automatically offloaded. Default is picked
3904
+ * automatically based on the response size.
3905
+ */
3906
+ auto_offload_threshold?: number;
3907
+
3908
+ /**
3909
+ * Set to false to disable the workbench entirely. When disabled, no code execution
3910
+ * tools are available in the session.
3911
+ */
3912
+ enable?: boolean;
3913
+
3914
+ /**
3915
+ * Whether proxy execution is enabled. When enabled, workbench can call URLs and
3916
+ * APIs directly.
3917
+ */
3918
+ enable_proxy_execution?: boolean;
3919
+
3920
+ /**
3921
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
3922
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Patching this value recreates the sandbox
3923
+ * on next access — sandbox FS state is lost, but /mnt/files/ R2 mount persists.
3924
+ */
3925
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
3926
+ }
3927
+ }
3928
+
3929
+ export interface SessionProxyExecuteParams {
3930
+ /**
3931
+ * The API endpoint to call (absolute URL or path relative to base URL of the
3932
+ * connected account)
3933
+ */
3934
+ endpoint: string;
3935
+
3936
+ /**
3937
+ * The HTTP method to use for the request
3938
+ */
3939
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';
3940
+
3941
+ /**
3942
+ * The slug of the toolkit to use for the request
3943
+ */
3944
+ toolkit_slug: string;
3945
+
3946
+ /**
3947
+ * Binary body to send. For binary upload via URL: use {url: "https://...",
3948
+ * content_type?: "..."}. For binary upload via base64: use {base64: "...",
3949
+ * content_type?: "..."}.
3950
+ */
3951
+ binary_body?: SessionProxyExecuteParams.UnionMember0 | SessionProxyExecuteParams.UnionMember1;
3952
+
3953
+ /**
3954
+ * The request body (for POST, PUT, and PATCH requests)
3955
+ */
3956
+ body?: unknown;
3957
+
3958
+ custom_connection_data?:
3959
+ | SessionProxyExecuteParams.UnionMember0
3960
+ | SessionProxyExecuteParams.UnionMember1
3961
+ | SessionProxyExecuteParams.UnionMember2
3962
+ | SessionProxyExecuteParams.UnionMember3
3963
+ | SessionProxyExecuteParams.UnionMember4
3964
+ | SessionProxyExecuteParams.UnionMember5
3965
+ | SessionProxyExecuteParams.UnionMember6
3966
+ | SessionProxyExecuteParams.UnionMember7
3967
+ | SessionProxyExecuteParams.UnionMember8
3968
+ | SessionProxyExecuteParams.UnionMember9
3969
+ | SessionProxyExecuteParams.UnionMember10;
3970
+
3971
+ /**
3972
+ * Additional HTTP headers or query parameters to include in the request
3973
+ */
3974
+ parameters?: Array<SessionProxyExecuteParams.Parameter>;
3975
+ }
3976
+
3977
+ export namespace SessionProxyExecuteParams {
3978
+ export interface UnionMember0 {
3979
+ /**
3980
+ * URL to fetch binary content from
3981
+ */
3982
+ url: string;
3983
+
3984
+ /**
3985
+ * Content-Type header to use for the request
3986
+ */
3987
+ content_type?: string;
3988
+ }
3989
+
3990
+ export interface UnionMember1 {
3991
+ /**
3992
+ * Base64-encoded binary data
3993
+ */
3994
+ base64: string;
3995
+
3996
+ /**
3997
+ * Content-Type header to use for the request
3998
+ */
3999
+ content_type?: string;
4000
+ }
4001
+
4002
+ export interface UnionMember0 {
4003
+ authScheme: 'OAUTH2';
4004
+
4005
+ toolkitSlug: string;
4006
+
4007
+ val: UnionMember0.Val;
4008
+ }
4009
+
4010
+ export namespace UnionMember0 {
4011
+ export interface Val {
4012
+ access_token: string;
4013
+
4014
+ account_id?: string;
4015
+
4016
+ account_url?: string;
4017
+
4018
+ api_url?: string;
4019
+
4020
+ /**
4021
+ * for slack user scopes
4022
+ */
4023
+ authed_user?: Val.AuthedUser;
4024
+
4025
+ base_url?: string;
4026
+
4027
+ borneo_dashboard_url?: string;
4028
+
4029
+ COMPANYDOMAIN?: string;
4030
+
4031
+ dc?: string;
4032
+
4033
+ domain?: string;
4034
+
4035
+ expires_in?: number | string | null;
4036
+
4037
+ extension?: string;
4038
+
4039
+ extra_token_data?: { [key: string]: unknown };
4040
+
4041
+ form_api_base_url?: string;
4042
+
4043
+ id_token?: string;
4044
+
4045
+ instanceEndpoint?: string;
4046
+
4047
+ instanceName?: string;
4048
+
4049
+ /**
4050
+ * Whether to return the redirect url without shortening
4051
+ */
4052
+ long_redirect_url?: boolean;
4053
+
4054
+ proxy_password?: string;
4055
+
4056
+ proxy_username?: string;
4057
+
4058
+ refresh_token?: string | null;
4059
+
4060
+ region?: string;
4061
+
4062
+ scope?: string | Array<string> | null;
4063
+
4064
+ server_location?: string;
4065
+
4066
+ shop?: string;
4067
+
4068
+ site_name?: string;
4069
+
4070
+ /**
4071
+ * The oauth2 state prefix for the connection
4072
+ */
4073
+ state_prefix?: string;
4074
+
4075
+ subdomain?: string;
4076
+
4077
+ token_type?: string;
4078
+
4079
+ version?: string;
4080
+
4081
+ webhook_signature?: string;
4082
+
4083
+ your_server?: string;
4084
+
4085
+ 'your-domain'?: string;
4086
+
4087
+ [k: string]: unknown;
4088
+ }
4089
+
4090
+ export namespace Val {
4091
+ /**
4092
+ * for slack user scopes
4093
+ */
4094
+ export interface AuthedUser {
4095
+ access_token?: string;
4096
+
4097
+ scope?: string;
4098
+ }
4099
+ }
4100
+ }
4101
+
4102
+ export interface UnionMember1 {
4103
+ authScheme: 'DCR_OAUTH';
4104
+
4105
+ toolkitSlug: string;
4106
+
4107
+ val: UnionMember1.Val;
4108
+ }
4109
+
4110
+ export namespace UnionMember1 {
4111
+ export interface Val {
4112
+ access_token: string;
4113
+
4114
+ /**
4115
+ * Dynamically registered client ID
4116
+ */
4117
+ client_id: string;
4118
+
4119
+ account_id?: string;
4120
+
4121
+ account_url?: string;
4122
+
4123
+ api_url?: string;
4124
+
4125
+ base_url?: string;
4126
+
4127
+ borneo_dashboard_url?: string;
4128
+
4129
+ client_id_issued_at?: number;
4130
+
4131
+ /**
4132
+ * Dynamically registered client secret
4133
+ */
4134
+ client_secret?: string;
4135
+
4136
+ client_secret_expires_at?: number;
4137
+
4138
+ COMPANYDOMAIN?: string;
4139
+
4140
+ dc?: string;
4141
+
4142
+ domain?: string;
4143
+
4144
+ expires_in?: number | string | null;
4145
+
4146
+ extension?: string;
4147
+
4148
+ form_api_base_url?: string;
4149
+
4150
+ id_token?: string;
4151
+
4152
+ instanceEndpoint?: string;
4153
+
4154
+ instanceName?: string;
4155
+
4156
+ /**
4157
+ * Whether to return the redirect url without shortening
4158
+ */
4159
+ long_redirect_url?: boolean;
4160
+
4161
+ proxy_password?: string;
4162
+
4163
+ proxy_username?: string;
4164
+
4165
+ refresh_token?: string | null;
4166
+
4167
+ region?: string;
4168
+
4169
+ scope?: string | Array<string> | null;
4170
+
4171
+ server_location?: string;
4172
+
4173
+ shop?: string;
4174
+
4175
+ site_name?: string;
4176
+
4177
+ /**
4178
+ * The oauth2 state prefix for the connection
4179
+ */
4180
+ state_prefix?: string;
4181
+
4182
+ subdomain?: string;
4183
+
4184
+ token_type?: string;
4185
+
4186
+ version?: string;
4187
+
4188
+ your_server?: string;
4189
+
4190
+ 'your-domain'?: string;
4191
+
4192
+ [k: string]: unknown;
4193
+ }
4194
+ }
4195
+
4196
+ export interface UnionMember2 {
4197
+ authScheme: 'API_KEY';
4198
+
4199
+ toolkitSlug: string;
4200
+
4201
+ val: UnionMember2.Val;
4202
+ }
4203
+
4204
+ export namespace UnionMember2 {
4205
+ export interface Val {
4206
+ account_id?: string;
4207
+
4208
+ account_url?: string;
4209
+
4210
+ api_key?: string;
4211
+
4212
+ api_url?: string;
4213
+
4214
+ base_url?: string;
4215
+
4216
+ basic_encoded?: string;
4217
+
4218
+ bearer_token?: string;
4219
+
4220
+ borneo_dashboard_url?: string;
4221
+
4222
+ COMPANYDOMAIN?: string;
4223
+
4224
+ dc?: string;
4225
+
4226
+ domain?: string;
4227
+
4228
+ extension?: string;
4229
+
4230
+ form_api_base_url?: string;
4231
+
4232
+ generic_api_key?: string;
4233
+
4234
+ instanceEndpoint?: string;
4235
+
4236
+ instanceName?: string;
4237
+
4238
+ proxy_password?: string;
4239
+
4240
+ proxy_username?: string;
4241
+
4242
+ region?: string;
4243
+
4244
+ server_location?: string;
4245
+
4246
+ shop?: string;
4247
+
4248
+ site_name?: string;
4249
+
4250
+ subdomain?: string;
4251
+
4252
+ version?: string;
4253
+
4254
+ your_server?: string;
4255
+
4256
+ 'your-domain'?: string;
4257
+
4258
+ [k: string]: unknown;
4259
+ }
4260
+ }
4261
+
4262
+ export interface UnionMember3 {
4263
+ authScheme: 'BASIC_WITH_JWT';
4264
+
4265
+ toolkitSlug: string;
4266
+
4267
+ val: UnionMember3.Val;
4268
+ }
4269
+
4270
+ export namespace UnionMember3 {
4271
+ export interface Val {
4272
+ password: string;
4273
+
4274
+ username: string;
4275
+
4276
+ account_id?: string;
4277
+
4278
+ account_url?: string;
4279
+
4280
+ api_url?: string;
4281
+
4282
+ base_url?: string;
4283
+
4284
+ borneo_dashboard_url?: string;
4285
+
4286
+ COMPANYDOMAIN?: string;
4287
+
4288
+ dc?: string;
4289
+
4290
+ domain?: string;
4291
+
4292
+ extension?: string;
4293
+
4294
+ form_api_base_url?: string;
4295
+
4296
+ instanceEndpoint?: string;
4297
+
4298
+ instanceName?: string;
4299
+
4300
+ proxy_password?: string;
4301
+
4302
+ proxy_username?: string;
4303
+
4304
+ region?: string;
4305
+
4306
+ server_location?: string;
4307
+
4308
+ shop?: string;
4309
+
4310
+ site_name?: string;
4311
+
4312
+ subdomain?: string;
4313
+
4314
+ version?: string;
4315
+
4316
+ your_server?: string;
4317
+
4318
+ 'your-domain'?: string;
4319
+
4320
+ [k: string]: unknown;
4321
+ }
4322
+ }
4323
+
4324
+ export interface UnionMember4 {
4325
+ authScheme: 'BASIC';
4326
+
4327
+ toolkitSlug: string;
4328
+
4329
+ val: UnionMember4.Val;
4330
+ }
4331
+
4332
+ export namespace UnionMember4 {
4333
+ export interface Val {
4334
+ username: string;
4335
+
4336
+ account_id?: string;
4337
+
4338
+ account_url?: string;
4339
+
4340
+ api_url?: string;
4341
+
4342
+ base_url?: string;
4343
+
4344
+ borneo_dashboard_url?: string;
4345
+
4346
+ COMPANYDOMAIN?: string;
4347
+
4348
+ dc?: string;
4349
+
4350
+ domain?: string;
4351
+
4352
+ extension?: string;
4353
+
4354
+ form_api_base_url?: string;
4355
+
4356
+ instanceEndpoint?: string;
4357
+
4358
+ instanceName?: string;
4359
+
4360
+ password?: string;
4361
+
4362
+ proxy_password?: string;
4363
+
4364
+ proxy_username?: string;
4365
+
4366
+ region?: string;
4367
+
4368
+ server_location?: string;
4369
+
4370
+ shop?: string;
4371
+
4372
+ site_name?: string;
4373
+
4374
+ subdomain?: string;
4375
+
4376
+ version?: string;
4377
+
4378
+ your_server?: string;
4379
+
4380
+ 'your-domain'?: string;
4381
+
4382
+ [k: string]: unknown;
4383
+ }
4384
+ }
4385
+
4386
+ export interface UnionMember5 {
4387
+ authScheme: 'BEARER_TOKEN';
4388
+
4389
+ toolkitSlug: string;
4390
+
4391
+ val: UnionMember5.Val;
4392
+ }
4393
+
4394
+ export namespace UnionMember5 {
4395
+ export interface Val {
4396
+ token: string;
4397
+
4398
+ account_id?: string;
4399
+
4400
+ account_url?: string;
4401
+
4402
+ api_url?: string;
4403
+
4404
+ base_url?: string;
4405
+
4406
+ borneo_dashboard_url?: string;
4407
+
4408
+ COMPANYDOMAIN?: string;
4409
+
4410
+ dc?: string;
4411
+
4412
+ domain?: string;
4413
+
4414
+ extension?: string;
4415
+
4416
+ form_api_base_url?: string;
4417
+
4418
+ instanceEndpoint?: string;
4419
+
4420
+ instanceName?: string;
4421
+
4422
+ proxy_password?: string;
4423
+
4424
+ proxy_username?: string;
4425
+
4426
+ region?: string;
4427
+
4428
+ server_location?: string;
4429
+
4430
+ shop?: string;
4431
+
4432
+ site_name?: string;
4433
+
4434
+ subdomain?: string;
4435
+
4436
+ version?: string;
4437
+
4438
+ your_server?: string;
4439
+
4440
+ 'your-domain'?: string;
4441
+
4442
+ [k: string]: unknown;
4443
+ }
4444
+ }
4445
+
4446
+ export interface UnionMember6 {
4447
+ authScheme: 'OAUTH1';
4448
+
4449
+ toolkitSlug: string;
4450
+
4451
+ val: UnionMember6.Val;
4452
+ }
4453
+
4454
+ export namespace UnionMember6 {
4455
+ export interface Val {
4456
+ oauth_token: string;
4457
+
4458
+ oauth_token_secret: string;
4459
+
4460
+ account_id?: string;
4461
+
4462
+ account_url?: string;
4463
+
4464
+ api_url?: string;
4465
+
4466
+ base_url?: string;
4467
+
4468
+ borneo_dashboard_url?: string;
4469
+
4470
+ callback_url?: string;
4471
+
4472
+ COMPANYDOMAIN?: string;
4473
+
4474
+ consumer_key?: string;
4475
+
4476
+ dc?: string;
4477
+
4478
+ domain?: string;
4479
+
4480
+ extension?: string;
4481
+
4482
+ form_api_base_url?: string;
4483
+
4484
+ instanceEndpoint?: string;
4485
+
4486
+ instanceName?: string;
4487
+
4488
+ oauth_verifier?: string;
4489
+
4490
+ proxy_password?: string;
4491
+
4492
+ proxy_username?: string;
4493
+
4494
+ redirectUrl?: string;
4495
+
4496
+ region?: string;
4497
+
4498
+ server_location?: string;
4499
+
4500
+ shop?: string;
4501
+
4502
+ site_name?: string;
4503
+
4504
+ subdomain?: string;
4505
+
4506
+ version?: string;
4507
+
4508
+ your_server?: string;
4509
+
4510
+ 'your-domain'?: string;
4511
+
4512
+ [k: string]: unknown;
4513
+ }
4514
+ }
4515
+
4516
+ export interface UnionMember7 {
4517
+ authScheme: 'NO_AUTH';
4518
+
4519
+ toolkitSlug: string;
4520
+
4521
+ val: UnionMember7.Val;
4522
+ }
4523
+
4524
+ export namespace UnionMember7 {
4525
+ export interface Val {
4526
+ account_id?: string;
4527
+
4528
+ account_url?: string;
4529
+
4530
+ api_url?: string;
4531
+
4532
+ base_url?: string;
4533
+
4534
+ borneo_dashboard_url?: string;
4535
+
4536
+ COMPANYDOMAIN?: string;
4537
+
4538
+ dc?: string;
4539
+
4540
+ domain?: string;
4541
+
4542
+ extension?: string;
4543
+
4544
+ form_api_base_url?: string;
4545
+
4546
+ instanceEndpoint?: string;
4547
+
4548
+ instanceName?: string;
4549
+
4550
+ proxy_password?: string;
4551
+
4552
+ proxy_username?: string;
4553
+
4554
+ region?: string;
4555
+
4556
+ server_location?: string;
4557
+
4558
+ shop?: string;
4559
+
4560
+ site_name?: string;
4561
+
4562
+ subdomain?: string;
4563
+
4564
+ version?: string;
4565
+
4566
+ your_server?: string;
4567
+
4568
+ 'your-domain'?: string;
4569
+
4570
+ [k: string]: unknown;
4571
+ }
4572
+ }
4573
+
4574
+ export interface UnionMember8 {
4575
+ authScheme: 'SERVICE_ACCOUNT';
4576
+
4577
+ toolkitSlug: string;
4578
+
4579
+ val: UnionMember8.Val;
4580
+ }
4581
+
4582
+ export namespace UnionMember8 {
4583
+ export interface Val {
4584
+ application_id: string;
4585
+
4586
+ installation_id: string;
4587
+
4588
+ private_key: string;
4589
+
4590
+ account_id?: string;
4591
+
4592
+ account_url?: string;
4593
+
4594
+ api_url?: string;
4595
+
4596
+ base_url?: string;
4597
+
4598
+ borneo_dashboard_url?: string;
4599
+
4600
+ COMPANYDOMAIN?: string;
4601
+
4602
+ dc?: string;
4603
+
4604
+ domain?: string;
4605
+
4606
+ extension?: string;
4607
+
4608
+ form_api_base_url?: string;
4609
+
4610
+ instanceEndpoint?: string;
4611
+
4612
+ instanceName?: string;
4613
+
4614
+ proxy_password?: string;
4615
+
4616
+ proxy_username?: string;
4617
+
4618
+ region?: string;
4619
+
4620
+ server_location?: string;
4621
+
4622
+ shop?: string;
4623
+
4624
+ site_name?: string;
4625
+
4626
+ subdomain?: string;
4627
+
4628
+ version?: string;
4629
+
4630
+ your_server?: string;
4631
+
4632
+ 'your-domain'?: string;
4633
+
4634
+ [k: string]: unknown;
4635
+ }
4636
+ }
4637
+
4638
+ export interface UnionMember9 {
4639
+ authScheme: 'GOOGLE_SERVICE_ACCOUNT';
4640
+
4641
+ toolkitSlug: string;
4642
+
4643
+ val: UnionMember9.Val;
4644
+ }
4645
+
4646
+ export namespace UnionMember9 {
4647
+ export interface Val {
4648
+ credentials_json: string;
4649
+
4650
+ account_id?: string;
4651
+
4652
+ account_url?: string;
4653
+
4654
+ api_url?: string;
4655
+
4656
+ base_url?: string;
4657
+
4658
+ borneo_dashboard_url?: string;
4659
+
4660
+ COMPANYDOMAIN?: string;
4661
+
4662
+ dc?: string;
4663
+
4664
+ domain?: string;
4665
+
4666
+ extension?: string;
4667
+
4668
+ form_api_base_url?: string;
4669
+
4670
+ instanceEndpoint?: string;
4671
+
4672
+ instanceName?: string;
4673
+
4674
+ proxy_password?: string;
4675
+
4676
+ proxy_username?: string;
4677
+
4678
+ region?: string;
4679
+
4680
+ server_location?: string;
4681
+
4682
+ shop?: string;
4683
+
4684
+ site_name?: string;
4685
+
4686
+ subdomain?: string;
4687
+
4688
+ version?: string;
4689
+
4690
+ your_server?: string;
4691
+
4692
+ 'your-domain'?: string;
4693
+
4694
+ [k: string]: unknown;
4695
+ }
4696
+ }
4697
+
4698
+ export interface UnionMember10 {
4699
+ authScheme: 'S2S_OAUTH2';
4700
+
4701
+ toolkitSlug: string;
4702
+
4703
+ val: UnionMember10.Val;
4704
+ }
4705
+
4706
+ export namespace UnionMember10 {
4707
+ export interface Val {
4708
+ access_token: string;
4709
+
4710
+ client_id: string;
4711
+
4712
+ client_secret: string;
4713
+
4714
+ account_id?: string;
4715
+
4716
+ account_url?: string;
4717
+
4718
+ api_url?: string;
4719
+
4720
+ base_url?: string;
4721
+
4722
+ borneo_dashboard_url?: string;
4723
+
4724
+ COMPANYDOMAIN?: string;
4725
+
4726
+ dc?: string;
4727
+
4728
+ domain?: string;
4729
+
4730
+ expires_at?: string;
4731
+
4732
+ expires_in?: number | string | null;
4733
+
4734
+ extension?: string;
4735
+
4736
+ form_api_base_url?: string;
4737
+
4738
+ instanceEndpoint?: string;
4739
+
4740
+ instanceName?: string;
4741
+
4742
+ proxy_password?: string;
4743
+
4744
+ proxy_username?: string;
4745
+
4746
+ region?: string;
4747
+
4748
+ scope?: string | Array<string> | null;
4749
+
4750
+ server_location?: string;
4751
+
4752
+ shop?: string;
4753
+
4754
+ site_name?: string;
4755
+
4756
+ subdomain?: string;
4757
+
4758
+ token_type?: string;
4759
+
4760
+ version?: string;
4761
+
4762
+ your_server?: string;
4763
+
4764
+ 'your-domain'?: string;
4765
+
4766
+ [k: string]: unknown;
4767
+ }
4768
+ }
4769
+
4770
+ export interface Parameter {
4771
+ /**
4772
+ * Parameter name
4773
+ */
4774
+ name: string;
4775
+
4776
+ /**
4777
+ * Parameter type (header or query)
4778
+ */
4779
+ type: 'header' | 'query';
4780
+
4781
+ /**
4782
+ * Parameter value
4783
+ */
4784
+ value: string;
4785
+ }
4786
+ }
4787
+
4788
+ export interface SessionSearchParams {
4789
+ /**
4790
+ * List of search queries to execute in parallel.
4791
+ */
4792
+ queries: Array<SessionSearchParams.Query>;
4793
+
4794
+ /**
4795
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
4796
+ * customs — pass them on every request that needs them.
4797
+ */
4798
+ experimental?: SessionSearchParams.Experimental;
4799
+
4800
+ /**
4801
+ * Optional model hint for search/planning behavior (e.g., "gpt-4o").
4802
+ */
4803
+ model?: string;
4804
+ }
4805
+
4806
+ export namespace SessionSearchParams {
4807
+ export interface Query {
4808
+ /**
4809
+ * The task or use case to search tools for. Provide a detailed description to get
4810
+ * the best results. Max 1024 characters.
4811
+ */
4812
+ use_case: string;
4813
+
4814
+ /**
4815
+ * Known field hints as key:value pairs (e.g., "channel_name:general,
4816
+ * user_email:john@example.com"). Max 500 characters.
4817
+ */
4818
+ known_fields?: string;
4819
+ }
4820
+
4821
+ /**
4822
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
4823
+ * customs — pass them on every request that needs them.
4824
+ */
4825
+ export interface Experimental {
4826
+ /**
4827
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
4828
+ * existing Composio toolkits. All tools are no-auth.
4829
+ */
4830
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
4831
+
4832
+ /**
4833
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
4834
+ * extends_toolkit inherit the Composio toolkit's connection.
4835
+ */
4836
+ custom_tools?: Array<Experimental.CustomTool>;
4837
+ }
4838
+
4839
+ export namespace Experimental {
4840
+ export interface CustomToolkit {
4841
+ /**
4842
+ * Used for BM25 search matching and shown in toolkit connection statuses.
4843
+ */
4844
+ description: string;
4845
+
4846
+ /**
4847
+ * Display name shown to the LLM and in search results.
4848
+ */
4849
+ name: string;
4850
+
4851
+ /**
4852
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
4853
+ * slugs. Alphanumeric, underscores, and hyphens only.
4854
+ */
4855
+ slug: string;
4856
+
4857
+ /**
4858
+ * Tools in this custom toolkit
4859
+ */
4860
+ tools: Array<CustomToolkit.Tool>;
4861
+
4862
+ /**
4863
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
4864
+ * in create/attach responses for inline custom definitions.
4865
+ */
4866
+ preload?: boolean;
4867
+ }
4868
+
4869
+ export namespace CustomToolkit {
4870
+ export interface Tool {
4871
+ /**
4872
+ * Used for BM25 search matching and shown to the LLM.
4873
+ */
4874
+ description: string;
4875
+
4876
+ /**
4877
+ * Must have type: "object" and a properties field.
4878
+ */
4879
+ input_schema: { [key: string]: unknown };
4880
+
4881
+ /**
4882
+ * Human-readable display name
4883
+ */
4884
+ name: string;
4885
+
4886
+ /**
4887
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
4888
+ * chars total).
4889
+ */
4890
+ slug: string;
4891
+
4892
+ /**
4893
+ * Optional output schema for the tool response.
4894
+ */
4895
+ output_schema?: { [key: string]: unknown };
4896
+
4897
+ /**
4898
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
4899
+ * in create/attach responses for inline custom definitions.
4900
+ */
4901
+ preload?: boolean;
4902
+ }
4903
+ }
4904
+
4905
+ export interface CustomTool {
4906
+ /**
4907
+ * Used for BM25 search matching and shown to the LLM.
4908
+ */
4909
+ description: string;
4910
+
4911
+ /**
4912
+ * Must have type: "object" and a properties field.
4913
+ */
4914
+ input_schema: { [key: string]: unknown };
4915
+
4916
+ /**
4917
+ * Human-readable display name
4918
+ */
4919
+ name: string;
4920
+
4921
+ /**
4922
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
4923
+ * (extending). Max 60 chars total.
4924
+ */
4925
+ slug: string;
4926
+
4927
+ /**
4928
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
4929
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
4930
+ */
4931
+ extends_toolkit?: string;
4932
+
4933
+ /**
4934
+ * JSON Schema describing tool output (optional)
4935
+ */
4936
+ output_schema?: { [key: string]: unknown };
4937
+
4938
+ /**
4939
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
4940
+ * in create/attach responses for inline custom definitions.
4941
+ */
4942
+ preload?: boolean;
4943
+ }
4944
+ }
4945
+ }
4946
+
4947
+ export interface SessionToolkitsParams {
4948
+ /**
4949
+ * Cursor for pagination. The cursor is a base64 encoded string of the page and
4950
+ * limit. The page is the page number and the limit is the number of items per
4951
+ * page. The cursor is used to paginate through the items. The cursor is not
4952
+ * required for the first page.
4953
+ */
4954
+ cursor?: string;
4955
+
4956
+ /**
4957
+ * Whether to filter by connected toolkits. If provided, only connected toolkits
4958
+ * will be returned.
4959
+ */
4960
+ is_connected?: boolean | null;
4961
+
4962
+ /**
4963
+ * Number of items per page, max allowed is 50
4964
+ */
4965
+ limit?: number;
4966
+
4967
+ /**
4968
+ * Search query to filter toolkits by name, slug, or description
4969
+ */
4970
+ search?: string;
4971
+
4972
+ /**
4973
+ * Optional comma-separated list of toolkit slugs to filter by. If provided, only
4974
+ * these toolkits will be returned, overriding the session configuration.
4975
+ */
4976
+ toolkits?: Array<string> | null;
4977
+ }
4978
+
4979
+ export interface SessionToolsParams {
4980
+ /**
4981
+ * Cursor for pagination. The cursor is a base64 encoded string of the page and
4982
+ * limit. The page is the page number and the limit is the number of items per
4983
+ * page. The cursor is used to paginate through the items. The cursor is not
4984
+ * required for the first page.
4985
+ */
4986
+ cursor?: string;
4987
+
4988
+ /**
4989
+ * Number of items per page, max allowed is 500
4990
+ */
4991
+ limit?: number;
4992
+ }
4993
+
4994
+ Session.Files = Files;
4995
+
4996
+ export declare namespace Session {
4997
+ export {
4998
+ type SessionCreateResponse as SessionCreateResponse,
4999
+ type SessionRetrieveResponse as SessionRetrieveResponse,
5000
+ type SessionAttachResponse as SessionAttachResponse,
5001
+ type SessionConfigHistoryResponse as SessionConfigHistoryResponse,
5002
+ type SessionExecuteResponse as SessionExecuteResponse,
5003
+ type SessionExecuteMetaResponse as SessionExecuteMetaResponse,
5004
+ type SessionLinkResponse as SessionLinkResponse,
5005
+ type SessionPatchResponse as SessionPatchResponse,
5006
+ type SessionProxyExecuteResponse as SessionProxyExecuteResponse,
5007
+ type SessionSearchResponse as SessionSearchResponse,
5008
+ type SessionToolkitsResponse as SessionToolkitsResponse,
5009
+ type SessionToolsResponse as SessionToolsResponse,
5010
+ type SessionCreateParams as SessionCreateParams,
5011
+ type SessionAttachParams as SessionAttachParams,
5012
+ type SessionConfigHistoryParams as SessionConfigHistoryParams,
5013
+ type SessionExecuteParams as SessionExecuteParams,
5014
+ type SessionExecuteMetaParams as SessionExecuteMetaParams,
5015
+ type SessionLinkParams as SessionLinkParams,
5016
+ type SessionPatchParams as SessionPatchParams,
5017
+ type SessionProxyExecuteParams as SessionProxyExecuteParams,
5018
+ type SessionSearchParams as SessionSearchParams,
5019
+ type SessionToolkitsParams as SessionToolkitsParams,
5020
+ type SessionToolsParams as SessionToolsParams,
5021
+ };
5022
+
5023
+ export {
5024
+ Files as Files,
5025
+ type FileListResponse as FileListResponse,
5026
+ type FileDeleteResponse as FileDeleteResponse,
5027
+ type FileCreateDownloadURLResponse as FileCreateDownloadURLResponse,
5028
+ type FileCreateUploadURLResponse as FileCreateUploadURLResponse,
5029
+ type FileListParams as FileListParams,
5030
+ type FileDeleteParams as FileDeleteParams,
5031
+ type FileCreateDownloadURLParams as FileCreateDownloadURLParams,
5032
+ type FileCreateUploadURLParams as FileCreateUploadURLParams,
5033
+ };
5034
+ }