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, 19:45 UTC
ci(docs): keep docs @composio/* deps current on each SDK sync (#3709)
## Summary The `Docs - Sync guides on SDK changes` workflow updates docs **content** when SDK source changes on `next`, but it never touched `docs/package.json`. Because the docs site is a standalone Bun app **outside** the pnpm workspace — it pins *published* `@composio/*` versions rather than linking workspace source — those pins silently drifted behind the SDK. That drift is what produced the recent breakage in #3705: docs still pinned `@composio/core@0.9.1` while `delete()` shipped in `0.13.1`, so the Twoslash type-check failed and the sync bot worked around it by casting a fake `delete()` onto the session type. ## What this changes In `docs.sdk-change-sync.yml` (gated on the same `has_changes` condition as the rest of the job): - **New step** sets up Node/Bun (via the shared `setup-node-pnpm-bun` action) and realigns every `@composio/*` dependency in `docs/package.json` to its **latest published** release (`npm view <pkg> version` → `^<latest>`), then refreshes `bun.lock` with `bun install`. It scans both `dependencies` and `devDependencies`, is idempotent (no diff → no `bun install`), and warns rather than fails if a version can't be resolved. - **`add-paths`** now includes `docs/package.json` and `docs/bun.lock` so the realignment lands in the PR. - **Content prompt** gains a rule: don't add casts/assertions to compile against an API missing from the published package — document released behavior and let the Twoslash build flag the gap. ## Why pin to *published* (not workspace source) Docs deliberately target what users can `npm install`. Twoslash snippets and the runnable example apps are a contract that the documented API exists in a real release. The PR's existing Twoslash build (`docs-typescript-check.yml`) remains the gate: if a documented feature isn't published yet, the build fails loudly instead of being silently worked around. ## Notes - Complementary to #3705, which fixes the *current* stale pins by hand; this prevents the drift from recurring. - Validated the bump shell logic locally under `bash` (matching the runner): correctly resolves all 10 `@composio/*` devDeps and is a no-op when already current.