@composio/client 2.0.0-rc.9 → 2.0.0

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