@composio/client 2.0.0-rc.9 → 2.0.1

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 (563) hide show
  1. package/LICENSE +202 -0
  2. package/MIGRATION.md +164 -0
  3. package/README.md +503 -39
  4. package/dist/{session-configs-DC9dblKH.d.mts → _internal-tzmCmYGo.d.mts} +2495 -1747
  5. package/dist/_internal-u674nU6P.d.mts +281 -0
  6. package/dist/effect/internal.d.mts +9 -0
  7. package/dist/effect/internal.mjs +1 -0
  8. package/dist/effect/schemas/_internal/cli/create-codact-failure.d.mts +9 -0
  9. package/dist/effect/schemas/_internal/cli/create-codact-failure.mjs +17 -0
  10. package/dist/effect/schemas/_internal/cli/create-session.d.mts +12 -0
  11. package/dist/effect/schemas/_internal/cli/create-session.mjs +26 -0
  12. package/dist/effect/schemas/_internal/cli/get-session.d.mts +18 -0
  13. package/dist/effect/schemas/_internal/cli/get-session.mjs +48 -0
  14. package/dist/effect/schemas/_internal/cli/realtime/auth.d.mts +9 -0
  15. package/dist/effect/schemas/_internal/cli/realtime/auth.mjs +11 -0
  16. package/dist/effect/schemas/_internal/cli/realtime/credentials.d.mts +10 -0
  17. package/dist/effect/schemas/_internal/cli/realtime/credentials.mjs +12 -0
  18. package/dist/effect/schemas/_internal/consumer/permissions/resolve.d.mts +13 -0
  19. package/dist/effect/schemas/_internal/consumer/permissions/resolve.mjs +20 -0
  20. package/dist/effect/schemas/_internal/logs/tools/list-fields.d.mts +13 -0
  21. package/dist/effect/schemas/_internal/logs/tools/list-fields.mjs +13 -0
  22. package/dist/effect/schemas/_internal/logs/tools/list.d.mts +28 -0
  23. package/dist/effect/schemas/_internal/logs/tools/list.mjs +33 -0
  24. package/dist/effect/schemas/_internal/logs/tools/retrieve.d.mts +60 -0
  25. package/dist/effect/schemas/_internal/logs/tools/retrieve.mjs +74 -0
  26. package/dist/effect/schemas/_internal/logs/triggers/list.d.mts +34 -0
  27. package/dist/effect/schemas/_internal/logs/triggers/list.mjs +12 -0
  28. package/dist/effect/schemas/_internal/logs/triggers/retrieve.d.mts +33 -0
  29. package/dist/effect/schemas/_internal/logs/triggers/retrieve.mjs +9 -0
  30. package/dist/effect/schemas/_internal/org/consumer/list-connected-toolkits.d.mts +8 -0
  31. package/dist/effect/schemas/_internal/org/consumer/list-connected-toolkits.mjs +8 -0
  32. package/dist/effect/schemas/_internal/org/consumer/project/resolve.d.mts +20 -0
  33. package/dist/effect/schemas/_internal/org/consumer/project/resolve.mjs +31 -0
  34. package/dist/effect/schemas/_internal/org/consumer/retrieve-config.d.mts +10 -0
  35. package/dist/effect/schemas/_internal/org/consumer/retrieve-config.mjs +18 -0
  36. package/dist/effect/schemas/api-key-revocation/create.d.mts +8 -0
  37. package/dist/effect/schemas/api-key-revocation/create.mjs +8 -0
  38. package/dist/effect/schemas/auth/session/retrieve-info.d.mts +56 -0
  39. package/dist/effect/schemas/auth/session/retrieve-info.mjs +174 -0
  40. package/dist/effect/schemas/auth-configs/create.d.mts +16 -0
  41. package/dist/effect/schemas/auth-configs/create.mjs +22 -0
  42. package/dist/effect/schemas/auth-configs/delete.d.mts +10 -0
  43. package/dist/effect/schemas/auth-configs/delete.mjs +15 -0
  44. package/dist/effect/schemas/auth-configs/list.d.mts +55 -0
  45. package/dist/effect/schemas/auth-configs/list.mjs +67 -0
  46. package/dist/effect/schemas/auth-configs/retrieve.d.mts +49 -0
  47. package/dist/effect/schemas/auth-configs/retrieve.mjs +61 -0
  48. package/dist/effect/schemas/auth-configs/update-status.d.mts +9 -0
  49. package/dist/effect/schemas/auth-configs/update-status.mjs +11 -0
  50. package/dist/effect/schemas/auth-configs/update.d.mts +9 -0
  51. package/dist/effect/schemas/auth-configs/update.mjs +11 -0
  52. package/dist/effect/schemas/components/auth-config-retrieve-response-expected-input-fields.d.mts +17 -0
  53. package/dist/effect/schemas/components/auth-config-retrieve-response-expected-input-fields.mjs +22 -0
  54. package/dist/effect/schemas/components/auth-config-retrieve-response-tool-access-config.d.mts +9 -0
  55. package/dist/effect/schemas/components/auth-config-retrieve-response-tool-access-config.mjs +20 -0
  56. package/dist/effect/schemas/components/block-reason.d.mts +12 -0
  57. package/dist/effect/schemas/components/block-reason.mjs +14 -0
  58. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option1.d.mts +31 -0
  59. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option1.mjs +33 -0
  60. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option4.d.mts +33 -0
  61. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option4.mjs +35 -0
  62. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option5.d.mts +32 -0
  63. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option5.mjs +34 -0
  64. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1.d.mts +179 -0
  65. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1.mjs +113 -0
  66. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option10.d.mts +168 -0
  67. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option10.mjs +104 -0
  68. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option11.d.mts +140 -0
  69. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option11.mjs +76 -0
  70. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option12.d.mts +162 -0
  71. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option12.mjs +12 -0
  72. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option13.d.mts +202 -0
  73. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option13.mjs +130 -0
  74. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option14.d.mts +193 -0
  75. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option14.mjs +211 -0
  76. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option15.d.mts +176 -0
  77. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option15.mjs +86 -0
  78. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option1.d.mts +33 -0
  79. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option1.mjs +35 -0
  80. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option5.d.mts +35 -0
  81. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option5.mjs +37 -0
  82. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option6.d.mts +34 -0
  83. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option6.mjs +36 -0
  84. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2.d.mts +231 -0
  85. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2.mjs +160 -0
  86. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option2.d.mts +31 -0
  87. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option2.mjs +33 -0
  88. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option6.d.mts +31 -0
  89. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option6.mjs +33 -0
  90. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3.d.mts +171 -0
  91. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3.mjs +108 -0
  92. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option4.d.mts +139 -0
  93. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option4.mjs +74 -0
  94. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option5.d.mts +136 -0
  95. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option5.mjs +72 -0
  96. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option6.d.mts +139 -0
  97. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option6.mjs +98 -0
  98. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7-val.d.mts +159 -0
  99. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7-val.mjs +69 -0
  100. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7.d.mts +162 -0
  101. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7.mjs +12 -0
  102. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option8.d.mts +162 -0
  103. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option8.mjs +12 -0
  104. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option9.d.mts +167 -0
  105. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option9.mjs +101 -0
  106. package/dist/effect/schemas/components/connected-account-retrieve-response-state.d.mts +2443 -0
  107. package/dist/effect/schemas/components/connected-account-retrieve-response-state.mjs +42 -0
  108. package/dist/effect/schemas/components/deprecated-toolkit-info.d.mts +8 -0
  109. package/dist/effect/schemas/components/deprecated-toolkit-info.mjs +12 -0
  110. package/dist/effect/schemas/components/execute-blocked.d.mts +30 -0
  111. package/dist/effect/schemas/components/execute-blocked.mjs +24 -0
  112. package/dist/effect/schemas/components/execute-completed.d.mts +24 -0
  113. package/dist/effect/schemas/components/execute-completed.mjs +29 -0
  114. package/dist/effect/schemas/components/execute-failed.d.mts +24 -0
  115. package/dist/effect/schemas/components/execute-failed.mjs +29 -0
  116. package/dist/effect/schemas/components/execute-requires-user-input.d.mts +15 -0
  117. package/dist/effect/schemas/components/execute-requires-user-input.mjs +16 -0
  118. package/dist/effect/schemas/components/hook-result.d.mts +13 -0
  119. package/dist/effect/schemas/components/hook-result.mjs +15 -0
  120. package/dist/effect/schemas/components/instant-account.d.mts +12 -0
  121. package/dist/effect/schemas/components/instant-account.mjs +15 -0
  122. package/dist/effect/schemas/components/mcp-create-response-commands.d.mts +10 -0
  123. package/dist/effect/schemas/components/mcp-create-response-commands.mjs +24 -0
  124. package/dist/effect/schemas/components/mcp-list-response-items.d.mts +23 -0
  125. package/dist/effect/schemas/components/mcp-list-response-items.mjs +96 -0
  126. package/dist/effect/schemas/components/project-list-response-data.d.mts +21 -0
  127. package/dist/effect/schemas/components/project-list-response-data.mjs +74 -0
  128. package/dist/effect/schemas/components/proxy-execute-blocked.d.mts +24 -0
  129. package/dist/effect/schemas/components/proxy-execute-blocked.mjs +18 -0
  130. package/dist/effect/schemas/components/proxy-execute-completed.d.mts +25 -0
  131. package/dist/effect/schemas/components/proxy-execute-completed.mjs +38 -0
  132. package/dist/effect/schemas/components/session-create-response-config.d.mts +112 -0
  133. package/dist/effect/schemas/components/session-create-response-config.mjs +167 -0
  134. package/dist/effect/schemas/components/session-create-response-experimental-custom-toolkits.d.mts +20 -0
  135. package/dist/effect/schemas/components/session-create-response-experimental-custom-toolkits.mjs +25 -0
  136. package/dist/effect/schemas/components/session-create-response-warnings.d.mts +9 -0
  137. package/dist/effect/schemas/components/session-create-response-warnings.mjs +25 -0
  138. package/dist/effect/schemas/components/session-link-response-experimental.d.mts +13 -0
  139. package/dist/effect/schemas/components/session-link-response-experimental.mjs +18 -0
  140. package/dist/effect/schemas/components/session-retrieve-response-experimental.d.mts +37 -0
  141. package/dist/effect/schemas/components/session-retrieve-response-experimental.mjs +27 -0
  142. package/dist/effect/schemas/components/tool-details.d.mts +51 -0
  143. package/dist/effect/schemas/components/tool-details.mjs +144 -0
  144. package/dist/effect/schemas/components/tool-pricing.d.mts +9 -0
  145. package/dist/effect/schemas/components/tool-pricing.mjs +14 -0
  146. package/dist/effect/schemas/components/tool-router-session-v31-config-history-list-response.d.mts +123 -0
  147. package/dist/effect/schemas/components/tool-router-session-v31-config-history-list-response.mjs +178 -0
  148. package/dist/effect/schemas/components/tool-router-toolkits-list-response.d.mts +34 -0
  149. package/dist/effect/schemas/components/tool-router-toolkits-list-response.mjs +45 -0
  150. package/dist/effect/schemas/components/tool.d.mts +51 -0
  151. package/dist/effect/schemas/components/tool.mjs +144 -0
  152. package/dist/effect/schemas/components/toolkit-list-response-items.d.mts +36 -0
  153. package/dist/effect/schemas/components/toolkit-list-response-items.mjs +101 -0
  154. package/dist/effect/schemas/components/tools-paginated.d.mts +57 -0
  155. package/dist/effect/schemas/components/tools-paginated.mjs +15 -0
  156. package/dist/effect/schemas/components/trigger-retrieve-response-log.d.mts +31 -0
  157. package/dist/effect/schemas/components/trigger-retrieve-response-log.mjs +39 -0
  158. package/dist/effect/schemas/components/user-input-request.d.mts +11 -0
  159. package/dist/effect/schemas/components/user-input-request.mjs +19 -0
  160. package/dist/effect/schemas/connected-accounts/complete-auth.d.mts +9 -0
  161. package/dist/effect/schemas/connected-accounts/complete-auth.mjs +11 -0
  162. package/dist/effect/schemas/connected-accounts/create.d.mts +2457 -0
  163. package/dist/effect/schemas/connected-accounts/create.mjs +58 -0
  164. package/dist/effect/schemas/connected-accounts/delete.d.mts +9 -0
  165. package/dist/effect/schemas/connected-accounts/delete.mjs +17 -0
  166. package/dist/effect/schemas/connected-accounts/list.d.mts +2480 -0
  167. package/dist/effect/schemas/connected-accounts/list.mjs +84 -0
  168. package/dist/effect/schemas/connected-accounts/patch.d.mts +10 -0
  169. package/dist/effect/schemas/connected-accounts/patch.mjs +19 -0
  170. package/dist/effect/schemas/connected-accounts/refresh.d.mts +10 -0
  171. package/dist/effect/schemas/connected-accounts/refresh.mjs +27 -0
  172. package/dist/effect/schemas/connected-accounts/retrieve.d.mts +2477 -0
  173. package/dist/effect/schemas/connected-accounts/retrieve.mjs +81 -0
  174. package/dist/effect/schemas/connected-accounts/revoke.d.mts +12 -0
  175. package/dist/effect/schemas/connected-accounts/revoke.mjs +35 -0
  176. package/dist/effect/schemas/connected-accounts/update-status.d.mts +8 -0
  177. package/dist/effect/schemas/connected-accounts/update-status.mjs +11 -0
  178. package/dist/effect/schemas/custom/create-toolkit.d.mts +13 -0
  179. package/dist/effect/schemas/custom/create-toolkit.mjs +21 -0
  180. package/dist/effect/schemas/custom/delete-toolkit.d.mts +12 -0
  181. package/dist/effect/schemas/custom/delete-toolkit.mjs +17 -0
  182. package/dist/effect/schemas/custom/sync.d.mts +10 -0
  183. package/dist/effect/schemas/custom/sync.mjs +21 -0
  184. package/dist/effect/schemas/custom/update-toolkits.d.mts +8 -0
  185. package/dist/effect/schemas/custom/update-toolkits.mjs +8 -0
  186. package/dist/effect/schemas/custom/upsert.d.mts +8 -0
  187. package/dist/effect/schemas/custom/upsert.mjs +11 -0
  188. package/dist/effect/schemas/files/create-presigned-url.d.mts +15 -0
  189. package/dist/effect/schemas/files/create-presigned-url.mjs +15 -0
  190. package/dist/effect/schemas/files/list.d.mts +18 -0
  191. package/dist/effect/schemas/files/list.mjs +20 -0
  192. package/dist/effect/schemas/keyring/list-transfer-keys.d.mts +17 -0
  193. package/dist/effect/schemas/keyring/list-transfer-keys.mjs +19 -0
  194. package/dist/effect/schemas/link/create.d.mts +19 -0
  195. package/dist/effect/schemas/link/create.mjs +18 -0
  196. package/dist/effect/schemas/logs/create-tool-execution.d.mts +25 -0
  197. package/dist/effect/schemas/logs/create-tool-execution.mjs +39 -0
  198. package/dist/effect/schemas/logs/retrieve-tool-execution.d.mts +37 -0
  199. package/dist/effect/schemas/logs/retrieve-tool-execution.mjs +51 -0
  200. package/dist/effect/schemas/mcp/create-instance.d.mts +12 -0
  201. package/dist/effect/schemas/mcp/create-instance.mjs +29 -0
  202. package/dist/effect/schemas/mcp/create.d.mts +23 -0
  203. package/dist/effect/schemas/mcp/create.mjs +67 -0
  204. package/dist/effect/schemas/mcp/custom/create.d.mts +17 -0
  205. package/dist/effect/schemas/mcp/custom/create.mjs +48 -0
  206. package/dist/effect/schemas/mcp/delete-instance.d.mts +9 -0
  207. package/dist/effect/schemas/mcp/delete-instance.mjs +11 -0
  208. package/dist/effect/schemas/mcp/delete.d.mts +9 -0
  209. package/dist/effect/schemas/mcp/delete.mjs +17 -0
  210. package/dist/effect/schemas/mcp/generate/url.d.mts +10 -0
  211. package/dist/effect/schemas/mcp/generate/url.mjs +21 -0
  212. package/dist/effect/schemas/mcp/list-instances.d.mts +18 -0
  213. package/dist/effect/schemas/mcp/list-instances.mjs +56 -0
  214. package/dist/effect/schemas/mcp/list.d.mts +27 -0
  215. package/dist/effect/schemas/mcp/list.mjs +19 -0
  216. package/dist/effect/schemas/mcp/retrieve-app.d.mts +27 -0
  217. package/dist/effect/schemas/mcp/retrieve-app.mjs +19 -0
  218. package/dist/effect/schemas/mcp/retrieve.d.mts +24 -0
  219. package/dist/effect/schemas/mcp/retrieve.mjs +68 -0
  220. package/dist/effect/schemas/mcp/update.d.mts +24 -0
  221. package/dist/effect/schemas/mcp/update.mjs +68 -0
  222. package/dist/effect/schemas/org/list.d.mts +17 -0
  223. package/dist/effect/schemas/org/list.mjs +22 -0
  224. package/dist/effect/schemas/org/owner/project/create.d.mts +10 -0
  225. package/dist/effect/schemas/org/owner/project/create.mjs +22 -0
  226. package/dist/effect/schemas/org/owner/project/delete.d.mts +9 -0
  227. package/dist/effect/schemas/org/owner/project/delete.mjs +17 -0
  228. package/dist/effect/schemas/org/owner/project/list.d.mts +27 -0
  229. package/dist/effect/schemas/org/owner/project/list.mjs +15 -0
  230. package/dist/effect/schemas/org/owner/project/regenerate-api-key.d.mts +14 -0
  231. package/dist/effect/schemas/org/owner/project/regenerate-api-key.mjs +31 -0
  232. package/dist/effect/schemas/org/owner/project/retrieve.d.mts +27 -0
  233. package/dist/effect/schemas/org/owner/project/retrieve.mjs +93 -0
  234. package/dist/effect/schemas/org/project/list.d.mts +27 -0
  235. package/dist/effect/schemas/org/project/list.mjs +15 -0
  236. package/dist/effect/schemas/org/usage/retrieve-summary.d.mts +13 -0
  237. package/dist/effect/schemas/org/usage/retrieve-summary.mjs +15 -0
  238. package/dist/effect/schemas/org/usage/retrieve.d.mts +16 -0
  239. package/dist/effect/schemas/org/usage/retrieve.mjs +18 -0
  240. package/dist/effect/schemas/project/usage/retrieve-summary.d.mts +13 -0
  241. package/dist/effect/schemas/project/usage/retrieve-summary.mjs +15 -0
  242. package/dist/effect/schemas/project/usage/retrieve.d.mts +16 -0
  243. package/dist/effect/schemas/project/usage/retrieve.mjs +18 -0
  244. package/dist/effect/schemas/session-configs/list.d.mts +15 -0
  245. package/dist/effect/schemas/session-configs/list.mjs +26 -0
  246. package/dist/effect/schemas/session-configs/retrieve.d.mts +45 -0
  247. package/dist/effect/schemas/session-configs/retrieve.mjs +103 -0
  248. package/dist/effect/schemas/tool-router/session/attach.d.mts +157 -0
  249. package/dist/effect/schemas/tool-router/session/attach.mjs +30 -0
  250. package/dist/effect/schemas/tool-router/session/config-history.d.mts +122 -0
  251. package/dist/effect/schemas/tool-router/session/config-history.mjs +8 -0
  252. package/dist/effect/schemas/tool-router/session/create.d.mts +157 -0
  253. package/dist/effect/schemas/tool-router/session/create.mjs +45 -0
  254. package/dist/effect/schemas/tool-router/session/delete.d.mts +9 -0
  255. package/dist/effect/schemas/tool-router/session/delete.mjs +18 -0
  256. package/dist/effect/schemas/tool-router/session/execute-meta.d.mts +75 -0
  257. package/dist/effect/schemas/tool-router/session/execute-meta.mjs +17 -0
  258. package/dist/effect/schemas/tool-router/session/execute.d.mts +75 -0
  259. package/dist/effect/schemas/tool-router/session/execute.mjs +17 -0
  260. package/dist/effect/schemas/tool-router/session/files/create-download-url.d.mts +11 -0
  261. package/dist/effect/schemas/tool-router/session/files/create-download-url.mjs +13 -0
  262. package/dist/effect/schemas/tool-router/session/files/create-upload-url.d.mts +11 -0
  263. package/dist/effect/schemas/tool-router/session/files/create-upload-url.mjs +13 -0
  264. package/dist/effect/schemas/tool-router/session/files/delete.d.mts +9 -0
  265. package/dist/effect/schemas/tool-router/session/files/delete.mjs +11 -0
  266. package/dist/effect/schemas/tool-router/session/files/list.d.mts +14 -0
  267. package/dist/effect/schemas/tool-router/session/files/list.mjs +16 -0
  268. package/dist/effect/schemas/tool-router/session/link.d.mts +18 -0
  269. package/dist/effect/schemas/tool-router/session/link.mjs +25 -0
  270. package/dist/effect/schemas/tool-router/session/patch.d.mts +157 -0
  271. package/dist/effect/schemas/tool-router/session/patch.mjs +30 -0
  272. package/dist/effect/schemas/tool-router/session/proxy-execute.d.mts +52 -0
  273. package/dist/effect/schemas/tool-router/session/proxy-execute.mjs +15 -0
  274. package/dist/effect/schemas/tool-router/session/retrieve.d.mts +157 -0
  275. package/dist/effect/schemas/tool-router/session/retrieve.mjs +30 -0
  276. package/dist/effect/schemas/tool-router/session/search.d.mts +80 -0
  277. package/dist/effect/schemas/tool-router/session/search.mjs +78 -0
  278. package/dist/effect/schemas/tool-router/session/toolkits.d.mts +33 -0
  279. package/dist/effect/schemas/tool-router/session/toolkits.mjs +8 -0
  280. package/dist/effect/schemas/tool-router/session/tools.d.mts +56 -0
  281. package/dist/effect/schemas/tool-router/session/tools.mjs +8 -0
  282. package/dist/effect/schemas/toolkits/list.d.mts +42 -0
  283. package/dist/effect/schemas/toolkits/list.mjs +15 -0
  284. package/dist/effect/schemas/toolkits/recommend-scopes.d.mts +19 -0
  285. package/dist/effect/schemas/toolkits/recommend-scopes.mjs +21 -0
  286. package/dist/effect/schemas/toolkits/retrieve-categories.d.mts +15 -0
  287. package/dist/effect/schemas/toolkits/retrieve-categories.mjs +23 -0
  288. package/dist/effect/schemas/toolkits/retrieve-changelog.d.mts +16 -0
  289. package/dist/effect/schemas/toolkits/retrieve-changelog.mjs +16 -0
  290. package/dist/effect/schemas/toolkits/retrieve-multi.d.mts +42 -0
  291. package/dist/effect/schemas/toolkits/retrieve-multi.mjs +15 -0
  292. package/dist/effect/schemas/toolkits/retrieve-scopes-grant-context.d.mts +15 -0
  293. package/dist/effect/schemas/toolkits/retrieve-scopes-grant-context.mjs +17 -0
  294. package/dist/effect/schemas/toolkits/retrieve.d.mts +110 -0
  295. package/dist/effect/schemas/toolkits/retrieve.mjs +202 -0
  296. package/dist/effect/schemas/tools/execute.d.mts +12 -0
  297. package/dist/effect/schemas/tools/execute.mjs +35 -0
  298. package/dist/effect/schemas/tools/get-input.d.mts +9 -0
  299. package/dist/effect/schemas/tools/get-input.mjs +22 -0
  300. package/dist/effect/schemas/tools/list.d.mts +56 -0
  301. package/dist/effect/schemas/tools/list.mjs +8 -0
  302. package/dist/effect/schemas/tools/proxy.d.mts +16 -0
  303. package/dist/effect/schemas/tools/proxy.mjs +36 -0
  304. package/dist/effect/schemas/tools/retrieve-enum.d.mts +6 -0
  305. package/dist/effect/schemas/tools/retrieve-enum.mjs +8 -0
  306. package/dist/effect/schemas/tools/retrieve-required-scopes.d.mts +22 -0
  307. package/dist/effect/schemas/tools/retrieve-required-scopes.mjs +33 -0
  308. package/dist/effect/schemas/tools/retrieve.d.mts +50 -0
  309. package/dist/effect/schemas/tools/retrieve.mjs +8 -0
  310. package/dist/effect/schemas/trigger-instances/list-active.d.mts +37 -0
  311. package/dist/effect/schemas/trigger-instances/list-active.mjs +49 -0
  312. package/dist/effect/schemas/trigger-instances/manage/delete.d.mts +8 -0
  313. package/dist/effect/schemas/trigger-instances/manage/delete.mjs +11 -0
  314. package/dist/effect/schemas/trigger-instances/manage/update.d.mts +8 -0
  315. package/dist/effect/schemas/trigger-instances/manage/update.mjs +8 -0
  316. package/dist/effect/schemas/trigger-instances/upsert.d.mts +11 -0
  317. package/dist/effect/schemas/trigger-instances/upsert.mjs +22 -0
  318. package/dist/effect/schemas/triggers-types/list.d.mts +28 -0
  319. package/dist/effect/schemas/triggers-types/list.mjs +90 -0
  320. package/dist/effect/schemas/triggers-types/retrieve-enum.d.mts +6 -0
  321. package/dist/effect/schemas/triggers-types/retrieve-enum.mjs +8 -0
  322. package/dist/effect/schemas/triggers-types/retrieve.d.mts +22 -0
  323. package/dist/effect/schemas/triggers-types/retrieve.mjs +84 -0
  324. package/dist/effect/schemas/webhook-endpoints/create.d.mts +13 -0
  325. package/dist/effect/schemas/webhook-endpoints/create.mjs +15 -0
  326. package/dist/effect/schemas/webhook-endpoints/list.d.mts +12 -0
  327. package/dist/effect/schemas/webhook-endpoints/list.mjs +12 -0
  328. package/dist/effect/schemas/webhook-endpoints/replace.d.mts +13 -0
  329. package/dist/effect/schemas/webhook-endpoints/replace.mjs +15 -0
  330. package/dist/effect/schemas/webhook-endpoints/retrieve.d.mts +13 -0
  331. package/dist/effect/schemas/webhook-endpoints/retrieve.mjs +15 -0
  332. package/dist/effect/schemas/webhook-endpoints/update.d.mts +13 -0
  333. package/dist/effect/schemas/webhook-endpoints/update.mjs +15 -0
  334. package/dist/effect/schemas/webhook-subscriptions/create.d.mts +14 -0
  335. package/dist/effect/schemas/webhook-subscriptions/create.mjs +23 -0
  336. package/dist/effect/schemas/webhook-subscriptions/delete.d.mts +8 -0
  337. package/dist/effect/schemas/webhook-subscriptions/delete.mjs +8 -0
  338. package/dist/effect/schemas/webhook-subscriptions/list-event-types.d.mts +12 -0
  339. package/dist/effect/schemas/webhook-subscriptions/list-event-types.mjs +16 -0
  340. package/dist/effect/schemas/webhook-subscriptions/list.d.mts +20 -0
  341. package/dist/effect/schemas/webhook-subscriptions/list.mjs +29 -0
  342. package/dist/effect/schemas/webhook-subscriptions/retrieve.d.mts +14 -0
  343. package/dist/effect/schemas/webhook-subscriptions/retrieve.mjs +23 -0
  344. package/dist/effect/schemas/webhook-subscriptions/rotate-secret.d.mts +9 -0
  345. package/dist/effect/schemas/webhook-subscriptions/rotate-secret.mjs +14 -0
  346. package/dist/effect/schemas/webhook-subscriptions/update.d.mts +14 -0
  347. package/dist/effect/schemas/webhook-subscriptions/update.mjs +23 -0
  348. package/dist/effect/schemas.d.mts +9933 -0
  349. package/dist/effect/schemas.mjs +134 -0
  350. package/dist/effect.d.mts +509 -0
  351. package/dist/effect.mjs +1642 -0
  352. package/dist/environments-B7_vTiMY.d.mts +19 -0
  353. package/dist/environments-C4RXCqEC.mjs +230 -0
  354. package/dist/{error-DLB1uKM3.mjs → error-Bw7_G2NZ.mjs} +16 -8
  355. package/dist/{generated-operations-BDdFa2UY.mjs → generated-operations-D0eOQLVJ.mjs} +629 -275
  356. package/dist/index.d.mts +3 -5
  357. package/dist/index.mjs +132 -425
  358. package/dist/internal.d.mts +9 -0
  359. package/dist/internal.mjs +1 -0
  360. package/dist/pagination-rules-CMnBwktJ.mjs +36 -0
  361. package/dist/pagination.mjs +5 -9
  362. package/dist/resources/_internal/_internal.d.mts +2 -0
  363. package/dist/resources/_internal/_internal.mjs +16 -0
  364. package/dist/resources/_internal/cli/cli.d.mts +2 -0
  365. package/dist/resources/_internal/cli/cli.mjs +33 -0
  366. package/dist/resources/_internal/cli/realtime.d.mts +2 -0
  367. package/dist/resources/_internal/cli/realtime.mjs +20 -0
  368. package/dist/resources/_internal/cli.d.mts +2 -0
  369. package/dist/resources/_internal/cli.mjs +1 -0
  370. package/dist/resources/_internal/consumer/consumer.d.mts +2 -0
  371. package/dist/resources/_internal/consumer/consumer.mjs +8 -0
  372. package/dist/resources/_internal/consumer/permissions.d.mts +2 -0
  373. package/dist/resources/_internal/consumer/permissions.mjs +14 -0
  374. package/dist/resources/_internal/consumer.d.mts +2 -0
  375. package/dist/resources/_internal/consumer.mjs +1 -0
  376. package/dist/resources/_internal/logs/logs.d.mts +2 -0
  377. package/dist/resources/_internal/logs/logs.mjs +12 -0
  378. package/dist/resources/_internal/logs/tools.d.mts +2 -0
  379. package/dist/resources/_internal/logs/tools.mjs +24 -0
  380. package/dist/resources/_internal/logs/triggers.d.mts +2 -0
  381. package/dist/resources/_internal/logs/triggers.mjs +20 -0
  382. package/dist/resources/_internal/logs.d.mts +2 -0
  383. package/dist/resources/_internal/logs.mjs +1 -0
  384. package/dist/resources/_internal/org/consumer/consumer.d.mts +2 -0
  385. package/dist/resources/_internal/org/consumer/consumer.mjs +26 -0
  386. package/dist/resources/_internal/org/consumer/project.d.mts +2 -0
  387. package/dist/resources/_internal/org/consumer/project.mjs +15 -0
  388. package/dist/resources/_internal/org/consumer.d.mts +2 -0
  389. package/dist/resources/_internal/org/consumer.mjs +1 -0
  390. package/dist/resources/_internal/org/org.d.mts +2 -0
  391. package/dist/resources/_internal/org/org.mjs +8 -0
  392. package/dist/resources/_internal/org.d.mts +2 -0
  393. package/dist/resources/_internal/org.mjs +1 -0
  394. package/dist/resources/_internal.d.mts +2 -0
  395. package/dist/resources/_internal.mjs +1 -0
  396. package/dist/resources/api-key-revocation.d.mts +2 -2
  397. package/dist/resources/api-key-revocation.mjs +13 -2
  398. package/dist/resources/auth/auth.d.mts +2 -2
  399. package/dist/resources/auth/auth.mjs +7 -2
  400. package/dist/resources/auth/session.d.mts +2 -2
  401. package/dist/resources/auth/session.mjs +10 -2
  402. package/dist/resources/auth-configs.d.mts +2 -2
  403. package/dist/resources/auth-configs.mjs +45 -2
  404. package/dist/resources/auth.d.mts +2 -2
  405. package/dist/resources/auth.mjs +1 -5
  406. package/dist/resources/connected-accounts.d.mts +2 -2
  407. package/dist/resources/connected-accounts.mjs +70 -2
  408. package/dist/resources/custom.d.mts +2 -2
  409. package/dist/resources/custom.mjs +43 -2
  410. package/dist/resources/files.d.mts +2 -2
  411. package/dist/resources/files.mjs +22 -2
  412. package/dist/resources/keyring.d.mts +2 -2
  413. package/dist/resources/keyring.mjs +10 -2
  414. package/dist/resources/link.d.mts +2 -2
  415. package/dist/resources/link.mjs +13 -2
  416. package/dist/resources/logs/logs.d.mts +2 -2
  417. package/dist/resources/logs/logs.mjs +19 -2
  418. package/dist/resources/logs.d.mts +2 -2
  419. package/dist/resources/logs.mjs +1 -6
  420. package/dist/resources/mcp/custom.d.mts +2 -2
  421. package/dist/resources/mcp/custom.mjs +13 -2
  422. package/dist/resources/mcp/generate.d.mts +2 -2
  423. package/dist/resources/mcp/generate.mjs +13 -2
  424. package/dist/resources/mcp/mcp.d.mts +2 -2
  425. package/dist/resources/mcp/mcp.mjs +67 -2
  426. package/dist/resources/mcp.d.mts +2 -2
  427. package/dist/resources/mcp.mjs +1 -6
  428. package/dist/resources/org/org.d.mts +2 -2
  429. package/dist/resources/org/org.mjs +21 -2
  430. package/dist/resources/org/owner/owner.d.mts +2 -2
  431. package/dist/resources/org/owner/owner.mjs +7 -2
  432. package/dist/resources/org/owner/project.d.mts +2 -2
  433. package/dist/resources/org/owner/project.mjs +37 -2
  434. package/dist/resources/org/owner.d.mts +2 -2
  435. package/dist/resources/org/owner.mjs +1 -5
  436. package/dist/resources/org/project.d.mts +2 -2
  437. package/dist/resources/org/project.mjs +13 -2
  438. package/dist/resources/org/usage.d.mts +2 -2
  439. package/dist/resources/org/usage.mjs +22 -2
  440. package/dist/resources/org.d.mts +2 -2
  441. package/dist/resources/org.mjs +1 -9
  442. package/dist/resources/project/project.d.mts +2 -2
  443. package/dist/resources/project/project.mjs +7 -2
  444. package/dist/resources/project/usage.d.mts +2 -2
  445. package/dist/resources/project/usage.mjs +22 -2
  446. package/dist/resources/project.d.mts +2 -3
  447. package/dist/resources/project.mjs +1 -5
  448. package/dist/resources/session-configs.d.mts +2 -2
  449. package/dist/resources/session-configs.mjs +8 -12
  450. package/dist/resources/tool-router/session/files.d.mts +2 -2
  451. package/dist/resources/tool-router/session/files.mjs +40 -2
  452. package/dist/resources/tool-router/session/session.d.mts +2 -2
  453. package/dist/resources/tool-router/session/session.mjs +95 -2
  454. package/dist/resources/tool-router/session.d.mts +2 -2
  455. package/dist/resources/tool-router/session.mjs +1 -5
  456. package/dist/resources/tool-router/tool-router.d.mts +2 -2
  457. package/dist/resources/tool-router/tool-router.mjs +7 -2
  458. package/dist/resources/tool-router.d.mts +2 -2
  459. package/dist/resources/tool-router.mjs +1 -5
  460. package/dist/resources/toolkits.d.mts +2 -2
  461. package/dist/resources/toolkits.mjs +55 -2
  462. package/dist/resources/tools.d.mts +2 -2
  463. package/dist/resources/tools.mjs +56 -2
  464. package/dist/resources/trigger-instances/manage.d.mts +2 -2
  465. package/dist/resources/trigger-instances/manage.mjs +19 -2
  466. package/dist/resources/trigger-instances/trigger-instances.d.mts +2 -2
  467. package/dist/resources/trigger-instances/trigger-instances.mjs +24 -2
  468. package/dist/resources/trigger-instances.d.mts +2 -2
  469. package/dist/resources/trigger-instances.mjs +1 -5
  470. package/dist/resources/triggers-types.d.mts +2 -2
  471. package/dist/resources/triggers-types.mjs +26 -2
  472. package/dist/resources/webhook-endpoints.d.mts +2 -2
  473. package/dist/resources/webhook-endpoints.mjs +40 -2
  474. package/dist/resources/webhook-subscriptions.d.mts +2 -2
  475. package/dist/resources/webhook-subscriptions.mjs +45 -2
  476. package/package.json +42 -34
  477. package/dist/api-key-revocation-C9gI3mxD.mjs +0 -25
  478. package/dist/auth-configs-AfPOIrp_.mjs +0 -54
  479. package/dist/auth-mNBmShhc.mjs +0 -17
  480. package/dist/clanker-DuDWRKms.mjs +0 -24
  481. package/dist/cli-BL3iy1cn.mjs +0 -45
  482. package/dist/config-BLBbhLe1.mjs +0 -10
  483. package/dist/config-DnyMhILW.d.mts +0 -9
  484. package/dist/connected-accounts-CDAYy93Y.mjs +0 -82
  485. package/dist/consumer-xMnRU0C0.mjs +0 -34
  486. package/dist/custom-CG287eyS.mjs +0 -24
  487. package/dist/custom-D5-KtFkx.mjs +0 -31
  488. package/dist/files-7nQzcAPu.mjs +0 -49
  489. package/dist/files-DfXyjBsv.mjs +0 -31
  490. package/dist/generate-Deely-Rs.mjs +0 -24
  491. package/dist/keyring-BU1WNke6.mjs +0 -17
  492. package/dist/link-BgM_kX73.mjs +0 -23
  493. package/dist/logs-CvGKikGY.mjs +0 -38
  494. package/dist/manage-D3woWCHa.mjs +0 -28
  495. package/dist/mcp-C9lPgg0I.mjs +0 -91
  496. package/dist/migration-CBhnoN-Y.mjs +0 -10
  497. package/dist/migration-CKGKuRO3.d.mts +0 -9
  498. package/dist/org-D490cmfQ.mjs +0 -45
  499. package/dist/owner-DUnkjEA9.mjs +0 -17
  500. package/dist/project-61Vi9ABS.mjs +0 -47
  501. package/dist/project-BmLu0B1A.mjs +0 -22
  502. package/dist/project-BoZ_FkAd.mjs +0 -25
  503. package/dist/project-DJCRMUWP.mjs +0 -29
  504. package/dist/realtime-D92CAeH1.mjs +0 -28
  505. package/dist/resources/auth/index.d.mts +0 -2
  506. package/dist/resources/auth/index.mjs +0 -4
  507. package/dist/resources/cli/cli.d.mts +0 -2
  508. package/dist/resources/cli/cli.mjs +0 -3
  509. package/dist/resources/cli/index.d.mts +0 -2
  510. package/dist/resources/cli/index.mjs +0 -4
  511. package/dist/resources/cli/realtime.d.mts +0 -2
  512. package/dist/resources/cli/realtime.mjs +0 -3
  513. package/dist/resources/cli.d.mts +0 -2
  514. package/dist/resources/cli.mjs +0 -5
  515. package/dist/resources/index.d.mts +0 -3
  516. package/dist/resources/index.mjs +0 -16
  517. package/dist/resources/logs/index.d.mts +0 -2
  518. package/dist/resources/logs/index.mjs +0 -5
  519. package/dist/resources/logs/tools.d.mts +0 -2
  520. package/dist/resources/logs/tools.mjs +0 -3
  521. package/dist/resources/logs/triggers.d.mts +0 -2
  522. package/dist/resources/logs/triggers.mjs +0 -3
  523. package/dist/resources/mcp/index.d.mts +0 -2
  524. package/dist/resources/mcp/index.mjs +0 -5
  525. package/dist/resources/migration.d.mts +0 -2
  526. package/dist/resources/migration.mjs +0 -3
  527. package/dist/resources/org/clanker.d.mts +0 -2
  528. package/dist/resources/org/clanker.mjs +0 -3
  529. package/dist/resources/org/consumer/consumer.d.mts +0 -2
  530. package/dist/resources/org/consumer/consumer.mjs +0 -3
  531. package/dist/resources/org/consumer/index.d.mts +0 -2
  532. package/dist/resources/org/consumer/index.mjs +0 -4
  533. package/dist/resources/org/consumer/project.d.mts +0 -2
  534. package/dist/resources/org/consumer/project.mjs +0 -3
  535. package/dist/resources/org/consumer.d.mts +0 -2
  536. package/dist/resources/org/consumer.mjs +0 -5
  537. package/dist/resources/org/index.d.mts +0 -2
  538. package/dist/resources/org/index.mjs +0 -8
  539. package/dist/resources/org/owner/index.d.mts +0 -2
  540. package/dist/resources/org/owner/index.mjs +0 -4
  541. package/dist/resources/project/config.d.mts +0 -2
  542. package/dist/resources/project/config.mjs +0 -3
  543. package/dist/resources/project/index.d.mts +0 -3
  544. package/dist/resources/project/index.mjs +0 -4
  545. package/dist/resources/tool-router/index.d.mts +0 -2
  546. package/dist/resources/tool-router/index.mjs +0 -4
  547. package/dist/resources/tool-router/session/index.d.mts +0 -2
  548. package/dist/resources/tool-router/session/index.mjs +0 -4
  549. package/dist/resources/trigger-instances/index.d.mts +0 -2
  550. package/dist/resources/trigger-instances/index.mjs +0 -4
  551. package/dist/session-CuxeTn6B.mjs +0 -22
  552. package/dist/session-Ko7BIjgq.mjs +0 -110
  553. package/dist/tool-router-CBKKosNd.mjs +0 -14
  554. package/dist/toolkits-3DF2HJzj.mjs +0 -62
  555. package/dist/tools-CHZz5vhP.mjs +0 -33
  556. package/dist/tools-CZ866I6_.mjs +0 -68
  557. package/dist/trigger-instances-Db9jhHWY.mjs +0 -35
  558. package/dist/triggers-CDhM0b24.mjs +0 -28
  559. package/dist/triggers-types-C6SEunIK.mjs +0 -34
  560. package/dist/usage-7j_ne9rG.mjs +0 -31
  561. package/dist/usage-CE6S407C.mjs +0 -31
  562. package/dist/webhook-endpoints-DWS1Ycp6.mjs +0 -51
  563. package/dist/webhook-subscriptions-DgL5Qp1f.mjs +0 -55
package/README.md CHANGED
@@ -1,22 +1,76 @@
1
1
  # composio-client
2
2
 
3
- Composio API client for TypeScript, generated from the [v3.1 OpenAPI spec](https://staging-backend.composio.dev/api/v3.1/openapi.json) with [hey-api](https://heyapi.dev).
3
+ TypeScript and Python clients for the Composio v3.1 API. The checked-in OpenAPI snapshot supplies
4
+ 116 operations, including explicitly unsupported internal operations used by Composio's own SDKs.
5
+ Use the Promise client at the package root, the optional [Effect client](#effect), or the
6
+ [Python sync and async clients](./python/README.md).
4
7
 
5
- This repo is the successor to the Stainless-generated [`@composio/client`](https://www.npmjs.com/package/@composio/client) (Stainless is sunsetting). Current scope: the full `/api/v3.1` surface — all 104 released operations — in **both** languages: TypeScript at the package root, and Python in [`python/`](./python/README.md) (PyPI takeover pending). Migration is tracked on the wayfinder map [UXE-152](https://linear.app/composio/issue/UXE-152).
8
+ ## Install
9
+
10
+ Node.js 22 or newer is required.
11
+
12
+ ```sh
13
+ pnpm add @composio/client
14
+ ```
15
+
16
+ See [Upgrading to 2.0](#upgrading-to-20) for intentional compatibility changes from the previous
17
+ Stainless client and earlier 2.0 release candidates.
6
18
 
7
19
  ## Usage
8
20
 
9
- The package root is the Stainless-compatible drop-in surface: `new Composio({ apiKey })`, the Stainless type names, and throwing `APIPromise` semantics (shipped via UXE-163/UXE-164).
21
+ Construct a Promise client with explicit authentication:
10
22
 
11
23
  ```ts
12
- import Composio from '@composio/client'
24
+ import Composio, { Auth } from '@composio/client'
13
25
 
14
- const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY })
26
+ const composio = new Composio({ auth: Auth.project(process.env.COMPOSIO_API_KEY!) })
15
27
 
16
28
  const session = await composio.toolRouter.session.create({ user_id: 'user_123' })
17
29
  console.log(session.session_id, session.mcp.url)
18
30
  ```
19
31
 
32
+ ### Authentication and scope
33
+
34
+ `auth` is required and says how every request authenticates. A request carries at most one Composio
35
+ credential.
36
+
37
+ | `auth` | Sends |
38
+ | --- | --- |
39
+ | `Auth.project(key)` | `x-api-key` on every request to the API origin |
40
+ | `Auth.user(key)` | `x-user-api-key` on every request to the API origin |
41
+ | `Auth.organization(key)` | `x-org-api-key` on every request to the API origin |
42
+ | `Auth.auto({ project, user, organization })` | one of the keys given, chosen per operation: the project key wherever the operation accepts it, otherwise the first scheme it declares that a key is given for. This is how releases before rc.18 chose |
43
+ | `Auth.none()` | no credential. The credential header names are then ordinary headers, for a client used as a transport for schemes it does not model |
44
+
45
+ A fixed mode never consults the operation table. A key may be a function that returns one (or a
46
+ promise of one): it is called once per call, after the call starts, and its key is reused across
47
+ retries and same-origin redirects. It is not called for a call that starts off the API origin.
48
+ `client.authMode` reads the mode back; the client never returns a credential it was given as a
49
+ function.
50
+
51
+ `scope` names the organization and project the client addresses, sent as `x-org-id` and
52
+ `x-project-id` on requests to the API origin: `{ organizationId }`, `{ projectId }`, or both.
53
+
54
+ ```ts
55
+ const composio = new Composio({
56
+ auth: Auth.user(() => vault.read('composio-user-key')),
57
+ scope: { organizationId: 'org_123', projectId: 'pr_456' },
58
+ })
59
+ ```
60
+
61
+ A header name is reserved while something is configured to write it: the three credential names
62
+ while `auth` is not `none`, `x-org-id` and `x-project-id` while `scope` is set, and the identity
63
+ names as [below](#identify-the-calling-product). `defaultHeaders` and `COMPOSIO_CUSTOM_HEADERS` that
64
+ name a reserved header fail construction, and a call's `headers` that name one fail the call before
65
+ anything is sent. A client that needs another credential or scope derives one:
66
+ `composio.withOptions({ auth: Auth.project(key) })`. `withOptions` re-runs every construction check.
67
+
68
+ Three operations declare a credential or scope id as a header parameter
69
+ (`_internal.org.consumer.project.resolve`, `_internal.org.consumer.listConnectedToolkits`,
70
+ `_internal.cli.createCodactFailure`).
71
+ Their signatures are unchanged: the value replaces the configured credential for that call, and an
72
+ `x-org-id` that disagrees with the configured `scope` fails the call.
73
+
20
74
  ### Pagination
21
75
 
22
76
  Use the `@composio/client/pagination` subpath to traverse list operations that return the standard
@@ -65,79 +119,484 @@ cursor ends traversal. When a response omits `next_cursor` but numeric `current_
65
119
  returning partial results; provide a custom adapter for that response shape. Requests are sequential
66
120
  and inherit the normal client retry/backoff path, but this is not proactive/shared rate-limit pacing.
67
121
 
68
- Use `fromEnv` when configuration must come from a specific environment snapshot instead of the
69
- host process. Explicit options replace mapped values, so this is safe for tests, workers, and
70
- applications that load configuration themselves:
122
+ The constructor reads nothing from the process. `Composio.fromEnv` is the one reader of the
123
+ environment, and it reads the mapping it is handed:
71
124
 
72
125
  ```ts
73
- const composio = Composio.fromEnv(config, { environment: 'staging' })
126
+ const composio = Composio.fromEnv(process.env, { baseURL: 'https://staging-backend.composio.dev' })
74
127
  ```
75
128
 
76
- `fromEnv` recognizes `COMPOSIO_API_KEY`, `COMPOSIO_USER_API_KEY`, `COMPOSIO_ORG_API_KEY`,
77
- `COMPOSIO_BASE_URL`, `COMPOSIO_ALLOW_INSECURE_HTTP`, `COMPOSIO_CUSTOM_HEADERS`, and
78
- `COMPOSIO_LOG_LEVEL`. Derived clients created with `withOptions()` keep using the resolved snapshot and do
79
- not fall back to ambient values.
129
+ `fromEnv` reads `COMPOSIO_API_KEY`, `COMPOSIO_USER_API_KEY` and `COMPOSIO_ORG_API_KEY` into `auth`
130
+ (one set: that fixed mode; several: `Auth.auto`; none: `Auth.none()`), and `COMPOSIO_BASE_URL`,
131
+ `COMPOSIO_ALLOW_INSECURE_HTTP=1`, `COMPOSIO_CUSTOM_HEADERS` (as `defaultHeaders`) and
132
+ `COMPOSIO_LOG_LEVEL`. It does not read `COMPOSIO_ORG_ID` or `COMPOSIO_PROJECT_ID`: `scope` is always
133
+ an argument. An override replaces the whole field it names, so `{ auth: Auth.none() }` means none
134
+ whatever the mapping holds. Derived clients created with `withOptions()` keep using the resolved
135
+ snapshot.
80
136
 
81
137
  Inject a `Transport` when an application or test needs to own HTTP dispatch. The transport receives
82
138
  a complete `Request`; retries, credential-safe redirects, timeouts, and response parsing stay in the
83
139
  client:
84
140
 
85
141
  ```ts
86
- import Composio, { createFetchTransport } from '@composio/client'
142
+ import Composio, { Auth, createFetchTransport } from '@composio/client'
87
143
 
88
144
  const transport = createFetchTransport({ fetch: instrumentedFetch })
89
- const composio = new Composio({ apiKey, transport })
145
+ const composio = new Composio({ auth: Auth.project(apiKey), transport })
90
146
  ```
91
147
 
92
- Existing `fetch` and `fetchOptions` constructor options remain supported. They cannot be combined
93
- with `transport` because a request can have only one HTTP dispatcher.
148
+ Without a `transport`, the client resolves `globalThis.fetch` when a request is sent, so late
149
+ polyfills and test interceptors keep working. A custom `fetch` or extra `RequestInit` defaults go
150
+ through `createFetchTransport({ fetch, defaults })`; the former `fetch`, `fetchOptions` and
151
+ `defaultQuery` constructor options are gone (see the upgrade section).
152
+
153
+ `toolkits.retrieveChangelog` keeps its existing options argument on both TypeScript entries.
154
+ Pass its optional user filter as `retrieveChangelog({ query: { user_id: 'user-42' } })`;
155
+ headers and other request options stay in that same object.
94
156
 
95
- ## Upgrade from Stainless 0.1.x to 2.0
157
+ ### Retries and timeouts
96
158
 
97
- By default, the 2.0 client refuses to send credentials over plain HTTP unless the hostname is
98
- loopback. For a trusted development backend such as Docker's host gateway, opt in to the exact
99
- configured origin:
159
+ GET, HEAD, OPTIONS, PUT and DELETE calls retry up to twice on connection errors, timeouts and
160
+ retryable HTTP responses. POST and PATCH calls are sent once by default, including tool execution:
161
+ a lost response may hide a successful write. A client-level `maxRetries` only applies to idempotent
162
+ methods. A call that is safe to repeat opts in with `{ maxRetries: 2 }` in its request options.
163
+ An `idempotencyKey` sends a header; server deduplication is not guaranteed, and it does not opt a
164
+ write into retries. Timeouts default to one minute per attempt.
165
+
166
+ ### Internal operations
167
+
168
+ The spec publishes some operations for Composio's own CLI and SDKs and tags them `x-internal`: CLI
169
+ login sessions, realtime credentials, the execution and trigger logs, and the consumer-project
170
+ routes. They are under `client._internal`, they carry no compatibility promise, and any release may
171
+ change them. The property exists on every client, but the root types do not name it, so it stays
172
+ out of autocompletion. A program that needs it imports the opt-in subpath once:
100
173
 
101
174
  ```ts
102
- const composio = new Composio({
103
- apiKey,
104
- baseURL: 'http://host.docker.internal:9900',
105
- allowInsecureHTTP: true,
106
- })
175
+ import type {} from '@composio/client/internal' // `@composio/client/effect/internal` for the Effect client
176
+
177
+ const session = await composio._internal.cli.getSession({ id })
107
178
  ```
108
179
 
109
- The equivalent environment configuration is:
180
+ Their types are under `@composio/client/resources/_internal/*`. The previous-release gate does not
181
+ pin them. In Python the same operations are `client._internal.cli.get_session(...)`.
182
+
183
+ ## Handle API errors
184
+
185
+ Awaiting a failed call throws an `APIError` subclass, such as `NotFoundError` or `RateLimitError`,
186
+ exported from `@composio/client`. Status errors carry `status`, `requestId`, and `details` when the
187
+ API returned a Composio error envelope. Connection failures, timeouts and caller cancellation use
188
+ `APIConnectionError`, `APIConnectionTimeoutError` and `APIUserAbortError` respectively.
189
+
190
+ Use `.withResponse()` for parsed data plus response metadata. Use `.asResponse()` to inspect the raw
191
+ response, including a non-success HTTP status, without parsing it into an exception.
192
+
193
+ ## Effect
194
+
195
+ `@composio/client/effect` is the same API surface for applications written with
196
+ [Effect](https://effect.website). Every operation returns an `Effect` whose failures are tagged
197
+ errors, the transport is the `HttpClient` in context, and interrupting a call aborts its request.
198
+
199
+ Use it when the calling code is already Effect code and would otherwise wrap each call in
200
+ `Effect.tryPromise` and inspect what was thrown. Otherwise use the package root: it needs no peer
201
+ dependency, loads faster and spends less time per request (see [Performance](#performance)).
202
+
203
+ The accessor chains, method names, argument order and request and response types are the root
204
+ client's, and a call sends the same method, URL, body and headers as the root client does for the same
205
+ input. All 116 operations of the spec are there.
206
+
207
+ ### Install
110
208
 
111
209
  ```sh
112
- COMPOSIO_BASE_URL=http://host.docker.internal:9900 \
113
- COMPOSIO_ALLOW_INSECURE_HTTP=1
210
+ pnpm add @composio/client 'effect@>=4.0.3 <4.2.0'
211
+ ```
212
+
213
+ `effect` is an optional peer dependency. Effect 4.1 requires Node.js 22.19 or newer.
214
+ The root entry and the `./pagination` and `./resources/*` subpaths never import it and load without it.
215
+
216
+ - **Supported range: `effect >=4.0.3 <4.2.0`.** The manifest declares the peer as `*`, because a
217
+ bounded optional peer makes npm refuse the whole install for a project that lists some other
218
+ `effect` and never imports this subpath. The cost is that a package manager does not warn about an
219
+ unsupported version. The range above is the one the subpath is tested against.
220
+ - **Install exactly one copy of `effect`.** With two copies, even one patch apart, the project does
221
+ not type-check: the client's `Effect`, `Layer` and `HttpClient` are not assignable to the
222
+ application's. At run time `Redacted` values do not cross between copies and `instanceof` is false,
223
+ and nothing warns about it.
224
+ - **The supported range bounds your Effect upgrades.** The client runs on the application's `effect`,
225
+ so moving to a new Effect minor waits for a client release whose supported range includes it.
226
+
227
+ ### Construct a client
228
+
229
+ ```ts
230
+ import { Effect, Layer } from 'effect'
231
+ import * as FetchHttpClient from 'effect/http/FetchHttpClient'
232
+ import { Auth, ComposioClient, layer, layerConfig } from '@composio/client/effect'
233
+
234
+ // Explicit options, over the `HttpClient` the application provides; here a fetch-backed one.
235
+ const live = layer({ auth: Auth.project('your-api-key') }).pipe(Layer.provide(FetchHttpClient.layer))
236
+
237
+ // Options read from the `COMPOSIO_*` settings.
238
+ const fromConfig = layerConfig().pipe(Layer.provide(FetchHttpClient.layer))
239
+
240
+ const program = Effect.gen(function* () {
241
+ const composio = yield* ComposioClient
242
+ const toolkit = yield* composio.toolkits.retrieve('github')
243
+ return toolkit.slug
244
+ })
245
+
246
+ const slug: Promise<string> = Effect.runPromise(program.pipe(Effect.provide(live)))
114
247
  ```
115
248
 
116
- The opt-in records the resolved scheme, hostname, and port. Mutating `baseURL` cannot broaden it,
117
- and `withOptions({ baseURL: ... })` requires `allowInsecureHTTP: true` again when the origin
118
- changes. Redirects to another origin remain credential-free.
249
+ `make(options, httpClient)` builds the same client synchronously from an `HttpClient` you already
250
+ hold, and throws where the layers fail.
251
+
252
+ `auth` and `scope` mean what they mean on the root client (see
253
+ [Authentication and scope](#authentication-and-scope)), and `Auth` is exported from
254
+ `@composio/client/effect` too. A key may also be a `Redacted<string>`, or a function returning a
255
+ string or a `Redacted<string>`. There is no `withOptions`: a client is a value, and a caller that
256
+ needs another credential calls `make` again with the same `HttpClient`.
257
+
258
+ Only `layerConfig` reads the environment. It reads `COMPOSIO_API_KEY`, `COMPOSIO_USER_API_KEY` and
259
+ `COMPOSIO_ORG_API_KEY` into `auth` by the rule `Composio.fromEnv` applies, each key `Redacted`
260
+ throughout, and `COMPOSIO_BASE_URL` and `COMPOSIO_ALLOW_INSECURE_HTTP=1`, through Effect's `Config`,
261
+ so the `ConfigProvider` in context decides where they come from; by default that is the process
262
+ environment. An option passed to `layerConfig` replaces the setting it names, so
263
+ `layerConfig({ auth: Auth.none() })` means none whatever is configured. `make` and `layer` read
264
+ nothing.
265
+
266
+ Construction fails with a `ConfigurationError` when a credentialed origin is not HTTPS (loopback and
267
+ `allowInsecureHTTP` excepted, as on the root client), when a key or a header option is refused, or
268
+ when `decode: true` is given without `schemas`. A credential provider that fails, or returns
269
+ something a header cannot carry, fails the call with a `ConfigurationError` before anything is sent.
270
+
271
+ The resources are plain objects of functions, not classes, so a method can be passed around without
272
+ binding. The root client's resources are the same since rc.20.
273
+
274
+ ### Errors
275
+
276
+ Every call fails with a `ComposioError`, a union of tagged errors. The tags are namespaced:
277
+
278
+ | Tag | When |
279
+ | --- | --- |
280
+ | `@composio/client/BadRequestError` | 400 |
281
+ | `@composio/client/AuthenticationError` | 401 |
282
+ | `@composio/client/PermissionDeniedError` | 403 |
283
+ | `@composio/client/NotFoundError` | 404 |
284
+ | `@composio/client/ConflictError` | 409 |
285
+ | `@composio/client/UnprocessableEntityError` | 422 |
286
+ | `@composio/client/RateLimitError` | 429 |
287
+ | `@composio/client/InternalServerError` | 500 and above |
288
+ | `@composio/client/APIError` | any other non-success status |
289
+ | `@composio/client/APIConnectionError` | the transport failed before a response |
290
+ | `@composio/client/APIConnectionTimeoutError` | an attempt outlived its time budget |
291
+ | `@composio/client/DecodeError` | a success body failed validation (only with `decode: true`) |
292
+ | `@composio/client/ConfigurationError` | no request can be made from this client or call |
293
+
294
+ ```ts
295
+ import { Effect } from 'effect'
296
+ import { isAPIError, type ComposioClientShape } from '@composio/client/effect'
297
+
298
+ const slugOrNull = (composio: ComposioClientShape, slug: string) =>
299
+ composio.toolkits.retrieve(slug).pipe(
300
+ Effect.map((toolkit) => toolkit.slug),
301
+ Effect.catchTag('@composio/client/NotFoundError', () => Effect.succeed(null)),
302
+ Effect.tapError((error) =>
303
+ isAPIError(error) ? Effect.logWarning(`${error.status} ${error.requestId}`) : Effect.void,
304
+ ),
305
+ )
306
+ ```
307
+
308
+ A status error carries `status`, `requestId`, `details` (the Composio error envelope, when the body
309
+ is one), `body`, `message`, `method` and `url`. `isAPIError` matches any status error and
310
+ `isComposioError` any error of the union; both test the tag, not the class. There is no access to the
311
+ raw response of a successful call.
312
+
313
+ Timeouts and retries follow the root client's policy: one minute per attempt by default. A
314
+ call whose method is idempotent (`GET`, `HEAD`, `OPTIONS`, `PUT`, `DELETE`) is retried up to 2 times
315
+ on a connection failure, a timeout, or a 408, 409, 429 or 5xx response. Any other call, `POST` and `PATCH` included, is sent once, because a write that failed in
316
+ flight may already have acted. A call that is safe to repeat opts back in with its own `maxRetries`:
317
+
318
+ ```ts
319
+ composio.toolRouter.session.search(sessionId, { queries }, { maxRetries: 2 })
320
+ ```
321
+
322
+ ### Streams
323
+
324
+ Fourteen cursor-paginated operations have a `<method>Stream` beside them that yields items across
325
+ pages:
326
+
327
+ - `authConfigs.listStream`, `connectedAccounts.listStream`, `files.listStream`,
328
+ `sessionConfigs.listStream`, `toolkits.listStream`, `toolkits.retrieveMultiStream`,
329
+ `tools.listStream`, `triggerInstances.listActiveStream`, `triggersTypes.listStream`,
330
+ `webhookSubscriptions.listStream`
331
+ - `toolRouter.session.configHistoryStream`, `toolRouter.session.toolkitsStream`,
332
+ `toolRouter.session.toolsStream`, `toolRouter.session.files.listStream`
333
+
334
+ ```ts
335
+ import { Stream } from 'effect'
336
+ import type { ComposioClientShape } from '@composio/client/effect'
337
+
338
+ const firstSlugs = (composio: ComposioClientShape) =>
339
+ composio.toolkits.listStream({ limit: 100 }).pipe(
340
+ Stream.map((toolkit) => toolkit.slug),
341
+ Stream.take(250),
342
+ Stream.runCollect,
343
+ )
344
+ ```
345
+
346
+ A page is requested only when the stream is pulled that far, so `Stream.take` above stops after the
347
+ third page. The cursor rules are those of `@composio/client/pagination`, and a traversal that cannot
348
+ continue — a cursor the server repeats, a page with no `items` array — fails with a
349
+ `ConfigurationError`.
350
+
351
+ No other operation has a stream. That includes the list operations whose page is not the standard
352
+ `items` and `next_cursor` shape: `org.list` (`organizations`), `org.project.list` and
353
+ `org.owner.project.list` (`data`), and `logs.createToolExecution` (`logs`). Page those by passing
354
+ `next_cursor` back yourself.
355
+
356
+ ### Per-call options
357
+
358
+ The last argument of every operation and raw method:
359
+
360
+ ```ts
361
+ import type { ComposioClientShape } from '@composio/client/effect'
362
+
363
+ const once = (composio: ComposioClientShape) =>
364
+ composio.toolkits.retrieve(
365
+ 'github',
366
+ {},
367
+ {
368
+ headers: { 'x-trace-id': 'abc', 'x-team': null }, // `null` removes a default header
369
+ maxRetries: 0,
370
+ timeout: 10_000, // milliseconds, per attempt
371
+ },
372
+ )
373
+ ```
374
+
375
+ Per-call headers win over the client's `defaultHeaders`. `decode` is the fourth option, described
376
+ next.
377
+
378
+ ### Decoding
379
+
380
+ By default a response body is returned as parsed and nothing checks it. Decoding is opt-in, per call
381
+ or as a client default, and needs the response schemas, which are a separate entry:
382
+
383
+ ```ts
384
+ import * as HttpClient from 'effect/http/HttpClient'
385
+ import { Effect } from 'effect'
386
+ import { Auth, make } from '@composio/client/effect'
387
+ import { schemaLoaders } from '@composio/client/effect/schemas'
388
+
389
+ const checkedCategories = (httpClient: HttpClient.HttpClient) => {
390
+ const composio = make({ auth: Auth.project('your-api-key'), schemas: schemaLoaders }, httpClient)
391
+ return composio.toolkits.retrieveCategories({ decode: true }).pipe(
392
+ Effect.catchTag('@composio/client/DecodeError', (error) =>
393
+ Effect.logError(`${error.operation}: ${JSON.stringify(error.issues)}`).pipe(Effect.as(null)),
394
+ ),
395
+ )
396
+ }
397
+ ```
398
+
399
+ - **It validates and changes nothing.** A call that passes returns the body exactly as it was parsed;
400
+ a field the API returns ahead of the spec is not stripped. The response type is the same either way.
401
+ - **`DecodeError`** carries `operation` (`toolkits.retrieveCategories`), `status`, `requestId`,
402
+ `method`, `url` and `issues`, each a `path` and a `kind` such as `MissingKey` or `InvalidType`. It
403
+ never carries the body or the value found: a success body is where this API returns secrets.
404
+ - **`decode: true` needs `schemas`.** As a client option without `schemas` it is a compile error, and a
405
+ `ConfigurationError` at construction for a caller the types did not reach. A per-call
406
+ `decode: true` on a client built without `schemas` fails with a `ConfigurationError` before
407
+ anything is sent.
408
+ - **Schemas load lazily.** `schemaLoaders` is a table of `import()` calls, one per operation. A schema
409
+ module is loaded by the first call that decodes its operation. A single schema can also be imported
410
+ directly, for example
411
+ `import { ToolkitRetrieveCategoriesResponse } from '@composio/client/effect/schemas/toolkits/retrieve-categories'`.
412
+ A decoding call also checks that the table contains its operation before sending the request. The
413
+ loader itself runs only after a non-204 success; a failed dynamic import can therefore fail a call
414
+ after the server has already processed it.
415
+ - **An application that never imports `@composio/client/effect/schemas` ships no schema.** The
416
+ `./effect` entry does not reach the table, so a bundler has no path to it.
417
+ - A 204 has no body to validate. A raw call is validated when its path is a declared operation's.
418
+
419
+ A schema is generated from the spec snapshot this version was built from, so decoding holds a
420
+ response to that snapshot. A response from before a required field existed fails: replaying stored
421
+ production responses through the schemas, the four `toolRouter.session` operations `create`,
422
+ `retrieve`, `attach` and `patch` failed on a missing `config.instant` for every capture through
423
+ 2026-09-11, taken before the spec declared that field, and passed for the 2026-10-08 capture, taken
424
+ after. The record is in [`docs/upstream-asks.md`](./docs/upstream-asks.md).
425
+
426
+ ### Tracing
427
+
428
+ One option, `tracing`, says what the client's own requests add to a trace:
429
+
430
+ | Value | Effect |
431
+ | --- | --- |
432
+ | `'off'` (default) | No span is opened for a request and no trace header is sent, so the request carries exactly the headers the root client sends. |
433
+ | `'span'` | Effect's `HttpClient` opens its client span around each request, a child of the span the call runs in. Nothing about it goes on the wire. |
434
+ | `'propagate'` | The span, also sent to the API as `b3` and `traceparent` headers. |
435
+
436
+ The option only ever reduces tracing, and only for this client's requests. A span asked for here is
437
+ still subject to the application's own `HttpClient.TracerDisabledWhen` and
438
+ `HttpClient.TracerPropagationEnabled`.
439
+
440
+ With a span on, the span ends on the client's own error, not on Effect's `HttpClientError`. That
441
+ error holds the request and its credential headers, and a tracer keeps what a span ended on. To do
442
+ this the client reassigns `end` on the span object the tracer returns, so a tracer that returns
443
+ frozen spans throws when a request starts. The replacement costs about a microsecond per request on
444
+ top of the span itself.
445
+
446
+ ### Credentials and redaction
447
+
448
+ A request carries at most one credential header, chosen by `auth` as on the root client:
449
+ `x-api-key`, `x-user-api-key` or `x-org-api-key`. The client holds every key as a `Redacted` value
450
+ and adds all three header names to Effect's redaction list for its requests, so spans and renderings
451
+ of a request show `<redacted>`; Effect's own list knows only `x-api-key`.
452
+
453
+ No error the client produces holds the request, the transport's error or a credential value. One
454
+ caveat: `APIConnectionError.description` is the transport's own message text, copied. A transport
455
+ that writes a header value into its error messages would put it there.
456
+
457
+ The credential is applied before the request reaches the `HttpClient`, so a transform the application
458
+ puts on its `HttpClient` sees it.
459
+
460
+ ### Redirects
461
+
462
+ The client follows redirects itself and withdraws credentials once a chain changes origin. It does so
463
+ by dispatching with `redirect: 'manual'`, which a fetch-backed `HttpClient` honors. The guarantee
464
+ holds only when nothing between the client and the wire follows redirects. An `HttpClient` wrapped in
465
+ `HttpClient.followRedirects`, or a transport that follows redirects on its own, forwards the
466
+ credential headers across origins and is unsupported for a credentialed client. Headers an
467
+ application places in `FetchHttpClient.RequestInit` are outside the client's credential handling:
468
+ the credential check does not see them, and they are not withdrawn on a cross-origin redirect.
469
+
470
+ ### Deprecation notices
471
+
472
+ A deprecated input, or a response carrying `Deprecation`, `Sunset` and `Link` headers, is reported
473
+ through `Effect.logWarning`, once per operation and notice for each client. The application's
474
+ `Logger` and `References.MinimumLogLevel` decide what becomes of it; there is no client option.
475
+ `isDeprecationNotice` recognises a notice, so a logger can drop or route the notices alone:
476
+
477
+ ```ts
478
+ import { isDeprecationNotice } from '@composio/client/effect'
479
+
480
+ const quiet = Logger.make((options) => (isDeprecationNotice(options) ? undefined : base.log(options)))
481
+ ```
482
+
483
+ ### Raw methods
484
+
485
+ `get`, `post`, `put`, `patch` and `delete` reach any path through the same kernel: credentials,
486
+ retries, timeouts, redirects and errors behave as for a generated method.
487
+
488
+ ```ts
489
+ import type { ComposioClientShape } from '@composio/client/effect'
490
+
491
+ const raw = (composio: ComposioClientShape) =>
492
+ composio.post<{ id: string }>('/api/v3.1/some/path', {
493
+ query: { dry_run: true },
494
+ body: { name: 'example' },
495
+ maxRetries: 0,
496
+ })
497
+ ```
498
+
499
+ The type argument is an assertion, not a check.
500
+
501
+ ### Performance
502
+
503
+ Measured against a mocked transport, so these are client overhead and say nothing about network
504
+ latency. The full tables and method are in
505
+ [`docs/benchmarks/client-overhead.md`](./docs/benchmarks/client-overhead.md); the figures below are
506
+ its 2026-10-13 runs on Node 24.17.0 and Bun 1.4.0, `effect` 4.0.3, one Apple M1 Pro.
507
+
508
+ **The Effect surface is slower per request than the root client.** Typed geometric mean over two
509
+ runs: 154.1% and 153.2% of the root client by default, 173.8% and 171.1% with `tracing: 'span'`. In
510
+ absolute terms that is 10 to 14 microseconds more per request, and 3 to 5 more with the span on. It
511
+ is a measurement, not a win; what it buys is the typed failure channel, interruption and a transport
512
+ taken from context.
513
+
514
+ **Decoding costs more than the request.** Validating a twenty-item `toolkits.list` page took a call
515
+ from 77.7 / 78.9 µs to 187.3 / 192.4 µs, about 110 µs or 5.5 µs per item.
516
+
517
+ **Import time**, over what Effect's own HTTP modules already cost, minimum / median of thirty in
518
+ milliseconds:
519
+
520
+ | | Node, modules | Node, bundle | Bun, modules | Bun, bundle |
521
+ | --- | ---: | ---: | ---: | ---: |
522
+ | `./effect`, never decodes | 4.2 / 4.5 | 4.7 / 4.8 | 3.6 / 2.8 | 11.2 / 11.7 |
523
+ | plus importing `schemaLoaders` | 2.4 / 0.2 | 5.3 / 5.2 | 0.2 / −0.7 | 3.6 / 3.8 |
524
+
525
+ The published-module lanes are noisy, which is how a difference comes out negative. Effect itself
526
+ is the larger part: 122.2 / 128.3 ms as modules on Node and 22.0 / 23.8 ms bundled, against 9.6 /
527
+ 10.5 ms and 4.0 / 4.4 ms for the root client.
528
+
529
+ **Bundle size** of a single-file consumer: Effect's HTTP modules alone, then with a client that never
530
+ decodes, then with the loader table and every schema it reaches.
531
+
532
+ | Bundler | Effect alone | never decodes | decodes |
533
+ | --- | ---: | ---: | ---: |
534
+ | rolldown | 498 kB | 732 kB | 893 kB |
535
+ | `bun build` | 266 kB | 705 kB | 1088 kB |
536
+
537
+ **Package weight.** The schema modules make the package larger on disk: 3.4 MB unpacked in 509 files,
538
+ of which 2.1 MB and 328 files are `dist/effect/schemas*`, against 1.1 MB in 176 files for
539
+ `2.0.0-rc.11` as published. None of it is on the root entry's import path.
540
+
541
+ ## Identify the calling product
542
+
543
+ A product built on the client passes `identity` instead of setting headers by hand. The root client
544
+ and `./effect` take the same option:
545
+
546
+ ```ts
547
+ const composio = new Composio({
548
+ auth: Auth.project(apiKey),
549
+ identity: { product: '@composio/core', version: '0.9.0', source: 'TYPESCRIPT_SDK', framework: 'openai' },
550
+ })
551
+ ```
552
+
553
+ | Header | Sent from | Without `identity` |
554
+ | --- | --- | --- |
555
+ | `x-client-provenance`, `x-client-version` | `product`, `version` | the package name and version |
556
+ | `x-sdk-version` | `version` | not sent |
557
+ | `x-source`, `x-framework` | `source`, `framework` | not sent |
558
+ | `x-runtime` | `runtime`, else the detected runtime | the detected runtime |
559
+ | `x-client-runtime`, `x-runtime-version` | the detected runtime | the detected runtime |
560
+ | `x-client-library`, `x-client-library-version`, `x-client-language` | the package | the package |
561
+
562
+ The three library headers are the package's own: `defaultHeaders`, `COMPOSIO_CUSTOM_HEADERS` and a
563
+ call's `headers` cannot set or delete them. Once `identity` is set, the same holds for every header
564
+ in the table. A refused name fails construction (`ComposioError`, or `ConfigurationError` on
565
+ `./effect`), or the call before anything is sent. Identity values must be non-empty printable ASCII
566
+ with no surrounding whitespace, and are sent to the configured API origin only.
567
+
568
+ The detected runtime is one of `nodejs`, `bun`, `deno`, `cloudflare`, `vercel_edge`, `netlify`,
569
+ `fastly` or `unknown`, checked in [`std-env`](https://github.com/unjs/std-env)'s order; the
570
+ Python client always reports `python`.
571
+
572
+ ## Upgrading to 2.0
573
+
574
+ Authentication is explicit, several legacy exports are removed, internal operations have moved,
575
+ and POST/PATCH retries now require per-call opt-in. Read the [TypeScript migration guide](./MIGRATION.md)
576
+ or [Python migration guide](./python/MIGRATION.md) before upgrading from Stainless or an earlier RC.
119
577
 
120
578
  ## Development
121
579
 
122
- Toolchain is pinned via [mise](https://mise.jdx.dev) (`mise install`): Node 24, pnpm 11, Python 3.13, uv. ESM-only, TypeScript 7 (native compiler for typechecking, `typescript@6` retained for tooling until 7.1 restores the compiler API).
580
+ Toolchain is pinned via [mise](https://mise.jdx.dev) (`mise install`): Node, Bun, pnpm, Python and uv. Exact versions live in `mise.toml`. ESM-only, TypeScript 7 (native compiler for typechecking, `typescript@6` retained for tooling until 7.1 restores the compiler API).
123
581
 
124
582
  ```sh
125
583
  pnpm install
126
- pnpm generate # hey-api + compat codegen: spec/openapi.json → src/generated + src/compat/resources (do not edit)
584
+ pnpm generate # hey-api + compat and Effect codegen: spec/openapi.json → src/generated, src/compat/resources, src/effect/generated (do not edit)
127
585
  pnpm lint # eslint over src, test, codegen, parity, and demo
128
586
  pnpm typecheck # tsgo (TS native), including type tests and demo
129
587
  pnpm typecheck:tsc # same programs under tsc — both compilers must pass
130
- pnpm codegen:check # verify committed src/compat/resources matches the generator
131
- pnpm test # unit tests (MSW mocks) + codegen tests
588
+ pnpm codegen:check # verify every committed generated tree matches the generator
589
+ pnpm test # offline unit, codegen, parity-harness and demo suites
132
590
  pnpm build # tsdown → dist/ (runs publint + arethetypeswrong)
133
- pnpm test:pack # pack the real tarball, typecheck + import every drop-in subpath
591
+ pnpm test:pack # installed export inventory, Effect consumers and optional-peer matrix
134
592
  pnpm benchmark:baseline # capture the dist/ a benchmark run compares against
135
- pnpm benchmark # score SDK overhead against that baseline and against Stainless
593
+ pnpm benchmark # score SDK overhead against that baseline
594
+ pnpm benchmark:import # time what importing each entry costs, on Node and Bun
136
595
  pnpm test:contract # live API tests; requires COMPOSIO_API_KEY (copy .env.example to .env)
137
596
  pnpm refresh-spec # re-fetch spec/openapi.json from the live backend
138
597
  ```
139
598
 
140
- `src/generated/` and `src/compat/resources/` are regenerated output — never edit them by hand; CI fails if they drift from `spec/openapi.json`.
599
+ `src/generated/`, `src/compat/resources/` and `src/effect/generated/` are regenerated output — never edit them by hand; CI fails if they drift from `spec/openapi.json`.
141
600
 
142
601
  ### Python lane
143
602
 
@@ -155,3 +614,8 @@ uv run pytest
155
614
  Client-overhead measurements use a deterministic in-memory transport and are documented in
156
615
  [`docs/benchmarks/client-overhead.md`](./docs/benchmarks/client-overhead.md). They do not measure API
157
616
  latency.
617
+
618
+ ## Contributing and security
619
+
620
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup and verification,
621
+ [SECURITY.md](./SECURITY.md) for private vulnerability reports, and [LICENSE](./LICENSE) for Apache-2.0.