-
feat(connected-accounts-py): namespace SHARED-connection surface under experimental (#3412)
发布于
2026-05-13 13:52:07 +00:00 Summary
Moves the SHARED connected-accounts surface in the Python SDK under the
composio.experimentalnamespace, mirroring the wire-level restructure
of the same fields. Same precedent ascomposio.experimental.tool/
composio.experimental.Toolkit— the namespace tells callers the shape
may still change.link()andsession.authorize(): flataccount_type/
acl_config_for_sharedkwargs → singleexperimental={}dictcomposio.connected_accounts.update_acl(...)→
composio.experimental.update_acl(...)composio.connected_accounts.list(...)now exposes
account_type='PRIVATE' | 'SHARED' | 'ALL'(flat — the wire keeps this
as a query param)composio-clientbumped1.38.0→1.39.0so the generated typed
client carries theExperimentalTypedDicts
Pinning a SHARED connection in a session (
connected_accounts={...})
and direct execute byconnected_account_idare unchanged — only the
connection-create / patch / authorize surfaces moved.Caller migration
# before composio.connected_accounts.link( user_id, auth_config_id, account_type="SHARED", acl_config_for_shared={"allow_all_users": True}, ) composio.connected_accounts.update_acl("ca_abc", allow_all_users=True) session.authorize( "github", account_type="SHARED", acl_config_for_shared={"allow_all_users": True}, ) # after composio.connected_accounts.link( user_id, auth_config_id, experimental={ "account_type": "SHARED", "acl_config_for_shared": {"allow_all_users": True}, }, ) composio.experimental.update_acl("ca_abc", allow_all_users=True) session.authorize( "github", experimental={ "account_type": "SHARED", "acl_config_for_shared": {"allow_all_users": True}, }, ) # new — list SHARED connections shared = composio.connected_accounts.list( account_type="SHARED", user_ids=["user_creator"], )Tests
link()forwards the experimental block / omits it when not provided
/ preserves explicit empty listslink()maps theacl_config_for_shared is only valid on SHARED400
toComposioAclOnlyForSharedError; non-ACL 400s re-raiseexperimental.update_acl()body construction, deny-list handling,
ValidationErrorwhen no fields provided,ValidationErrorwhen no
client is bound, same 400-mapper aslink()authorize()forwards the experimental blocklist(account_type="SHARED")delegates the flat filter through to the
client
Test plan
nox -s fmtandnox -s chkclean forcomposio/(pre-existing
4 mypy errors inproviders/langgraphandproviders/langchainare
unrelated — same onorigin/next)pytest tests/test_connected_accounts.py tests/test_tool_router.py→ 136 passed- Docs page update (separate PR — code samples already on the
experimental shape there;account_type=list filter example to be
added once this lands)
🤖 Generated with Claude Code
下载附件