@devries-cameron20 / composio Mirror · read-only / commits / fdf4e8535
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 21:00 UTC

Refine ToolRouter preload and generated attach support (#3364)

## Summary - Add public direct-tools preset constants (`SessionPreset.DIRECT_TOOLS` in TS, `SESSION_PRESET_DIRECT_TOOLS` in Python) and internal `preload.tools = "all"` constants. - Reuse the create-time inline custom tool preload preparation path for `use(..., customTools/customToolkits)` attach flows, including existing-session `preload.tools = "all"` handling for attached customs. - Use generated Stainless attach types where available; keep a narrow Python additive type for the custom-definition `preload` hint until Stainless exposes that field. - Clean up user-facing preload docs/comments, direct custom tool description prefix, and direct/preload examples with normalized `LOCAL_*` assertions. - Add separate changesets for preload behavior and the direct-tools preset. ## Validation - `pnpm --dir ts/packages/core typecheck` - `pnpm --dir ts/packages/core test test/models/toolRouter.test.ts test/models/customTool.test.ts` - `(cd python && .nox/chk/bin/mypy --config-file config/mypy.ini composio/)` - `COMPOSIO_CACHE_DIR=/private/tmp/composio-cache python/.nox/chk/bin/python -m pytest python/tests/test_tool_router.py python/tests/test_custom_tools.py` - `python/.nox/chk/bin/python -m ruff check python/composio/core/models/tool_router.py python/composio/core/models/custom_tool_types.py python/composio/core/models/inline_custom_tools_payload.py python/composio/core/models/custom_tool.py python/composio/core/models/tool_router_constants.py python/tests/test_tool_router.py` - `python/.nox/chk/bin/python -m ruff check python/examples/tool_router/direct_tools_preset.py` - `python/.nox/chk/bin/python -m py_compile python/examples/tool_router/direct_tools_preset.py` - `git diff --check`

Dhawal Upadhyay committed May 7, 2026 at 16:49 UTC fdf4e853507194e56dc0284becbcadbcc661070c

No changes.