Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
Update client dependencies and add experimental assistive prompt (#2446)
Musthaq Ahamadb132aad90208
diff --git a/.changeset/fifty-terms-cross.md b/.changeset/fifty-terms-cross.mdnew file mode 100644index 000000000..7a856b95a--- /dev/null+++ b/.changeset/fifty-terms-cross.md@@ -0,0 +1,5 @@+---+'@composio/core': patch+---++Update client dependencies and introduce experimentatl tool router featuresdiff --git a/fern/pages/src/changelog/01-22-26-experimental-assistive-prompts.md b/fern/pages/src/changelog/01-22-26-experimental-assistive-prompts.mdnew file mode 100644index 000000000..1b533d6b4--- /dev/null+++ b/fern/pages/src/changelog/01-22-26-experimental-assistive-prompts.md@@ -0,0 +1,113 @@+# Experimental Assistive Prompts and API Updates++## Version Information++### TypeScript/JavaScript+- Package: `@composio/core`+- Version: `0.5.5`+++### Python+- Package: `composio`+- Version: `0.10.10`+++## New Features++### Experimental Assistive Prompt Configuration++Tool Router sessions now support experimental configuration for timezone-aware assistive prompts. When you provide a user's timezone, the session returns a contextual assistive prompt that includes timezone-specific guidance.++<Warning>+This is an experimental feature. The API may change or be removed in future versions.+</Warning>++<CodeBlocks>+```python title="Python SDK"+from composio import Composio++composio = Composio()++session = composio.tool_router.create(+ user_id="user_123",+ toolkits=["github"],+ experimental={+ "assistive_prompt": {+ "user_timezone": "America/New_York",+ }+ },+)++# Access the generated assistive prompt+if session.experimental:+ print(session.experimental.assistive_prompt)+```++```typescript title="TypeScript SDK"+import { Composio } from "@composio/core";++const composio = new Composio();++const session = await composio.toolRouter.create("user_123", {+ toolkits: ["github"],+ experimental: {+ assistivePrompt: {+ userTimezone: "America/New_York",+ },+ },+});++// Access the generated assistive prompt+if (session.experimental) {+ console.log(session.experimental.assistivePrompt);+}+```+</CodeBlocks>++<Note>+The `experimental` field is only available on sessions created with `create()`. Sessions retrieved with `use()` do not include the experimental data.+</Note>++### Toolkit Endpoint Method++The toolkit retrieve response now includes `getCurrentUserEndpointMethod` (TypeScript) / `get_current_user_endpoint_method` (Python) to indicate the HTTP method for the current user endpoint.++## Breaking Changes++### Trigger Pagination: `page` Replaced with `cursor`++The `page` parameter in `listActive` / `list_active` for trigger instances has been replaced with `cursor` for cursor-based pagination. There was a bug in earlier APIs which caused `page` param to be ignored, going ahead for pagination please use `cursor` instead.++<CodeBlocks>+```python title="Python SDK"+# Before (deprecated)+triggers = composio.triggers.list_active(page=1, limit=10)++# After+triggers = composio.triggers.list_active(cursor="cursor_string", limit=10)+# Use response.next_cursor for the next page+```++```typescript title="TypeScript SDK"+// Before (deprecated)+const triggers = await composio.triggers.listActive({ page: 1, limit: 10 });++// After+const triggers = await composio.triggers.listActive({ cursor: "cursor_string", limit: 10 });+// Use response.nextCursor for the next page+```+</CodeBlocks>++## Impact Summary++| Change | Runtime Breaking | TypeScript Breaking | Migration Required |+|--------|------------------|---------------------|-------------------|+| Experimental assistive prompts | No | No | No |+| `getCurrentUserEndpointMethod` field | No | No | No |+| `page` → `cursor` in triggers | Yes | Yes | Yes (if using `page`) |++## Migration Guide++If you are using the `page` parameter in `listActive` / `list_active`:++1. Replace `page` with `cursor`+2. For the first request, omit the `cursor` parameter or pass `undefined`/`None`+3. Use the `nextCursor` / `next_cursor` from the response for subsequent requestsdiff --git a/fern/pyproject.toml b/fern/pyproject.tomlindex 417e1a7f4..373767b79 100644--- a/fern/pyproject.toml+++ b/fern/pyproject.toml@@ -10,7 +10,7 @@ dependencies = ["click>=8.1.7","ruamel-yaml>=0.18.10","typing-extensions>=4.13.0",- "composio-client==1.26.0",+ "composio-client==1.27.0","openai>=1.79.0","composio==1.0.0rc5",# Dependencies for SDK doc generationdiff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex e8432e67f..57860d2b7 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -16,8 +16,8 @@ catalogs:specifier: ^4.20250917.0version: 4.20250917.0'@composio/client':- specifier: 0.1.0-alpha.55- version: 0.1.0-alpha.55+ specifier: 0.1.0-alpha.56+ version: 0.1.0-alpha.56'@modelcontextprotocol/sdk':specifier: ^1.25.2version: 1.25.2@@ -570,16 +570,16 @@ importers:version: link:../../packages/providers/llamaindex'@llamaindex/openai':specifier: ^0.4.20- version: 0.4.20(@llamaindex/[email protected])(@llamaindex/[email protected])([email protected])([email protected])+ version: 0.4.20(@llamaindex/[email protected])(@llamaindex/[email protected])([email protected])([email protected])'@llamaindex/workflow':specifier: ^1.1.24- version: 1.1.24(@llamaindex/[email protected])(@llamaindex/[email protected])(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])+ version: 1.1.24(@llamaindex/[email protected])(@llamaindex/[email protected])(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])dotenv:specifier: ^16.4.1version: 16.6.1llamaindex:specifier: ^0.12.0- version: 0.12.0(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 0.12.0(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected])devDependencies:'@types/bun':specifier: ^1.2.9@@ -909,7 +909,7 @@ importers:version: 1.0.0-alpha.1'@composio/client':specifier: 'catalog:'- version: 0.1.0-alpha.55+ version: 0.1.0-alpha.56'@composio/core':specifier: workspace:*version: link:../core@@ -1003,7 +1003,7 @@ importers:dependencies:'@composio/client':specifier: 'catalog:'- version: 0.1.0-alpha.55+ version: 0.1.0-alpha.56'@composio/json-schema-to-zod':specifier: workspace:*version: link:../json-schema-to-zod@@ -1205,7 +1205,7 @@ importers:dependencies:llamaindex:specifier: ^0.12.0+ version: 0.12.0(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected])devDependencies:'@composio/core':specifier: workspace:*@@ -1747,8 +1747,8 @@ packages:resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==}engines: {node: '>=0.1.90'}- '@composio/[email protected]':- resolution: {integrity: sha512-nINJ2bgqZi+eyNSPSd1p9hc7CryXqYonlhJqaw6U9gUeLYBq27ASpIM3ddi61j+6U6+ZKeaX1FmO3hcJwH4wCw==}+ '@composio/[email protected]':+ resolution: {integrity: sha512-hNgChB5uhdvT4QXNzzfUuvtG6vrfanQQFY2hPyKwbeR4x6mEmIGFiZ4y2qynErdUWldAZiB/7pY/MBMg6Q9E0g==}'@composio/[email protected]':resolution: {integrity: sha512-IpbfST0SSs/CEv+PIf6+EL0feNuJhQyUrOHJLPge8NhyLLrCyVqvujRIPyRUUjy0NDsked/Mm5VpJmYM6OACbg==}@@ -8456,7 +8456,7 @@ snapshots:'@colors/[email protected]':optional: true- '@composio/[email protected]': {}+ '@composio/[email protected]': {}'@composio/[email protected]': {}@@ -9435,15 +9435,6 @@ snapshots:tree-sitter: 0.22.4web-tree-sitter: 0.24.7- '@llamaindex/[email protected](@llamaindex/[email protected])(@llamaindex/[email protected])([email protected])([email protected])':- dependencies:- '@llamaindex/core': 0.6.22- '@llamaindex/env': 0.1.30- openai: 5.20.3([email protected])([email protected])- transitivePeerDependencies:- - ws- - zod-'@llamaindex/[email protected](@llamaindex/[email protected])(@llamaindex/[email protected])([email protected])([email protected])':dependencies:'@llamaindex/core': 0.6.22@@ -9453,27 +9444,27 @@ snapshots:- ws- zod- '@llamaindex/[email protected](@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])':+ '@llamaindex/[email protected](@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])':optionalDependencies:- '@modelcontextprotocol/sdk': 1.25.2(@cfworker/[email protected])([email protected])([email protected])+ '@modelcontextprotocol/sdk': 1.25.2(@cfworker/[email protected])([email protected])([email protected])hono: 4.11.4- next: 15.5.9(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])+ next: 15.5.9(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])rxjs: 7.8.2- zod: 3.25.76+ zod: 4.3.5- '@llamaindex/[email protected](@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])':+ '@llamaindex/[email protected](@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])':optionalDependencies:'@modelcontextprotocol/sdk': 1.25.2(@cfworker/[email protected])([email protected])([email protected])hono: 4.11.4- next: 15.5.9(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])+ next: 15.5.9(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])rxjs: 7.8.2zod: 4.3.5- '@llamaindex/[email protected](@llamaindex/[email protected])(@llamaindex/[email protected])(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])':+ '@llamaindex/[email protected](@llamaindex/[email protected])(@llamaindex/[email protected])(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])':dependencies:'@llamaindex/core': 0.6.22'@llamaindex/env': 0.1.30- '@llamaindex/workflow-core': 1.3.3(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])+ '@llamaindex/workflow-core': 1.3.3(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])transitivePeerDependencies:- '@modelcontextprotocol/sdk'- hono@@ -9482,11 +9473,11 @@ snapshots:- rxjs- zod- '@llamaindex/[email protected](@llamaindex/[email protected])(@llamaindex/[email protected])(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])':+ '@llamaindex/[email protected](@llamaindex/[email protected])(@llamaindex/[email protected])(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])':dependencies:'@llamaindex/core': 0.6.22'@llamaindex/env': 0.1.30- '@llamaindex/workflow-core': 1.3.3(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])+ '@llamaindex/workflow-core': 1.3.3(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])transitivePeerDependencies:- '@modelcontextprotocol/sdk'- hono@@ -13239,34 +13230,12 @@ snapshots:rfdc: 1.4.1wrap-ansi: 9.0.0- [email protected](@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected]):- dependencies:- '@llamaindex/core': 0.6.22- '@llamaindex/env': 0.1.30- '@llamaindex/node-parser': 2.0.22(@llamaindex/[email protected])(@llamaindex/[email protected])([email protected])([email protected])- '@llamaindex/workflow': 1.1.24(@llamaindex/[email protected])(@llamaindex/[email protected])(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])- '@types/lodash': 4.17.20- '@types/node': 24.6.2- lodash: 4.17.21- magic-bytes.js: 1.12.1- transitivePeerDependencies:- - '@huggingface/transformers'- - '@modelcontextprotocol/sdk'- - gpt-tokenizer- - hono- - next- - p-retry- - rxjs- - tree-sitter- - web-tree-sitter- - zod-+ [email protected](@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected])([email protected]):dependencies:'@llamaindex/core': 0.6.22'@llamaindex/env': 0.1.30'@llamaindex/node-parser': 2.0.22(@llamaindex/[email protected])(@llamaindex/[email protected])([email protected])([email protected])- '@llamaindex/workflow': 1.1.24(@llamaindex/[email protected])(@llamaindex/[email protected])(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])+ '@llamaindex/workflow': 1.1.24(@llamaindex/[email protected])(@llamaindex/[email protected])(@modelcontextprotocol/[email protected](@cfworker/[email protected])([email protected])([email protected]))([email protected])([email protected](@opentelemetry/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])'@types/lodash': 4.17.20'@types/node': 24.6.2lodash: 4.17.21@@ -13639,11 +13608,6 @@ snapshots:transitivePeerDependencies:- encoding- optionalDependencies:- ws: 8.18.2- zod: 3.25.76-optionalDependencies:ws: 8.18.2diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex 832bfdad5..ecf42b145 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -18,7 +18,7 @@ catalog:'@arethetypeswrong/cli': ^0.18.2'@cloudflare/vitest-pool-workers': ^0.9.2'@cloudflare/workers-types': ^4.20250917.0- '@composio/client': 0.1.0-alpha.55+ '@composio/client': 0.1.0-alpha.56'@modelcontextprotocol/sdk': ^1.25.2ai: ^6.0.27hono: ^4.11.4diff --git a/python/composio/core/models/tool_router.py b/python/composio/core/models/tool_router.pyindex 00d9c757d..43b68dd0f 100644--- a/python/composio/core/models/tool_router.py+++ b/python/composio/core/models/tool_router.py@@ -173,6 +173,29 @@ class ToolRouterManageConnectionsConfig(te.TypedDict, total=False):wait_for_connections: bool+class ToolRouterAssistivePromptConfig(te.TypedDict, total=False):+ """Configuration for assistive prompt generation.++ Attributes:+ user_timezone: IANA timezone identifier (e.g., "America/New_York", "Europe/London")+ for timezone-aware assistive prompts.+ """++ user_timezone: str+++class ToolRouterExperimentalConfig(te.TypedDict, total=False):+ """Experimental configuration for tool router session.++ Note: These features are experimental and may be modified or removed in future versions.++ Attributes:+ assistive_prompt: Configuration for assistive prompt generation.+ """++ assistive_prompt: ToolRouterAssistivePromptConfig++@dataclassclass ToolkitConnectionAuthConfig:"""Auth config information for a toolkit connection.@@ -272,6 +295,19 @@ class ToolRouterMCPServerConfig:headers: t.Optional[t.Dict[str, t.Optional[str]]] = None+@dataclass+class ToolRouterSessionExperimental:+ """Experimental features in session response.++ Note: These features are experimental and may be modified or removed in future versions.++ Attributes:+ assistive_prompt: The generated assistive system prompt based on the experimental config.+ """++ assistive_prompt: t.Optional[str] = None++@dataclassclass ToolRouterSession(t.Generic[TProvider]):"""@@ -283,6 +319,7 @@ class ToolRouterSession(t.Generic[TProvider]):tools: Function to get provider-wrapped toolsauthorize: Function to authorize a toolkittoolkits: Function to get toolkit connection states+ experimental: Optional experimental features data from the session response"""session_id: str@@ -290,6 +327,7 @@ class ToolRouterSession(t.Generic[TProvider]):tools: ToolsFnauthorize: AuthorizeFntoolkits: ToolkitsFn+ experimental: t.Optional[ToolRouterSessionExperimental] = Noneclass ToolRouter(Resource, t.Generic[TProvider]):@@ -736,6 +774,7 @@ class ToolRouter(Resource, t.Generic[TProvider]):auth_configs: t.Optional[t.Dict[str, str]] = None,connected_accounts: t.Optional[t.Dict[str, str]] = None,workbench: t.Optional[ToolRouterWorkbenchConfig] = None,+ experimental: t.Optional[ToolRouterExperimentalConfig] = None,) -> ToolRouterSession[TProvider]:"""Create a new tool router session for a user.@@ -798,6 +837,13 @@ class ToolRouter(Resource, t.Generic[TProvider]):- 'auto_offload_threshold' (int): Maximum execution payload size tooffload to workbench.Example: {'enable_proxy_execution': False, 'auto_offload_threshold': 300}+ :param experimental: Optional experimental configuration (ToolRouterExperimentalConfig).+ Note: These features are experimental and may change.+ Dict with:+ - 'assistive_prompt' (dict): Configuration for assistive prompt generation.+ - 'user_timezone' (str): IANA timezone identifier+ (e.g., "America/New_York", "Europe/London").+ Example: {'assistive_prompt': {'user_timezone': 'America/New_York'}}:return: Tool router session objectExample:@@ -986,9 +1032,32 @@ class ToolRouter(Resource, t.Generic[TProvider]):if execution_payload:create_params["workbench"] = execution_payload+ # Build experimental config+ # Map SDK's experimental.assistive_prompt.user_timezone to API's+ # experimental.assistive_prompt_config.user_timezone+ if experimental is not None:+ assistive_prompt_config = experimental.get("assistive_prompt")+ if assistive_prompt_config is not None:+ user_timezone = assistive_prompt_config.get("user_timezone")+ # Only include if user_timezone is a non-empty string+ if user_timezone:+ create_params["experimental"] = {+ "assistive_prompt_config": {+ "user_timezone": user_timezone,+ }+ }+# Make API call to create sessionsession = self._client.tool_router.session.create(**create_params)+ # Transform experimental response:+ # API's assistive_prompt -> SDK's assistive_prompt+ experimental_response: t.Optional[ToolRouterSessionExperimental] = None+ if session.experimental is not None:+ experimental_response = ToolRouterSessionExperimental(+ assistive_prompt=session.experimental.assistive_prompt,+ )+# Create and return the sessionreturn ToolRouterSession(session_id=session.session_id,@@ -999,6 +1068,7 @@ class ToolRouter(Resource, t.Generic[TProvider]):tools=self._create_tools_fn(session.session_id),authorize=self._create_authorize_fn(session.session_id),toolkits=self._create_toolkits_fn(session.session_id),+ experimental=experimental_response,)def use(self, session_id: str) -> ToolRouterSession[TProvider]:@@ -1043,6 +1113,7 @@ class ToolRouter(Resource, t.Generic[TProvider]):__all__ = ["ToolRouter","ToolRouterSession",+ "ToolRouterSessionExperimental","ToolRouterToolkitsEnableConfig","ToolRouterToolkitsDisableConfig","ToolRouterToolsEnableConfig",@@ -1054,6 +1125,8 @@ __all__ = ["ToolRouterConfigTags","ToolRouterManageConnectionsConfig","ToolRouterWorkbenchConfig",+ "ToolRouterExperimentalConfig",+ "ToolRouterAssistivePromptConfig","ToolkitConnectionState","ToolkitConnectionsDetails","ToolRouterMCPServerConfig",diff --git a/python/composio/core/models/triggers.py b/python/composio/core/models/triggers.pyindex 3f2857f05..b45ebd140 100644--- a/python/composio/core/models/triggers.py+++ b/python/composio/core/models/triggers.py@@ -739,7 +739,7 @@ class Triggers(Resource):connected_account_ids: t.Optional[list[str]] = None,show_disabled: t.Optional[bool] = None,limit: t.Optional[int] = None,- page: t.Optional[int] = None,+ cursor: t.Optional[str] = None,):"""List all active triggers@@ -750,7 +750,7 @@ class Triggers(Resource)::param connected_account_ids: List of connected account IDs to filter by:param show_disabled: Whether to show disabled triggers:param limit: Limit the number of triggers to return- :param page: Page number to return+ :param cursor: Cursor for pagination. Use the nextCursor from the response to get the next page.:return: List of active triggers"""return self._client.trigger_instances.list_active(@@ -760,7 +760,7 @@ class Triggers(Resource):query_connected_account_ids_1=connected_account_ids,query_show_disabled_1=show_disabled,limit=limit if limit is not None else omit,- page=page if page is not None else omit,+ cursor=cursor if cursor is not None else omit,)def list(diff --git a/python/providers/anthropic/pyproject.toml b/python/providers/anthropic/pyproject.tomlindex 780d99788..9cf696551 100644--- a/python/providers/anthropic/pyproject.toml+++ b/python/providers/anthropic/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-anthropic"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get an array of tools with your Anthropic LLMs."readme = "README.md"requires-python = ">=3.10,<4"diff --git a/python/providers/anthropic/setup.py b/python/providers/anthropic/setup.pyindex 2bcc53a34..42fbe0de2 100644--- a/python/providers/anthropic/setup.py+++ b/python/providers/anthropic/setup.py@@ -8,7 +8,7 @@ from setuptools import setupsetup(name="composio_anthropic",- version="0.10.9",+ version="0.10.10",author="Composio",author_email="[email protected]",description="Use Composio to get an array of tools with your Anthropic LLMs.",diff --git a/python/providers/autogen/pyproject.toml b/python/providers/autogen/pyproject.tomlindex 67bb6b962..de245a484 100644--- a/python/providers/autogen/pyproject.toml+++ b/python/providers/autogen/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-autogen"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get an array of tools with your autogen agent."readme = "README.md"requires-python = ">=3.9,<4"diff --git a/python/providers/autogen/setup.py b/python/providers/autogen/setup.pyindex 360546698..032aeb654 100644--- a/python/providers/autogen/setup.py+++ b/python/providers/autogen/setup.py@@ -8,7 +8,7 @@ from setuptools import setupsetup(name="composio_autogen",- version="0.10.9",+ version="0.10.10",author="Composio",author_email="[email protected]",description="Use Composio to get an array of tools with your Autogen agent.",diff --git a/python/providers/claude_agent_sdk/pyproject.toml b/python/providers/claude_agent_sdk/pyproject.tomlindex 58e0db2db..29dc4847a 100644--- a/python/providers/claude_agent_sdk/pyproject.toml+++ b/python/providers/claude_agent_sdk/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-claude-agent-sdk"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get an array of tools with Claude Code Agents SDK."readme = "README.md"requires-python = ">=3.10,<4"diff --git a/python/providers/claude_agent_sdk/setup.py b/python/providers/claude_agent_sdk/setup.pyindex c1c14b83a..ab4fbd5da 100644--- a/python/providers/claude_agent_sdk/setup.py+++ b/python/providers/claude_agent_sdk/setup.py@@ -8,7 +8,7 @@ from setuptools import find_packages, setupsetup(name="composio_claude_agent_sdk",- version="0.10.9",+ version="0.10.10",author="Composio",author_email="[email protected]",description="Use Composio to get array of tools for Claude Agent SDK",diff --git a/python/providers/crewai/pyproject.toml b/python/providers/crewai/pyproject.tomlindex ffca636fd..7e96409f1 100644--- a/python/providers/crewai/pyproject.toml+++ b/python/providers/crewai/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-crewai"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get an array of tools with your CrewAI agent."readme = "README.md"requires-python = ">=3.9,<4"diff --git a/python/providers/crewai/setup.py b/python/providers/crewai/setup.pyindex e2c2693a7..10daca9e0 100644--- a/python/providers/crewai/setup.py+++ b/python/providers/crewai/setup.py@@ -6,7 +6,7 @@ from setuptools import setupsetup(name="composio_crewai",- version="0.10.9",+ version="0.10.10",author="Composio",author_email="[email protected]",description="Use Composio to get an array of tools with your CrewAI agent.",diff --git a/python/providers/gemini/pyproject.toml b/python/providers/gemini/pyproject.tomlindex 7ea43ce5d..de68b5c27 100644--- a/python/providers/gemini/pyproject.toml+++ b/python/providers/gemini/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-gemini"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get an array of tools with your Gemini agent."readme = "README.md"requires-python = ">=3.9,<4"diff --git a/python/providers/gemini/setup.py b/python/providers/gemini/setup.pyindex af1bbfef9..621309c52 100644--- a/python/providers/gemini/setup.py+++ b/python/providers/gemini/setup.py@@ -8,7 +8,7 @@ from setuptools import setupsetup(name="composio_gemini",- version="0.10.9",+ version="0.10.10",author="Composio",author_email="[email protected]",description="Use Composio to get an array of tools with your Gemini agent.",diff --git a/python/providers/google/pyproject.toml b/python/providers/google/pyproject.tomlindex 2e95c7924..a1cc02737 100644--- a/python/providers/google/pyproject.toml+++ b/python/providers/google/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-google"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get an array of tools with your Google AI Python Gemini model."readme = "README.md"requires-python = ">=3.9,<4"diff --git a/python/providers/google/setup.py b/python/providers/google/setup.pyindex 368f31159..f8cdfbc58 100644--- a/python/providers/google/setup.py+++ b/python/providers/google/setup.py@@ -8,7 +8,7 @@ from setuptools import setupsetup(name="composio_google",- version="0.10.9",+ version="0.10.10",author="Composio",author_email="[email protected]",description="Use Composio to get an array of tools with your Google AI Python Gemini model.",diff --git a/python/providers/google_adk/pyproject.toml b/python/providers/google_adk/pyproject.tomlindex d23857d19..d8af2aab2 100644--- a/python/providers/google_adk/pyproject.toml+++ b/python/providers/google_adk/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-google-adk"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get an array of tools with your Google AI Python Gemini model."readme = "README.md"requires-python = ">=3.9,<4"diff --git a/python/providers/google_adk/setup.py b/python/providers/google_adk/setup.pyindex 0f9055302..68a230a58 100644--- a/python/providers/google_adk/setup.py+++ b/python/providers/google_adk/setup.py@@ -8,7 +8,7 @@ from setuptools import setupsetup(name="composio_google_adk",- version="0.10.9",+ version="0.10.10",author="Composio",author_email="[email protected]",description="Use Composio to get an array of tools with your Google AI Python Gemini model.",diff --git a/python/providers/langchain/pyproject.toml b/python/providers/langchain/pyproject.tomlindex afa69695d..d5cd38eef 100644--- a/python/providers/langchain/pyproject.toml+++ b/python/providers/langchain/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-langchain"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get an array of tools with your Langchain agent."readme = "README.md"requires-python = ">=3.9,<4"diff --git a/python/providers/langchain/setup.py b/python/providers/langchain/setup.pyindex bcef9a827..3036f75a0 100644--- a/python/providers/langchain/setup.py+++ b/python/providers/langchain/setup.py@@ -8,7 +8,7 @@ from setuptools import setupsetup(name="composio_langchain",- version="0.10.9",+ version="0.10.10",author="composio",author_email="[email protected]",description="Use Composio to get an array of tools with your Langchain agent.",diff --git a/python/providers/langgraph/pyproject.toml b/python/providers/langgraph/pyproject.tomlindex 867525576..37812aee9 100644--- a/python/providers/langgraph/pyproject.toml+++ b/python/providers/langgraph/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-langgraph"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get array of tools with LangGraph Agent Workflows."readme = "README.md"requires-python = ">=3.9,<4"diff --git a/python/providers/langgraph/setup.py b/python/providers/langgraph/setup.pyindex fd5c510a7..379e5352f 100644--- a/python/providers/langgraph/setup.py+++ b/python/providers/langgraph/setup.py@@ -8,7 +8,7 @@ from setuptools import setupsetup(name="composio_langgraph",- version="0.10.9",+ version="0.10.10",author="composio",author_email="[email protected]",description="Use Composio to get array of tools with LangGraph Agent Workflows",diff --git a/python/providers/llamaindex/pyproject.toml b/python/providers/llamaindex/pyproject.tomlindex b81b640cb..46db5d07e 100644--- a/python/providers/llamaindex/pyproject.toml+++ b/python/providers/llamaindex/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-llamaindex"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get array of tools with LlamaIndex Agent Workflows."readme = "README.md"requires-python = ">=3.9,<4"diff --git a/python/providers/llamaindex/setup.py b/python/providers/llamaindex/setup.pyindex 0ea93fcc6..04a748966 100644--- a/python/providers/llamaindex/setup.py+++ b/python/providers/llamaindex/setup.py@@ -8,7 +8,7 @@ from setuptools import setupsetup(name="composio_llamaindex",- version="0.10.9",+ version="0.10.10",author="composio",author_email="[email protected]",description="Use Composio to get array of tools with LlamaIndex Agent Workflows",diff --git a/python/providers/openai/pyproject.toml b/python/providers/openai/pyproject.tomlindex e3e159637..ce79d604b 100644--- a/python/providers/openai/pyproject.toml+++ b/python/providers/openai/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-openai"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get an array of tools with your OpenAI Function Call."readme = "README.md"requires-python = ">=3.9,<4"diff --git a/python/providers/openai/setup.py b/python/providers/openai/setup.pyindex 4e2622fce..db9084372 100644--- a/python/providers/openai/setup.py+++ b/python/providers/openai/setup.py@@ -8,7 +8,7 @@ from setuptools import setupsetup(name="composio_openai",- version="0.10.9",+ version="0.10.10",author="Composio",author_email="[email protected]",description="Use Composio to get an array of tools with your OpenAI Function Call.",diff --git a/python/providers/openai_agents/pyproject.toml b/python/providers/openai_agents/pyproject.tomlindex 2fac1cada..d951c5a8c 100644--- a/python/providers/openai_agents/pyproject.toml+++ b/python/providers/openai_agents/pyproject.toml@@ -1,6 +1,6 @@[project]name = "composio-openai-agents"-version = "0.10.9"+version = "0.10.10"description = "Use Composio to get array of strongly typed tools for OpenAI Agents"readme = "README.md"requires-python = ">=3.9,<4"diff --git a/python/providers/openai_agents/setup.py b/python/providers/openai_agents/setup.pyindex a85041d95..146b7749e 100644--- a/python/providers/openai_agents/setup.py+++ b/python/providers/openai_agents/setup.py@@ -8,7 +8,7 @@ from setuptools import find_packages, setupsetup(name="composio_openai_agents",- version="0.10.9",+ version="0.10.10",author="Composio",author_email="[email protected]",description="Use Composio to get array of strongly typed tools for OpenAI Agents",diff --git a/python/pyproject.toml b/python/pyproject.tomlindex 046e7c813..93f27aa70 100644--- a/python/pyproject.toml+++ b/python/pyproject.toml@@ -1,13 +1,13 @@[project]name = "composio"-version = "0.10.9"+version = "0.10.10"description = "SDK for integrating Composio with your applications."readme = "README.md"requires-python = ">=3.10,<4"dependencies = ["pysher>=1.0.8","pydantic>=2.6.4",- "composio-client==1.26.0",+ "composio-client==1.27.0","typing-extensions>=4.0.0","openai",]diff --git a/python/tests/test_tool_router.py b/python/tests/test_tool_router.pyindex c1b68e1c7..b94287afb 100644--- a/python/tests/test_tool_router.py+++ b/python/tests/test_tool_router.py@@ -10,6 +10,8 @@ from composio.core.models.tool_router import (ToolRouterToolkitsEnableConfig,ToolRouterToolkitsDisableConfig,ToolRouterManageConnectionsConfig,+ ToolRouterExperimentalConfig,+ ToolRouterSessionExperimental,ToolkitConnectionState,ToolkitConnectionsDetails,ToolRouterMCPServerType,@@ -35,6 +37,7 @@ def mock_client():]mock_session_response.config = MagicMock()mock_session_response.config.user_id = "user_123"+ mock_session_response.experimental = None # Default to Noneclient.tool_router.session.create.return_value = mock_session_responseclient.tool_router.session.retrieve.return_value = mock_session_response@@ -541,6 +544,132 @@ class TestToolRouter:assert "connected_accounts" in kwargsassert "workbench" in kwargs+ def test_create_session_with_experimental_config(self, tool_router, mock_client):+ """Test creating a session with experimental configuration."""+ session = tool_router.create(+ user_id="user_123",+ experimental={+ "assistive_prompt": {+ "user_timezone": "America/New_York",+ }+ },+ )++ assert session.session_id == "session_123"++ # Verify the API was called with experimental config transformed correctly+ call_args = mock_client.tool_router.session.create.call_args+ kwargs = call_args.kwargs+ assert "experimental" in kwargs+ assert kwargs["experimental"] == {+ "assistive_prompt_config": {+ "user_timezone": "America/New_York",+ }+ }++ def test_create_session_with_experimental_empty_config(+ self, tool_router, mock_client+ ):+ """Test creating a session with empty experimental configuration."""+ session = tool_router.create(+ user_id="user_123",+ experimental={},+ )++ assert session.session_id == "session_123"++ # Verify experimental is not included when empty+ call_args = mock_client.tool_router.session.create.call_args+ kwargs = call_args.kwargs+ assert "experimental" not in kwargs++ def test_create_session_with_experimental_no_timezone(+ self, tool_router, mock_client+ ):+ """Test creating a session with experimental config but no timezone."""+ session = tool_router.create(+ user_id="user_123",+ experimental={+ "assistive_prompt": {},+ },+ )++ assert session.session_id == "session_123"++ # Verify experimental is not included when timezone is not set+ call_args = mock_client.tool_router.session.create.call_args+ kwargs = call_args.kwargs+ assert "experimental" not in kwargs++ def test_create_session_with_experimental_empty_string_timezone(+ self, tool_router, mock_client+ ):+ """Test creating a session with empty string timezone is excluded.++ This ensures consistency with TypeScript SDK which uses truthy check.+ """+ session = tool_router.create(+ user_id="user_123",+ experimental={+ "assistive_prompt": {+ "user_timezone": "", # Empty string should be excluded+ },+ },+ )++ assert session.session_id == "session_123"++ # Verify experimental is not included when timezone is empty string+ call_args = mock_client.tool_router.session.create.call_args+ kwargs = call_args.kwargs+ assert "experimental" not in kwargs++ def test_create_session_experimental_response_transformation(+ self, tool_router, mock_client+ ):+ """Test that experimental response is transformed correctly."""+ # Setup mock response with experimental+ mock_response_with_experimental = MagicMock()+ mock_response_with_experimental.session_id = "session_exp"+ mock_response_with_experimental.mcp = MagicMock()+ mock_response_with_experimental.mcp.type = "http"+ mock_response_with_experimental.mcp.url = "https://mcp.example.com/session_exp"+ mock_response_with_experimental.tool_router_tools = ["TOOL_1"]+ mock_response_with_experimental.experimental = MagicMock()+ mock_response_with_experimental.experimental.assistive_prompt = (+ "You are a helpful assistant working in the America/New_York timezone."+ )++ mock_client.tool_router.session.create.return_value = (+ mock_response_with_experimental+ )++ session = tool_router.create(+ user_id="user_123",+ experimental={+ "assistive_prompt": {+ "user_timezone": "America/New_York",+ }+ },+ )++ # Verify experimental response is transformed correctly+ assert session.experimental is not None+ assert isinstance(session.experimental, ToolRouterSessionExperimental)+ assert (+ session.experimental.assistive_prompt+ == "You are a helpful assistant working in the America/New_York timezone."+ )++ def test_create_session_without_experimental_response(+ self, tool_router, mock_client+ ):+ """Test that session without experimental response has None."""+ session = tool_router.create(user_id="user_123")++ # Verify experimental is None when not in response+ assert session.experimental is None+def test_create_session_raises_error_without_provider(self, mock_client):"""Test that creating a session without provider raises an error when calling tools()."""tool_router = ToolRouter(client=mock_client, provider=None)@@ -943,6 +1072,27 @@ class TestToolRouterTypes:assert config["enable"] is Trueassert config["callback_url"] == "https://example.com/callback"+ def test_experimental_config_type(self):+ """Test ToolRouterExperimentalConfig type."""+ config: ToolRouterExperimentalConfig = {+ "assistive_prompt": {+ "user_timezone": "America/New_York",+ }+ }+ assert "assistive_prompt" in config+ assert config["assistive_prompt"]["user_timezone"] == "America/New_York"++ def test_session_experimental_dataclass(self):+ """Test ToolRouterSessionExperimental dataclass."""+ experimental = ToolRouterSessionExperimental(+ assistive_prompt="You are a helpful assistant."+ )+ assert experimental.assistive_prompt == "You are a helpful assistant."++ # Test with None+ experimental_none = ToolRouterSessionExperimental()+ assert experimental_none.assistive_prompt is None+def test_mcp_server_config(self):"""Test ToolRouterMCPServerConfig dataclass."""mcp = ToolRouterMCPServerConfig(diff --git a/python/tests/test_triggers.py b/python/tests/test_triggers.pyindex c4beea757..bb4e4ee3d 100644--- a/python/tests/test_triggers.py+++ b/python/tests/test_triggers.py@@ -142,7 +142,7 @@ class TestTriggers:connected_account_ids=["conn-123"],show_disabled=False,limit=10,- page=1,+ cursor="cursor-abc",)mock_client.trigger_instances.list_active.assert_called_once()@@ -153,7 +153,7 @@ class TestTriggers:assert call_kwargs["query_connected_account_ids_1"] == ["conn-123"]assert call_kwargs["query_show_disabled_1"] is Falseassert call_kwargs["limit"] == 10- assert call_kwargs["page"] == 1+ assert call_kwargs["cursor"] == "cursor-abc"assert result == mock_trigger_instancesdef test_list_trigger_types_without_filters(self, triggers, mock_client):diff --git a/ts/docs/api/tool-router.md b/ts/docs/api/tool-router.mdindex 5df033463..eb167815e 100644--- a/ts/docs/api/tool-router.md+++ b/ts/docs/api/tool-router.md@@ -241,6 +241,28 @@ const session = await composio.create('user_123', {});```+### `experimental`++Configure experimental features for the session. These features are not stable and may be modified or removed in future versions.++```typescript+const session = await composio.create('user_123', {+ toolkits: ['gmail'],+ experimental: {+ assistivePrompt: {+ userTimezone: 'America/New_York' // IANA timezone identifier for timezone-aware assistive prompts+ }+ }+});++// Access the generated assistive prompt from the session response+if (session.experimental?.assistivePrompt) {+ console.log('Assistive prompt:', session.experimental.assistivePrompt);+}+```++The `userTimezone` field accepts an IANA timezone identifier (e.g., 'America/New_York', 'Europe/London') which is used to generate a timezone-aware system prompt for optimal tool router usage.+## Session PropertiesA Tool Router session provides the following properties and methods:@@ -753,6 +775,11 @@ interface ToolRouterCreateSessionConfig {enableProxyExecution?: boolean;autoOffloadThreshold?: number;};+ experimental?: {+ assistivePrompt?: {+ userTimezone?: string; // IANA timezone identifier for timezone-aware assistive prompts+ };+ };}```@@ -773,6 +800,9 @@ interface ToolRouterSession {nextCursor?: string; // Pagination cursorlimit?: number; // Number of items per page}) => Promise<ToolkitConnectionsDetails>;+ experimental?: {+ assistivePrompt?: string; // Generated system prompt for optimal tool router usage+ };}```diff --git a/ts/docs/api/toolkits.md b/ts/docs/api/toolkits.mdindex 434f6e26f..4b409dd24 100644--- a/ts/docs/api/toolkits.md+++ b/ts/docs/api/toolkits.md@@ -252,6 +252,9 @@ interface ToolkitRetrieveResponse {baseUrl: string; // Base URL for proxied requests};}[];+ baseUrl?: string; // Base URL for the toolkit API+ getCurrentUserEndpoint?: string; // Endpoint to get the current user+ getCurrentUserEndpointMethod?: string; // HTTP method for get current user endpoint (e.g., GET, POST)}```diff --git a/ts/docs/api/triggers.md b/ts/docs/api/triggers.mdindex f4bee2a06..8e71c0b3e 100644--- a/ts/docs/api/triggers.md+++ b/ts/docs/api/triggers.md@@ -24,7 +24,7 @@ const triggers = await composio.triggers.listActive({authConfigIds: ['auth-config-id'],connectedAccountIds: ['connected-account-id'],limit: 10,- page: 1,+ cursor: 'cursor-string', // Use cursor for paginationshowDisabled: false,triggerIds: ['trigger-id'],triggerNames: ['trigger-name'],diff --git a/ts/examples/triggers/src/test.ts b/ts/examples/triggers/src/test.tsnew file mode 100644index 000000000..0df24d75f--- /dev/null+++ b/ts/examples/triggers/src/test.ts@@ -0,0 +1,17 @@+import { Composio } from '@composio/core';++const composio = new Composio({+ apiKey: process.env.COMPOSIO_API_KEY,+});++const session = await composio.create('userId', {+ experimental: {+ assistivePrompt: {+ userTimezone: 'America/New_York',+ }+ }+})++const prompt = session.experimental?.assistivePrompt;++console.log({ prompt })\ No newline at end of filediff --git a/ts/packages/core/src/composio.ts b/ts/packages/core/src/composio.tsindex e0b83fc69..3cfb4b2ed 100644--- a/ts/packages/core/src/composio.ts+++ b/ts/packages/core/src/composio.ts@@ -340,6 +340,8 @@ export class Composio<* The new instance inherits all configuration from the parent instance (apiKey, baseURL, provider, etc.)* but allows you to specify custom request options that will be used for all API calls made through this session.*+ * @deprecated DEPRECATED: This method will be removed in a future version of the SDK.+ ** @param {MergedRequestInit} fetchOptions - Custom request options to be used for all API calls in this session.* This follows the Fetch API RequestInit interface with additional options.* @returns {Composio<TProvider>} A new Composio instance with the custom request options applied.diff --git a/ts/packages/core/src/models/ToolRouter.ts b/ts/packages/core/src/models/ToolRouter.tsindex 7b9ff1a94..2a9ae59cb 100644--- a/ts/packages/core/src/models/ToolRouter.ts+++ b/ts/packages/core/src/models/ToolRouter.ts@@ -26,6 +26,7 @@ import {ToolRouterToolkitsFn,ToolRouterCreateSessionConfig,ToolRouterSession,+ ToolRouterSessionExperimental,ToolkitConnectionStateSchema,ToolRouterToolkitsOptions,ToolRouterToolkitsOptionsSchema,@@ -264,16 +265,32 @@ export class ToolRouter<routerConfig.manageConnections),workbench: transformToolRouterWorkbenchParams(routerConfig.workbench),+ // Map SDK's experimental.assistivePrompt.userTimezone to API's experimental.assistive_prompt_config.user_timezone+ experimental: routerConfig.experimental?.assistivePrompt?.userTimezone+ ? {+ assistive_prompt_config: {+ user_timezone: routerConfig.experimental.assistivePrompt.userTimezone,+ },+ }+ : undefined,};const session = await this.client.toolRouter.session.create(payload);+ // Transform experimental response: API's assistive_prompt -> SDK's assistivePrompt+ const experimental: ToolRouterSessionExperimental | undefined = session.experimental+ ? {+ assistivePrompt: session.experimental.assistive_prompt,+ }+ : undefined;+return {sessionId: session.session_id,mcp: this.createMCPServerConfig(session.mcp),tools: this.createToolsFn(session.session_id),authorize: this.createAuthorizeFn(session.session_id),toolkits: this.createToolkitsFn(session.session_id),+ experimental,};}@@ -294,7 +311,9 @@ export class ToolRouter<* console.log(session.mcp.headers);* ```*/- async use(id: string): Promise<ToolRouterSession<TToolCollection, TTool, TProvider>> {+ async use(+ id: string+ ): Promise<Omit<ToolRouterSession<TToolCollection, TTool, TProvider>, 'experimental'>> {const session = await this.client.toolRouter.session.retrieve(id);return {sessionId: session.session_id,diff --git a/ts/packages/core/src/models/Triggers.ts b/ts/packages/core/src/models/Triggers.tsindex c66a4f21f..3401d3074 100644--- a/ts/packages/core/src/models/Triggers.ts+++ b/ts/packages/core/src/models/Triggers.ts@@ -45,7 +45,7 @@ import {transformTriggerTypeListResponse,transformTriggerTypeRetrieveResponse,} from '../utils/transformers/triggers';-import { ToolkitVersion, ToolkitVersionParam } from '../types/tool.types';+import { ToolkitVersionParam } from '../types/tool.types';import { ComposioConfig } from '../composio';import { BaseComposioProvider } from '../provider/BaseProvider';/**@@ -100,8 +100,8 @@ export class Triggers<TProvider extends BaseComposioProvider<unknown, unknown, u? {auth_config_ids: parsedParams.data.authConfigIds,connected_account_ids: parsedParams.data.connectedAccountIds,+ cursor: parsedParams.data.cursor,limit: parsedParams.data.limit,- page: parsedParams.data.page,show_disabled: parsedParams.data.showDisabled,trigger_ids: parsedParams.data.triggerIds,trigger_names: parsedParams.data.triggerNames,diff --git a/ts/packages/core/src/types/toolRouter.types.ts b/ts/packages/core/src/types/toolRouter.types.tsindex db2a4aaa4..4008ba8d8 100644--- a/ts/packages/core/src/types/toolRouter.types.ts+++ b/ts/packages/core/src/types/toolRouter.types.ts@@ -198,6 +198,22 @@ export const ToolRouterCreateSessionConfigSchema = z}).optional().describe('The execution config for the tool router session'),+ experimental: z+ .object({+ assistivePrompt: z+ .object({+ userTimezone: z+ .string()+ .optional()+ .describe(+ 'IANA timezone identifier (e.g., "America/New_York", "Europe/London") for timezone-aware assistive prompts'+ ),+ })+ .optional()+ .describe('Configuration for assistive prompt generation'),+ })+ .optional()+ .describe('Experimental features configuration - not stable, may be modified or removed'),}).partial().describe('The config for the tool router session');@@ -289,6 +305,17 @@ export type ToolRouterToolkitsOptions = z.infer<typeof ToolRouterToolkitsOptionsexport type ToolRouterToolkitsFn = (options?: ToolRouterToolkitsOptions) => Promise<ToolkitConnectionsDetails>;+/**+ * Experimental features response from session creation.+ * Only returned on session creation, not on GET.+ */+export interface ToolRouterSessionExperimental {+ /**+ * The assistive system prompt to inject into your agent for optimal tool router usage.+ */+ assistivePrompt?: string;+}+export interface ToolRouterSession<TToolCollection,TTool,@@ -318,4 +345,9 @@ export interface ToolRouterSession<* Supports pagination and filtering by toolkit slugs.*/toolkits: ToolRouterToolkitsFn;+ /**+ * Experimental features including the generated system prompt.+ * Only returned on session creation, not on GET.+ */+ experimental?: ToolRouterSessionExperimental;}diff --git a/ts/packages/core/src/types/toolkit.types.ts b/ts/packages/core/src/types/toolkit.types.tsindex 77726e90f..ef5fb4ac9 100644--- a/ts/packages/core/src/types/toolkit.types.ts+++ b/ts/packages/core/src/types/toolkit.types.ts@@ -96,6 +96,7 @@ export const ToolkitRetrieveResponseSchema = z.object({authConfigDetails: z.array(ToolkitAuthConfigDetailsSchema).optional(),baseUrl: z.string().optional(),getCurrentUserEndpoint: z.string().optional(),+ getCurrentUserEndpointMethod: z.string().optional(),});export type ToolkitAuthField = z.infer<typeof ToolkitAuthFieldSchema>;diff --git a/ts/packages/core/src/types/triggers.types.ts b/ts/packages/core/src/types/triggers.types.tsindex c51daa4e6..30c2d9e4f 100644--- a/ts/packages/core/src/types/triggers.types.ts+++ b/ts/packages/core/src/types/triggers.types.ts@@ -22,7 +22,7 @@ export const TriggerInstanceListActiveParamsSchema = z.object({authConfigIds: z.array(z.string()).nullable().optional(),connectedAccountIds: z.array(z.string()).nullable().optional(),limit: z.number().optional(),- page: z.number().optional(),+ cursor: z.string().optional(),showDisabled: z.boolean().nullable().optional(),triggerIds: z.array(z.string()).nullable().optional(),triggerNames: z.array(z.string()).nullable().optional(),diff --git a/ts/packages/core/src/utils/fileUtils.ts b/ts/packages/core/src/utils/fileUtils.tsindex a795cf9d8..322814c85 100644--- a/ts/packages/core/src/utils/fileUtils.ts+++ b/ts/packages/core/src/utils/fileUtils.ts@@ -165,29 +165,24 @@ const uploadFileToS3 = async (toolkit_slug: toolkitSlug,});- const { key, type } = response;-- if (type === 'new' || type === 'update') {- logger.debug(`Uploading ${key} file to S3: ${key}`);- const buffer = Buffer.from(content, 'base64');- const signedURL =- response.type === 'update' ? response.update_presigned_url : response.new_presigned_url;-- // Upload the file using the presigned URL- const uploadResponse = await fetch(signedURL, {- method: 'PUT',- body: buffer,- headers: {- 'Content-Type': mimeType,- 'Content-Length': buffer.length.toString(),- },- });-- if (!uploadResponse.ok) {- throw new Error(`Failed to upload file to S3: ${uploadResponse.statusText}`);- }- } else {- logger.debug(`File already exists in S3: ${key}`);+ const { key, new_presigned_url } = response;++ // Upload file using presigned URL+ // Note: API now always returns type: 'new' with new_presigned_url+ logger.debug(`Uploading ${key} file to S3: ${key}`);+ const buffer = Buffer.from(content, 'base64');++ const uploadResponse = await fetch(new_presigned_url, {+ method: 'PUT',+ body: buffer,+ headers: {+ 'Content-Type': mimeType,+ 'Content-Length': buffer.length.toString(),+ },+ });++ if (!uploadResponse.ok) {+ throw new Error(`Failed to upload file to S3: ${uploadResponse.statusText}`);}return key;diff --git a/ts/packages/core/src/utils/transformers/toolkits.ts b/ts/packages/core/src/utils/transformers/toolkits.tsindex f854196cc..a26140b8f 100644--- a/ts/packages/core/src/utils/transformers/toolkits.ts+++ b/ts/packages/core/src/utils/transformers/toolkits.ts@@ -80,6 +80,7 @@ export const transformToolkitRetrieveResponse = (})),baseUrl: response.base_url,getCurrentUserEndpoint: response.get_current_user_endpoint,+ getCurrentUserEndpointMethod: response.get_current_user_endpoint_method,}));};diff --git a/ts/packages/core/test/models/toolRouter.test.ts b/ts/packages/core/test/models/toolRouter.test.tsindex 91b3f83ed..0a2010a65 100644--- a/ts/packages/core/test/models/toolRouter.test.ts+++ b/ts/packages/core/test/models/toolRouter.test.ts@@ -1149,6 +1149,149 @@ describe('ToolRouter', () => {// });// });+ describe('experimental configuration', () => {+ it('should create a session with experimental assistivePrompt userTimezone', async () => {+ mockClient.toolRouter.session.create.mockResolvedValueOnce(mockSessionCreateResponse);++ const config: ToolRouterCreateSessionConfig = {+ experimental: {+ assistivePrompt: {+ userTimezone: 'America/New_York',+ },+ },+ };++ await toolRouter.create(userId, config);++ expect(mockClient.toolRouter.session.create).toHaveBeenCalledWith({+ user_id: userId,+ toolkits: undefined,+ auth_configs: undefined,+ connected_accounts: undefined,+ tools: undefined,+ tags: undefined,+ manage_connections: createExpectedManageConnections(),+ workbench: undefined,+ experimental: {+ assistive_prompt_config: {+ user_timezone: 'America/New_York',+ },+ },+ });+ });++ it('should not include experimental in payload when assistivePrompt is not provided', async () => {+ mockClient.toolRouter.session.create.mockResolvedValueOnce(mockSessionCreateResponse);++ const config: ToolRouterCreateSessionConfig = {+ experimental: {},+ };++ await toolRouter.create(userId, config);++ expect(mockClient.toolRouter.session.create).toHaveBeenCalledWith({+ user_id: userId,+ toolkits: undefined,+ auth_configs: undefined,+ connected_accounts: undefined,+ tools: undefined,+ tags: undefined,+ manage_connections: createExpectedManageConnections(),+ workbench: undefined,+ experimental: undefined,+ });+ });++ it('should not include experimental in payload when userTimezone is not provided', async () => {+ mockClient.toolRouter.session.create.mockResolvedValueOnce(mockSessionCreateResponse);++ const config: ToolRouterCreateSessionConfig = {+ experimental: {+ assistivePrompt: {},+ },+ };++ await toolRouter.create(userId, config);++ expect(mockClient.toolRouter.session.create).toHaveBeenCalledWith({+ user_id: userId,+ toolkits: undefined,+ auth_configs: undefined,+ connected_accounts: undefined,+ tools: undefined,+ tags: undefined,+ manage_connections: createExpectedManageConnections(),+ workbench: undefined,+ experimental: undefined,+ });+ });++ it('should create a session with experimental config combined with other options', async () => {+ mockClient.toolRouter.session.create.mockResolvedValueOnce(mockSessionCreateResponse);++ const config: ToolRouterCreateSessionConfig = {+ toolkits: ['gmail', 'slack'],+ experimental: {+ assistivePrompt: {+ userTimezone: 'Europe/London',+ },+ },+ };++ await toolRouter.create(userId, config);++ expect(mockClient.toolRouter.session.create).toHaveBeenCalledWith({+ user_id: userId,+ toolkits: {+ enable: ['gmail', 'slack'],+ },+ auth_configs: undefined,+ connected_accounts: undefined,+ tools: undefined,+ tags: undefined,+ manage_connections: createExpectedManageConnections(),+ workbench: undefined,+ experimental: {+ assistive_prompt_config: {+ user_timezone: 'Europe/London',+ },+ },+ });+ });++ it('should transform experimental assistive_prompt from API response to SDK format', async () => {+ const responseWithExperimental = {+ ...mockSessionCreateResponse,+ experimental: {+ assistive_prompt:+ 'You are a helpful assistant working in the America/New_York timezone.',+ },+ };++ mockClient.toolRouter.session.create.mockResolvedValueOnce(responseWithExperimental);++ const session = await toolRouter.create(userId, {+ experimental: {+ assistivePrompt: {+ userTimezone: 'America/New_York',+ },+ },+ });++ expect(session.experimental).toEqual({+ assistivePrompt: 'You are a helpful assistant working in the America/New_York timezone.',+ });+ });++ it('should handle API response without experimental field', async () => {+ mockClient.toolRouter.session.create.mockResolvedValueOnce(mockSessionCreateResponse);++ const session = await toolRouter.create(userId);++ expect(session.experimental).toBeUndefined();+ });+ });+describe('error handling', () => {it('should throw error if API call fails', async () => {const apiError = new Error('API error: Invalid session configuration');diff --git a/ts/packages/core/test/models/toolkits.test.ts b/ts/packages/core/test/models/toolkits.test.tsindex 50ba6ebff..5abb6a1bd 100644--- a/ts/packages/core/test/models/toolkits.test.ts+++ b/ts/packages/core/test/models/toolkits.test.ts@@ -86,6 +86,8 @@ const mockToolkitRetrieveResponse = {},},],+ get_current_user_endpoint: '/user',+ get_current_user_endpoint_method: 'GET',};describe('Toolkits', () => {@@ -169,10 +171,56 @@ describe('Toolkits', () => {},},],+ getCurrentUserEndpoint: '/user',+ getCurrentUserEndpointMethod: 'GET',});expect(mockClient.toolkits.retrieve).toHaveBeenCalledWith('github');});+ it('should handle toolkit without getCurrentUserEndpointMethod', async () => {+ const responseWithoutMethod = {+ ...mockToolkitRetrieveResponse,+ get_current_user_endpoint_method: undefined,+ };+ mockClient.toolkits.retrieve.mockResolvedValue(responseWithoutMethod);++ const result = await toolkits.get('github');++ expect(result).toEqual({+ name: 'GitHub',+ slug: 'github',+ meta: {+ createdAt: '2024-01-01',+ updatedAt: '2024-01-02',+ toolsCount: 10,+ triggersCount: 5,+ },+ isLocalToolkit: false,+ composioManagedAuthSchemes: ['oauth2'],+ authConfigDetails: [+ {+ name: 'oauth2',+ mode: 'oauth2',+ fields: {+ authConfigCreation: {+ optional: [],+ required: [],+ },+ connectedAccountInitiation: {+ optional: [],+ required: [],+ },+ },+ proxy: {+ baseUrl: 'https://api.github.com',+ },+ },+ ],+ getCurrentUserEndpoint: '/user',+ getCurrentUserEndpointMethod: undefined,+ });+ });+it('should throw ValidationError for invalid list query', async () => {const promise = toolkits.get({ category: 123 } as any);await expect(promise).rejects.toThrowError('Failed to fetch toolkits');diff --git a/ts/packages/core/test/models/triggers.test.ts b/ts/packages/core/test/models/triggers.test.tsindex 500c3110c..d8b70fac8 100644--- a/ts/packages/core/test/models/triggers.test.ts+++ b/ts/packages/core/test/models/triggers.test.ts@@ -267,7 +267,7 @@ describe('Triggers', () => {authConfigIds: ['auth-1'],connectedAccountIds: ['conn-1'],limit: 5,- page: 2,+ cursor: 'cursor-abc',showDisabled: true,triggerIds: ['trigger-1'],triggerNames: ['github_webhook'],@@ -281,7 +281,7 @@ describe('Triggers', () => {auth_config_ids: query.authConfigIds,connected_account_ids: query.connectedAccountIds,limit: query.limit,- page: query.page,+ cursor: query.cursor,show_disabled: query.showDisabled,trigger_ids: query.triggerIds,trigger_names: query.triggerNames,diff --git a/uv.lock b/uv.lockindex 2ab64177f..3601d2393 100644--- a/uv.lock+++ b/uv.lock@@ -477,7 +477,7 @@ wheels = [[[package]]name = "composio"-version = "0.10.8"+version = "0.10.10"source = { virtual = "python" }dependencies = [{ name = "composio-client" },@@ -506,7 +506,7 @@ dev = [[package.metadata]requires-dist = [- { name = "composio-client", specifier = "==1.26.0" },+ { name = "composio-client", specifier = "==1.27.0" },{ name = "openai" },{ name = "pydantic", specifier = ">=2.6.4" },{ name = "pysher", specifier = ">=1.0.8" },@@ -532,7 +532,7 @@ dev = [[[package]]name = "composio-anthropic"-version = "0.10.8"+version = "0.10.10"source = { virtual = "python/providers/anthropic" }dependencies = [{ name = "anthropic" },@@ -547,7 +547,7 @@ requires-dist = [[[package]]name = "composio-client"-version = "1.26.0"+version = "1.27.0"source = { registry = "https://pypi.org/simple" }dependencies = [{ name = "anyio" },@@ -557,14 +557,14 @@ dependencies = [{ name = "sniffio" },{ name = "typing-extensions" },]-sdist = { url = "https://files.pythonhosted.org/packages/31/ea/e9abfe0a16b10358ea126fae9019808cde5d76fdf17b70cc1df48c7535b6/composio_client-1.26.0.tar.gz", hash = "sha256:8ab65d900025970760c522c8df4445a6a63aff9f78773682f7193928016fb0f7", size = 192874 }+sdist = { url = "https://files.pythonhosted.org/packages/35/2d/5faddf107854a843137ee127946db3a738667948933e0903f1250e5e729a/composio_client-1.27.0.tar.gz", hash = "sha256:684d33a4e701f92d6d2cca1a66b638e509afb46263e9f13266673ee7c55efefe", size = 193444 }wheels = [- { url = "https://files.pythonhosted.org/packages/37/2b/ad19b251f0d2241da0227fce6aee5792a6bbf26c09ff1d43841b946e7557/composio_client-1.26.0-py3-none-any.whl", hash = "sha256:24b6b0ffba0b7a1c818da53a77b450bbddc26313f9c6abc1ef4472cfb348e450", size = 210074 },+ { url = "https://files.pythonhosted.org/packages/57/37/e121ef2986935d374e85ca74315a8bc7fd5208342cabbb6461a49be466a4/composio_client-1.27.0-py3-none-any.whl", hash = "sha256:45697bb0f8a29290271727d9c1a3233e859dc61c515e6669f59408843fa590f0", size = 210495 },][[package]]name = "composio-crewai"-version = "0.10.8"+version = "0.10.10"source = { virtual = "python/providers/crewai" }dependencies = [{ name = "composio" },@@ -579,7 +579,7 @@ requires-dist = [[[package]]name = "composio-gemini"-version = "0.10.8"+version = "0.10.10"source = { virtual = "python/providers/gemini" }dependencies = [{ name = "composio" },@@ -594,7 +594,7 @@ requires-dist = [[[package]]name = "composio-google"-version = "0.10.8"+version = "0.10.10"source = { virtual = "python/providers/google" }dependencies = [{ name = "composio" },@@ -609,7 +609,7 @@ requires-dist = [[[package]]name = "composio-google-adk"-version = "0.10.8"+version = "0.10.10"source = { virtual = "python/providers/google_adk" }dependencies = [{ name = "composio" },@@ -624,7 +624,7 @@ requires-dist = [[[package]]name = "composio-langchain"-version = "0.10.8"+version = "0.10.10"source = { virtual = "python/providers/langchain" }dependencies = [{ name = "composio" },@@ -639,7 +639,7 @@ requires-dist = [[[package]]name = "composio-openai"-version = "0.10.8"+version = "0.10.10"source = { virtual = "python/providers/openai" }dependencies = [{ name = "composio" },@@ -654,7 +654,7 @@ requires-dist = [[[package]]name = "composio-openai-agents"-version = "0.10.8"+version = "0.10.10"source = { virtual = "python/providers/openai_agents" }dependencies = [{ name = "composio" },@@ -892,7 +892,7 @@ dev = [requires-dist = [{ name = "click", specifier = ">=8.1.7" },{ name = "composio", virtual = "python" },- { name = "composio-client", specifier = "==1.26.0" },+ { name = "composio-client", specifier = "==1.27.0" },{ name = "composio-gemini", virtual = "python/providers/gemini" },{ name = "composio-langchain", virtual = "python/providers/langchain" },{ name = "composio-openai", virtual = "python/providers/openai" },