This PR: - replaces ESLint with oxlint across the pnpm workspace and the Bun-based docs site, porting the rules to `.oxlintrc.json` / `docs/.oxlintrc.json` with behavior parity (restricted-syntax selectors kept via `oxlint-plugin-eslint`) - migrates typecheck to TypeScript 7 (`typescript@^7.0.2` catalog) and keeps a TS6 pin for JS compiler API consumers via a named `ts6` pnpm catalog (`ts/scripts/validate-examples.ts`, the `@composio/cli` generate pipeline). The CLI's `typescript` dependency rebinds only the compiler-API import — its typecheck still runs the root TS7 `tsc`, since the alias package only ships a `tsc6` bin (documented in `ts/packages/cli/AGENTS.md`) - removes the `paths` mappings that pointed `@composio/core` (and, in `experimental`, `@composio/json-schema-to-zod` plus core-internal `#`-imports) at sibling `src` directories: under TS7, tsdown's tsgo-based dts step emitted stray `.d.ts` files next to those out-of-root sources on every dependent package build. Workspace deps now resolve through their built dist types, which turbo's `dependsOn: ^build` already guarantees exist — and which the deep-path exports (`@composio/core/*`) always used anyway - renames the cli boundary tooling `eslint-boundaries*` → `lint-boundaries*` and hardens the scanner to reject `oxlint-disable` spellings so the disable manifest cannot be bypassed - rewrites inline `eslint-disable` comments to oxlint rule names (comment-only; no runtime changes), and adds **one new** declared boundary: `tool-file-uploads.ts` needs `no-restricted-imports` disabled for `node:crypto` (MD5 for the presigned-upload checksum is not in Web Crypto), because oxlint also catches dynamic `await import()` where ESLint did not. The manifest grows 46 → 47 deliberately - updates CI path filters, `turbo.jsonc` lint inputs, and the docs typescript-check workflow (renamed to "Docs - Lint and TypeScript Validation" since it now lints too); drops `eslint`, `typescript-eslint`, `eslint-config-next`, and `globals` from the dependency graphs - ships no changeset: I built `@composio/core` and `@composio/anthropic` on this branch and on the pre-migration base and diffed the emitted `dist/**/*.d.mts`. The provider output is byte-identical. Core's output is **semantically identical but not byte-identical**: TS7 changes quote style (`"x"` → `'x'`), object-property and union-member ordering in inferred types, and picks equivalent shorter re-export alias paths for five signatures (e.g. `OpenAI.Beta.Threads.Runs.Run` → `OpenAI.Beta.Threads.Run` — verified both names alias the same type in the shipped typings). Chunk-name hashes shift as a consequence. No type gains, losses, or shape changes; `attw` and `publint` pass on the TS7 build ## Context First of a three-PR split of #3958. The type-safety refactors are stacked on this branch and merge after it: - docs: https://github.com/ComposioHQ/composio/pull/3967 - `@composio/core`: https://github.com/ComposioHQ/composio/pull/3968
8.8 KiB
Contributing to Composio SDK
Thank you for your interest in contributing to Composio. This guide covers the root SDK repository. The monorepo contains the TypeScript SDK, Python SDK, docs site, examples, and release tooling.
Table of Contents
- Development Setup
- Project Structure
- Development Commands
- Coding Standards
- Documentation Requirements
- Pull Request Process
- Creating New Providers
- Testing Guidelines
- Release Process
- Questions and Support
Development Setup
Prerequisites
Tool versions are pinned in mise.toml, which is the source of truth for local development and CI:
- Node.js 24.17.0
- pnpm 11.8.0
- Bun 1.3.10
- Deno 2.6.7
- Python 3.12
- uv 0.8.19
Use mise to install the toolchain:
mise install
pnpm is installed through mise's npm backend. Do not rely on Corepack for this repository.
Getting Started
-
Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/composio.git cd composio -
Install the pinned toolchain:
mise install -
Install dependencies:
pnpm install -
Build the project:
pnpm build -
Run tests:
pnpm test
Project Structure
composio/
├── ts/ # TypeScript SDK workspace
│ ├── packages/
│ │ ├── core/ # Core SDK package (@composio/core)
│ │ ├── cli/ # CLI binary and command implementations
│ │ ├── cli-keyring/ # Keyring helper for the CLI
│ │ ├── cli-local-tools/ # Local tools support for the CLI
│ │ ├── providers/ # AI framework provider adapters
│ │ ├── json-schema-to-zod/ # Schema conversion utility
│ │ └── ts-builders/ # TypeScript build helpers
│ ├── e2e-tests/ # Runtime and CLI end-to-end tests
│ ├── examples/ # TypeScript examples
│ └── scripts/ # TypeScript build and maintenance scripts
├── python/ # Python SDK
│ ├── composio/ # Main Python package
│ ├── providers/ # Python provider adapters
│ ├── tests/ # pytest test suite
│ ├── scripts/ # Python development and release scripts
│ └── docs/ # Python release notes and process docs
├── docs/ # Documentation site
├── test/ # Root-level release/install script tests
└── .github/ # GitHub Actions and shared CI actions
Development Commands
# Build all packages
pnpm build
# Build TypeScript packages only
pnpm build:packages
# Lint TypeScript packages
pnpm lint
# Fix lint issues where possible
pnpm lint:fix
# Format supported files
pnpm format
# Create a new TypeScript provider
pnpm create:provider <provider-name> [--agentic]
# Create a new TypeScript example
pnpm create:example <example-name>
# Check peer dependencies
pnpm check:peer-deps
# Update peer dependencies
pnpm update:peer-deps
Dead code detection
The Dead Code CI workflow reports likely-orphaned code on every PR (findings
land in the run's Step Summary; it never fails the build). Run the same checks
locally:
# TypeScript — unused files, exports, types and dependencies
pnpm dlx knip@5 # config in knip.json
# Python — unused functions, classes and variables
cd python && make dead-code # vulture; allowlist in python/config/vulture_allowlist.py
# GitHub Actions — orphaned reusable workflows and composite actions
bash .github/scripts/check-orphan-ci.sh
These tools carry false positives (public API surface, dynamic imports,
import-map targets), so treat their output as advisory: verify a finding is
truly unreferenced before deleting, and suppress confirmed false positives via
knip.json / vulture_allowlist.py.
Coding Standards
TypeScript
- Follow the style of the package you are editing.
- Use TypeScript for new TypeScript SDK code.
- Use named exports for public APIs unless the local package pattern says otherwise.
- Keep public API changes typed and documented with TSDoc.
- Add focused tests for new behavior and bug fixes.
- Use Oxlint and Prettier through the repo scripts.
- Keep generated or vendored code out of manual edits unless the package explicitly owns that output.
Python
- Follow the existing Python SDK layout under
python/. - Use Ruff formatting and linting through the Python make targets.
- Keep provider-specific changes inside the relevant
python/providers/*package. - Add pytest coverage for behavior changes.
Error Handling
- Use the existing error classes and result shapes in the package you are editing.
- Include enough context in error messages to identify the failing operation.
- Avoid swallowing errors unless the caller has an explicit fallback path.
Documentation Requirements
Update docs when a change affects public behavior, install flows, examples, environment variables, release steps, or provider usage.
For documentation-site work, read docs/CLAUDE.md first. It documents the docs app, MDX conventions, link checking, generated data, and docs branch workflow.
Package documentation should generally include:
- A short package description.
- Installation instructions.
- Usage examples.
- Public API notes.
- Environment variables or authentication requirements when relevant.
- Provider limitations or streaming details when relevant.
Pull Request Process
-
Create a branch from the target base branch. Most active SDK and docs work targets
next.git checkout next git pull origin next git checkout -b feature/your-feature-name -
Make focused changes that match the issue or feature scope.
-
Add or update tests for behavior changes.
-
Update documentation when user-facing behavior changes.
-
Add a changeset for changes that affect published TypeScript packages:
pnpm changesetRoot-level documentation-only changes, such as edits to this file, do not need a changeset.
-
Run the smallest meaningful verification command locally before opening the PR.
-
Push your branch and open a PR against the correct base branch.
Creating New Providers
TypeScript Providers
Use the TypeScript provider creation script:
pnpm create:provider my-provider [--agentic]
Then:
- Implement the required provider methods.
- Add tests under the provider package.
- Add examples or docs when the provider has user-facing setup details.
- Run the package tests and relevant build checks.
Python Providers
Use the Python provider creation target from the python/ directory:
cd python
make create-provider name=my-provider
For agentic providers:
cd python
make create-provider name=my-provider agentic=true
Then add provider tests and run the relevant Python checks.
Testing Guidelines
TypeScript SDK
Run the root TypeScript test suite:
pnpm test
Run all TypeScript end-to-end tests:
pnpm test:e2e
Run runtime-specific end-to-end tests:
pnpm test:e2e:node
pnpm test:e2e:deno
pnpm test:e2e:cli
pnpm test:e2e:cloudflare
Open the Vitest UI:
pnpm test:ui
Python SDK
Set up the Python development environment:
cd python
make env
source .venv/bin/activate
Run Python checks:
make fmt
make chk
make tst
make snt
You can also run a focused pytest command through uv:
uv run pytest tests/test_sdk.py -v
Docs Site
For docs changes:
cd docs
bun install
bun run build
bun run lint:links
See docs/CLAUDE.md for the full docs workflow.
Release Process
Only maintainers publish releases.
For TypeScript package and CLI release details, use ts/docs/internal/release.md. The root scripts are:
pnpm changeset
pnpm changeset:version
pnpm changeset:release
For Python package release details, use python/docs/release.md. Python package versioning and release preparation are handled from the python/ workspace.
Questions and Support
- Join our Discord Community
- Check our Documentation
- File issues on GitHub
License
By contributing to Composio SDK, you agree that your contributions will be licensed under the ISC License.