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
ci(docs): rebuild stale KB semantic artifact from the scheduled job
jkomynob42d3451a782
diff --git a/.github/workflows/docs-update-kb.yml b/.github/workflows/docs-update-kb.ymlindex d013698bf..e6a280208 100644--- a/.github/workflows/docs-update-kb.yml+++ b/.github/workflows/docs-update-kb.yml@@ -16,7 +16,8 @@ jobs:permissions:contents: readoutputs:- changed: ${{ steps.source.outputs.changed }}+ changed: ${{ steps.rebuild.outputs.changed }}+ upstream_changed: ${{ steps.source.outputs.upstream_changed }}commit: ${{ steps.source.outputs.commit }}defaults:run:@@ -55,19 +56,17 @@ jobs:current_commit=$(jq -r '.source.commit' kb/manifest.json)echo "commit=$source_commit" >> "$GITHUB_OUTPUT"if [ "$source_commit" = "$current_commit" ]; then- echo "changed=false" >> "$GITHUB_OUTPUT"+ echo "upstream_changed=false" >> "$GITHUB_OUTPUT"echo "Support knowledge is already current at $source_commit."else- echo "changed=true" >> "$GITHUB_OUTPUT"+ echo "upstream_changed=true" >> "$GITHUB_OUTPUT"echo "Refreshing support knowledge from $current_commit to $source_commit."fi- name: Setup Node.js, pnpm, Bun- if: steps.source.outputs.changed == 'true'uses: ./.github/actions/setup-node-pnpm-bun- name: Cache Bun dependencies- if: steps.source.outputs.changed == 'true'uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0with:path: ~/.bun/install/cache@@ -76,11 +75,34 @@ jobs:${{ runner.os }}-bun-- name: Install dependencies- if: steps.source.outputs.changed == 'true'run: bun install+ # Docs-side text changes (generator updates, guide edits) also invalidate+ # the checked-in semantic artifact. Detect that here so CI rebuilds the+ # artifact even when the upstream support-knowledge commit has not moved.+ - name: Detect stale semantic artifact+ id: semantic+ if: steps.source.outputs.upstream_changed == 'false'+ run: |+ if bun scripts/build-kb-semantic-index.ts --check; then+ echo "stale=false" >> "$GITHUB_OUTPUT"+ else+ echo "stale=true" >> "$GITHUB_OUTPUT"+ echo "Semantic artifact is stale against the checked-in docs corpus."+ fi++ - name: Resolve rebuild+ id: rebuild+ run: |+ if [ "${{ steps.source.outputs.upstream_changed }}" = "true" ] || [ "${{ steps.semantic.outputs.stale }}" = "true" ]; then+ echo "changed=true" >> "$GITHUB_OUTPUT"+ else+ echo "changed=false" >> "$GITHUB_OUTPUT"+ echo "Support knowledge and semantic artifact are both current."+ fi+- name: Import public support knowledge- if: steps.source.outputs.changed == 'true'+ if: steps.source.outputs.upstream_changed == 'true'env:SOURCE_ROOT: ${{ github.workspace }}/.support-knowledgeSOURCE_COMMIT: ${{ steps.source.outputs.commit }}@@ -90,19 +112,19 @@ jobs:--source-commit "$SOURCE_COMMIT"- name: Rebuild generated pages and semantic artifact- if: steps.source.outputs.changed == 'true'+ if: steps.rebuild.outputs.changed == 'true'env:OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}run: bun run build:kb-semantic- name: Verify refreshed knowledge base- if: steps.source.outputs.changed == 'true'+ if: steps.rebuild.outputs.changed == 'true'run: |bun run verify:kbbun run check:kb-semantic- name: Upload verified KB artifacts- if: steps.source.outputs.changed == 'true'+ if: steps.rebuild.outputs.changed == 'true'uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1with:name: support-knowledge-refresh@@ -149,9 +171,9 @@ jobs:commit-message: 'docs(kb): refresh public support knowledge'title: 'docs(kb): refresh public support knowledge'body: |- Automated public-only refresh from `ComposioHQ/support-knowledge`.+ Automated knowledge-base refresh for `ComposioHQ/support-knowledge`.- - Source commit: `${{ needs.refresh.outputs.commit }}`+ - Source commit: `${{ needs.refresh.outputs.commit }}` (${{ needs.refresh.outputs.upstream_changed == 'true' && 'imported new support knowledge' || 'unchanged; rebuilt a stale semantic artifact' }})- Regenerated public KB pages and search records- Reused unchanged vectors and rebuilt the checked semantic artifact- Ran KB freshness and semantic-artifact verification