Skip to content

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

ci(docs): keep docs @composio/* deps current on each SDK sync (#3709)

Alberto Schiabelaede04995dd9
diff --git a/.github/workflows/docs.sdk-change-sync.yml b/.github/workflows/docs.sdk-change-sync.yml
index cccec4466..1889ed560 100644
--- a/.github/workflows/docs.sdk-change-sync.yml
+++ b/.github/workflows/docs.sdk-change-sync.yml
@@ -77,7 +77,57 @@ jobs:
4. Update any docs that would be stale or incorrect after this SDK change — guides, FAQs, examples, quickstart, etc.
5. Do NOT touch docs/content/reference/ (those are auto-generated separately)
6. Do NOT touch docs/content/changelog/ (changelogs are written separately)
- 7. If no docs changes are needed, make no file changes
+ 7. Do NOT edit docs/package.json or docs/bun.lock — the `@composio/*` version pins are managed automatically by the dependency-realignment step below, which runs after you and overwrites any changes you make to them
+ 8. If no docs changes are needed, make no file changes
+ 9. Do NOT add type assertions or casts to force a snippet to compile against an API that is missing from the published `@composio/*` package. If a feature isn't released yet, document the released behavior and let the Twoslash build flag the gap.
+
+ - name: Setup Node.js, pnpm, Bun
+ if: steps.diff.outputs.has_changes == 'true'
+ uses: ./.github/actions/setup-node-pnpm-bun
+
+ - name: Align docs SDK deps with latest published releases
+ if: steps.diff.outputs.has_changes == 'true'
+ working-directory: ./docs
+ run: |
+ # Docs is a standalone Bun app outside the pnpm workspace: it pins
+ # published @composio/* versions instead of linking workspace source,
+ # so its Twoslash snippets and example apps only ever demonstrate APIs
+ # that users can actually install. Realign those pins to the latest
+ # released versions on every sync so they never drift behind the SDK
+ # (the drift that previously forced workaround casts into snippets).
+ # This runs AFTER the content pass so the committed pins are always
+ # authoritative — even if that pass edited package.json/bun.lock, this
+ # step resets the @composio/* pins and regenerates the lockfile.
+ # The PR's Twoslash build (docs-typescript-check.yml) gates the result:
+ # if a documented feature isn't published yet, the build fails loudly
+ # instead of the gap being papered over.
+ set -euo pipefail
+ # Discard any edits the content pass made to these managed files so the
+ # realignment is the sole source of truth for the dependency pins.
+ git checkout -- package.json bun.lock
+ changed=0
+ for section in dependencies devDependencies; do
+ pkgs=$(jq -r --arg s "$section" '.[$s] // {} | keys[] | select(startswith("@composio/"))' package.json)
+ for pkg in $pkgs; do
+ latest=$(npm view "$pkg" version 2>/dev/null || true)
+ if [ -z "$latest" ]; then
+ echo "::warning::could not resolve a published version for $pkg; leaving its pin unchanged"
+ continue
+ fi
+ current=$(jq -r --arg s "$section" --arg p "$pkg" '.[$s][$p]' package.json)
+ want="^$latest"
+ if [ "$current" != "$want" ]; then
+ echo "$section.$pkg: $current -> $want"
+ npm pkg set "$section.$pkg=$want"
+ changed=1
+ fi
+ done
+ done
+ if [ "$changed" -eq 1 ]; then
+ bun install
+ else
+ echo "All @composio/* pins already match the latest published releases."
+ fi
- name: Create PR if changed
id: create-pr
@@ -91,18 +141,26 @@ jobs:
## Summary
Automated docs update triggered by SDK source changes on `next`.
- Claude reviewed the SDK diff and updated guides, FAQs, or examples
- that reference changed APIs or features.
+ - Claude reviewed the SDK diff and updated guides, FAQs, or examples
+ that reference changed APIs or features.
+ - The docs `@composio/*` dependencies were realigned to their latest
+ published releases so Twoslash snippets and example apps validate
+ against versions users can actually install.
## Review checklist
- [ ] Changes accurately reflect the new SDK behavior
- [ ] No unrelated docs were modified
- [ ] Code examples are correct and complete
+ - [ ] If a documented feature is not published yet, the Twoslash build
+ will fail — wait for the release instead of working around it
Generated by Claude Code via GitHub Actions.
branch: docs/auto-sdk-sync
base: next
- add-paths: docs/content/docs/
+ add-paths: |
+ docs/content/docs/
+ docs/package.json
+ docs/bun.lock
- name: Request review from pusher
if: steps.create-pr.outputs.pull-request-number