Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 0 additions & 59 deletions .github/actions/app-token/action.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/context7.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/generate-toolkit-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ This workflow regenerates toolkit JSON and opens a PR with the changes. It can b
1. Builds the toolkit docs generator.
2. Generates toolkit JSON in `toolkit-docs-generator/data/toolkits` using the experience API's public tool catalog, which serves tool definitions and toolkit branding in one anonymous read.
3. Syncs integrations sidebar navigation from the generated JSON.
4. Creates or updates a PR on the stable `automation/toolkit-docs` branch if any files changed. Later runs overwrite that open PR with the latest generated docs.
4. Regenerates `public/llms.txt` so the automation PR does not depend on a second workflow.
5. Creates or updates a PR on the stable `automation/toolkit-docs` branch if any files changed. Later runs overwrite that open PR with the latest generated docs.

## Inputs and secrets

Required secrets:

- `ANTHROPIC_API_KEY`
- `OPENAI_API_KEY` (for `llms.txt` summaries)

Optional secrets:

Expand Down
46 changes: 24 additions & 22 deletions .github/workflows/generate-toolkit-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ name: Generate toolkit docs
# Flow:
# 1) Generate toolkit JSON into toolkit-docs-generator/data/toolkits
# 2) Sync integrations sidebar _meta.tsx from toolkit-docs-generator/data/toolkits
# 3) Create or update a PR if changes were produced
# 3) Regenerate public/llms.txt so the automation PR is self-contained
# 4) Create or update a PR if changes were produced
#
# Opens the PR with GITHUB_TOKEN. That does not start other workflows, so this
# job generates llms.txt here instead of depending on llmstxt.yml to fire.

on:
repository_dispatch:
types: [porter_deploy_succeeded]
workflow_dispatch:
inputs:
public_catalog_url:
description: "Override public catalog URL (staging only; production is the default)"
required: false
type: string
# 11:00 UTC = 3 AM PST / 4 AM PDT — late enough that DST drift doesn't matter.
schedule:
- cron: "0 11 * * *"
Expand Down Expand Up @@ -67,11 +76,11 @@ jobs:
--verbose \
--api-source public-catalog \
--llm-provider anthropic \
--llm-model "$ANTHROPIC_MODEL" \
--llm-model "claude-sonnet-4-6" \
--llm-api-key "$ANTHROPIC_API_KEY" \
--llm-max-tokens 8192 \
--llm-editor-provider anthropic \
--llm-editor-model "$ANTHROPIC_EDITOR_MODEL" \
--llm-editor-model "claude-sonnet-4-6" \
--llm-editor-api-key "$ANTHROPIC_API_KEY" \
--toolkit-concurrency 8 \
--llm-concurrency 15 \
Expand All @@ -84,35 +93,28 @@ jobs:
working-directory: toolkit-docs-generator
env:
# Unset in normal runs: the generator defaults to the production
# experience API, which needs no credentials. Set the secret to
# point a run at staging or a local BFF.
PUBLIC_CATALOG_URL: ${{ secrets.PUBLIC_CATALOG_URL }}
# experience API. Pass public_catalog_url on workflow_dispatch to
# point a manual run at staging or a local BFF.
PUBLIC_CATALOG_URL: ${{ inputs.public_catalog_url }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
ANTHROPIC_MODEL: ${{ secrets.ANTHROPIC_MODEL || 'claude-sonnet-4-6' }}
# Stronger model for the secret-coherence editor. Keeps
# stale-secret cleanup precise instead of re-summarizing the whole
# artifact.
ANTHROPIC_EDITOR_MODEL: ${{ secrets.ANTHROPIC_EDITOR_MODEL || 'claude-sonnet-4-6' }}

- name: Sync toolkit sidebar navigation
run: pnpm exec tsx toolkit-docs-generator/scripts/sync-toolkit-sidebar.ts --remove-empty-sections=false --verbose

- name: Get app token
id: app-token
uses: ./.github/actions/app-token
with:
app-id: ${{ secrets.DOCS_BOT_CLIENT_ID }}
private-key: ${{ secrets.DOCS_BOT_PRIVATE_KEY }}
# GITHUB_TOKEN PRs do not start llmstxt.yml, so generate the file here.
# The toolkit generator CLI still does not write llms.txt.
- name: Generate llms.txt
run: pnpm llmstxt
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

- name: Create pull request
id: cpr
uses: peter-evans/create-pull-request@v7
env:
HUSKY: 0
with:
token: ${{ steps.app-token.outputs.token }}
author: ${{ steps.app-token.outputs.committer }}
committer: ${{ steps.app-token.outputs.committer }}
token: ${{ github.token }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-PRs skip required CI checks

High Severity

Replacing the GitHub App token with github.token stops Test from running on the automation/toolkit-docs PR. Generated JSON, sidebar _meta.tsx, and llms.txt skip lint, typecheck, and build, and required status checks will block merge. The design-system workflow already gates on a local build for this reason.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f2d1ee9. Configure here.

commit-message: "[AUTO] Adding MCP Servers docs update"
title: "[AUTO] Adding MCP Servers docs update"
body: |
Expand All @@ -139,7 +141,7 @@ jobs:
echo "::warning::Could not request review on PR #${{ steps.cpr.outputs.pull-request-number }}: $(cat review-error.log)"
fi
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GH_TOKEN: ${{ github.token }}

- name: Upload generation report
if: always()
Expand Down Expand Up @@ -222,7 +224,7 @@ jobs:

if [ "$GENERATION_SUCCEEDED" = "true" ]; then
headline=":warning: Toolkit docs generated, but the workflow failed afterward"
detail="Generation succeeded, so the toolkit JSON is fine. A later workflow step failed — inspect the run to determine whether sidebar sync, PR creation, artifact upload, or Slack notification needs attention."
detail="Generation succeeded, so the toolkit JSON is fine. A later workflow step failed — inspect the run to determine whether sidebar sync, llms.txt generation, PR creation, artifact upload, or Slack notification needs attention."
else
headline=":rotating_light: Toolkit docs generation failed"
detail="The failed run contains the exact file path and validation error."
Expand Down
37 changes: 10 additions & 27 deletions .github/workflows/llmstxt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ jobs:
name: Generate LLMSTXT
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- name: Use Node.js
uses: actions/setup-node@v4
Expand All @@ -41,10 +37,6 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref || github.ref }}
# No credentials to persist: the app token is minted further down,
# once there is something to push. The commit step below supplies it
# to git explicitly.
persist-credentials: false

- name: Install dependencies
run: npm install -g pnpm
Expand All @@ -66,36 +58,26 @@ jobs:
echo "has_changes=false" >> $GITHUB_OUTPUT
fi

- name: Get app token
if: steps.check-changes.outputs.has_changes == 'true'
id: app-token
uses: ./.github/actions/app-token
with:
app-id: ${{ secrets.DOCS_BOT_CLIENT_ID }}
private-key: ${{ secrets.DOCS_BOT_PRIVATE_KEY }}

# GITHUB_TOKEN pushes do not start other workflows. That is acceptable
# here: Test already ran on the author's commit, and llms.txt is a
# generated artifact.
- name: Commit changes to PR
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name == 'pull_request'
env:
GH_APP_TOKEN: ${{ steps.app-token.outputs.token }}
USER_NAME: ${{ steps.app-token.outputs.user-name }}
USER_EMAIL: ${{ steps.app-token.outputs.user-email }}
HEAD_REF: ${{ github.event.pull_request.head.ref }}
run: |
git config user.name "$USER_NAME"
git config user.email "$USER_EMAIL"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add public/llms.txt
git commit -m "🤖 Regenerate LLMs.txt"
git push "https://x-access-token:${GH_APP_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${HEAD_REF}"
git push origin "HEAD:${HEAD_REF}"

- name: Create Pull Request (for scheduled/manual runs)
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name != 'pull_request'
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.app-token.outputs.token }}
author: ${{ steps.app-token.outputs.committer }}
committer: ${{ steps.app-token.outputs.committer }}
token: ${{ github.token }}
commit-message: Regenerate LLMs.txt and related files
branch: auto-update-llms-txt
delete-branch: true
Expand All @@ -109,10 +91,11 @@ jobs:
continue-on-error: true
run: gh pr edit ${{ steps.cpr.outputs.pull-request-number }} --add-reviewer ArcadeAI/engineering-tools-and-dx
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GH_TOKEN: ${{ github.token }}

- name: Enable Pull Request Automerge
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name != 'pull_request' && steps.cpr.outputs.pull-request-number != ''
continue-on-error: true
run: gh pr merge --squash --auto ${{ steps.cpr.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GH_TOKEN: ${{ github.token }}
Loading