Skip to content

Commit 2055fee

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/add-md-alternate-links
2 parents b0682e8 + ae46ddf commit 2055fee

File tree

76 files changed

+4621
-1193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+4621
-1193
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Check Redirects for Deleted Pages
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
paths:
7+
- "app/**/*.md"
8+
- "app/**/*.mdx"
9+
- "next.config.ts"
10+
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
15+
jobs:
16+
check-redirects:
17+
name: Verify Deleted Pages Have Redirects
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0 # Full history needed for branch comparison
25+
26+
- name: Fetch base branch
27+
run: git fetch origin ${{ github.base_ref }}:${{ github.base_ref }}
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: "20"
33+
34+
- name: Install dependencies
35+
run: npm install -g pnpm && pnpm install
36+
37+
- name: Check for missing redirects
38+
id: check
39+
run: |
40+
set -o pipefail
41+
pnpm check-redirects ${{ github.base_ref }} 2>&1 | tee redirect-check-output.txt
42+
continue-on-error: true
43+
44+
- name: Comment on PR if redirects are missing
45+
if: steps.check.outcome == 'failure'
46+
uses: actions/github-script@v7
47+
with:
48+
script: |
49+
const fs = require('fs');
50+
const output = fs.readFileSync('redirect-check-output.txt', 'utf8');
51+
52+
// Extract the missing redirects and suggestions from output
53+
const body = `## 🔗 Missing Redirects Detected
54+
55+
This PR deletes markdown files that don't have corresponding redirects in \`next.config.ts\`.
56+
57+
When you delete a page, you must add a redirect to prevent broken links for users who have bookmarked the old URL.
58+
59+
<details>
60+
<summary>📋 View Details</summary>
61+
62+
\`\`\`
63+
${output}
64+
\`\`\`
65+
66+
</details>
67+
68+
### How to fix
69+
70+
1. Open \`next.config.ts\`
71+
2. Find the \`redirects()\` function
72+
3. Add redirect entries for each deleted file (see suggestions above)
73+
4. Push the changes
74+
75+
---
76+
*This check ensures we maintain URL stability for our documentation.*`;
77+
78+
// Check if we already commented
79+
const { data: comments } = await github.rest.issues.listComments({
80+
owner: context.repo.owner,
81+
repo: context.repo.repo,
82+
issue_number: context.issue.number,
83+
});
84+
85+
const botComment = comments.find(comment =>
86+
comment.user.type === 'Bot' &&
87+
comment.body.includes('Missing Redirects Detected')
88+
);
89+
90+
if (botComment) {
91+
await github.rest.issues.updateComment({
92+
owner: context.repo.owner,
93+
repo: context.repo.repo,
94+
comment_id: botComment.id,
95+
body: body
96+
});
97+
} else {
98+
await github.rest.issues.createComment({
99+
owner: context.repo.owner,
100+
repo: context.repo.repo,
101+
issue_number: context.issue.number,
102+
body: body
103+
});
104+
}
105+
106+
- name: Remove outdated comment if check passes
107+
if: steps.check.outcome == 'success'
108+
uses: actions/github-script@v7
109+
with:
110+
script: |
111+
const { data: comments } = await github.rest.issues.listComments({
112+
owner: context.repo.owner,
113+
repo: context.repo.repo,
114+
issue_number: context.issue.number,
115+
});
116+
117+
const botComment = comments.find(comment =>
118+
comment.user.type === 'Bot' &&
119+
comment.body.includes('Missing Redirects Detected')
120+
);
121+
122+
if (botComment) {
123+
await github.rest.issues.deleteComment({
124+
owner: context.repo.owner,
125+
repo: context.repo.repo,
126+
comment_id: botComment.id,
127+
});
128+
}
129+
130+
- name: Fail if redirects are missing
131+
if: steps.check.outcome == 'failure'
132+
run: |
133+
echo "❌ Missing redirects for deleted pages. See PR comment for details."
134+
exit 1

.husky/pre-commit

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,98 @@ if [ -n "$STAGED_DOCS" ]; then
2929
fi
3030
fi
3131

32+
# --- Check Meta Keys (when _meta.tsx files are changed) ---
33+
STAGED_META=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '_meta\.tsx$' || true)
34+
35+
if [ -n "$STAGED_META" ]; then
36+
echo "🔍 Checking _meta.tsx keys..."
37+
38+
if ! pnpm check-meta --staged-only; then
39+
echo ""
40+
echo "❌ Commit blocked: _meta.tsx keys must match sibling directories or files."
41+
exit 1
42+
fi
43+
fi
44+
45+
# --- Check Redirects (when markdown pages are deleted or renamed) ---
46+
# Detect deleted pages (D status) and renamed pages (R status - old path needs redirect)
47+
DELETED_PAGES=$(git diff --cached --name-status | grep -E "^D.*page\.(md|mdx)$" | cut -f2 || true)
48+
RENAMED_PAGES=$(git diff --cached --name-status | grep -E "^R.*page\.(md|mdx)$" | cut -f2 || true)
49+
50+
if [ -n "$DELETED_PAGES" ] || [ -n "$RENAMED_PAGES" ]; then
51+
echo "🔗 Detected deleted/renamed page(s), checking for redirects..."
52+
53+
# Run the TypeScript redirect checker with auto-fix (only checks staged changes)
54+
# This will add redirect entries to next.config.ts if missing
55+
if ! pnpm check-redirects --auto-fix --staged-only 2>&1; then
56+
# Stage next.config.ts if it was modified
57+
if git diff --name-only next.config.ts 2>/dev/null | grep -q "next.config.ts"; then
58+
git add next.config.ts
59+
echo ""
60+
echo "📝 Redirect entries added to next.config.ts and staged."
61+
fi
62+
echo ""
63+
# Check if there are placeholders vs other errors
64+
if grep -q "REPLACE_WITH_NEW_PATH" next.config.ts 2>/dev/null; then
65+
echo "❌ Commit blocked: Please update the placeholder destinations in next.config.ts"
66+
echo " Search for 'REPLACE_WITH_NEW_PATH' and provide actual redirect paths."
67+
else
68+
echo "❌ Commit blocked: Please fix the redirect issues shown above."
69+
fi
70+
exit 1
71+
fi
72+
fi
73+
74+
# --- Update Internal Links (when redirects are added) ---
75+
# If next.config.ts is staged, update any internal links pointing to redirected paths
76+
if git diff --cached --name-only | grep -q "next.config.ts"; then
77+
echo "🔗 Updating internal links for new redirects..."
78+
79+
# Capture files already modified in working directory BEFORE running update-links
80+
# This prevents accidentally staging unrelated changes the user has in progress
81+
ALREADY_MODIFIED=$(git diff --name-only -- 'app/**/*.mdx' 'app/**/*.tsx' 'app/**/*.md' 2>/dev/null || true)
82+
83+
# Run the TypeScript update script
84+
if pnpm update-links 2>/dev/null; then
85+
# Find files modified AFTER running update-links
86+
NOW_MODIFIED=$(git diff --name-only -- 'app/**/*.mdx' 'app/**/*.tsx' 'app/**/*.md' 2>/dev/null || true)
87+
88+
# Only stage files that were NOT already modified (i.e., newly modified by update-links)
89+
STAGED_COUNT=0
90+
SKIPPED_FILES=""
91+
if [ -n "$NOW_MODIFIED" ]; then
92+
for file in $NOW_MODIFIED; do
93+
# Check if this file was already modified before update-links ran
94+
if [ -z "$ALREADY_MODIFIED" ] || ! echo "$ALREADY_MODIFIED" | grep -qxF "$file"; then
95+
git add "$file"
96+
STAGED_COUNT=$((STAGED_COUNT + 1))
97+
else
98+
# File had both user's unstaged changes AND needed link updates
99+
# We can't stage it without also staging user's unrelated changes
100+
SKIPPED_FILES="$SKIPPED_FILES $file"
101+
fi
102+
done
103+
fi
104+
105+
if [ "$STAGED_COUNT" -gt 0 ]; then
106+
echo "✅ Internal links updated and staged ($STAGED_COUNT file(s))"
107+
fi
108+
109+
# Warn about files that needed link updates but couldn't be staged
110+
if [ -n "$SKIPPED_FILES" ]; then
111+
echo ""
112+
echo "⚠️ Warning: The following files need link updates but have unstaged changes:"
113+
for file in $SKIPPED_FILES; do
114+
echo " - $file"
115+
done
116+
echo ""
117+
echo " The link updates were applied but NOT staged to avoid mixing with your changes."
118+
echo " After this commit, review these files and stage the link updates separately,"
119+
echo " or run 'git checkout -- <file>' to discard all changes including link updates."
120+
fi
121+
fi
122+
fi
123+
32124
# --- Lint Staged (formatting) ---
33125
pnpm dlx lint-staged
34126

agents/changelog/agents/changelog.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,15 @@ When updating the changelog, follow these rules:
5353
privateRepositories: string[],
5454
) {
5555
this.logger.startSpan(
56-
`Generating changelog from changes in ${repositories.join(", ")}...`,
56+
`Generating changelog from changes in ${repositories.join(", ")} and ${privateRepositories.join(", ")}...`,
5757
);
5858

5959
const result = await this.run(
6060
`
6161
Today is ${new Date().toISOString().split("T")[0]}.
6262
The full path to the changelog.md that you will be appending to is \`${changelogPath}\`.
6363
The Github repositories to load commits from are: ${repositories.join(", ")}
64+
The Github private repositories to load commits from are: ${privateRepositories.join(", ")}
6465
When appending to the changelog, do not include links for the private repositories, which are: ${privateRepositories.join(", ")}
6566
`,
6667
);

agents/changelog/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ program
6565
.argument(
6666
"[repos]",
6767
"A comma separated list of repositories to load the changelogs from",
68-
"ArcadeAI/docs,ArcadeAI/arcade-mcp,ArcadeAI/Cloud,ArcadeAI/Engine,ArcadeAI/dashboard,ArcadeAI/toolkits",
68+
"ArcadeAI/docs,ArcadeAI/arcade-mcp",
6969
)
7070
.argument(
7171
"[private_repos]",
7272
"A comma separated list of private repositories to load the changelogs from",
73-
"ArcadeAI/Cloud,ArcadeAI/Engine,ArcadeAI/dashboard,ArcadeAI/toolkits",
73+
"ArcadeAI/monorepo",
7474
)
7575
.action(
7676
async (

app/_components/tool-footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const ToolFooter: React.FC<ToolFooterProps> = ({ pipPackageName }) => (
1515
<div className="mt-16 grid gap-8 md:grid-cols-2">
1616
<QuickStartCard
1717
description="Arcade tools are hosted by our cloud platform and ready to be used in your agents. Learn how."
18-
href="/home/quickstart"
18+
href="/get-started/quickstarts/call-tool-agent"
1919
icon={Cloud}
2020
title="Use tools hosted on Arcade Cloud"
2121
/>
@@ -24,7 +24,7 @@ const ToolFooter: React.FC<ToolFooterProps> = ({ pipPackageName }) => (
2424
description={
2525
"Arcade tools can be self-hosted on your own infrastructure. Learn more about self-hosting."
2626
}
27-
href="/home/hosting-overview"
27+
href="/guides/deployment-hosting"
2828
icon={Puzzle}
2929
title="Self Host Arcade tools"
3030
/>

app/en/get-started/_meta.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export const meta: MetaRecord = {
44
"about-arcade": "About Arcade",
55
setup: "Setup",
66
quickstarts: "Quickstarts",
7+
"agent-frameworks": "Agent Frameworks",
8+
"mcp-clients": "MCP Clients",
79
};
810

911
export default meta;

app/en/guides/agent-frameworks/_meta.tsx renamed to app/en/get-started/agent-frameworks/_meta.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ export const meta: MetaRecord = {
44
index: {
55
title: "Overview",
66
},
7+
"setup-arcade-with-your-llm-python": {
8+
title: "Setup Arcade with your LLM (Python)",
9+
},
710
crewai: {
811
title: "CrewAI",
912
},
@@ -20,7 +23,7 @@ export const meta: MetaRecord = {
2023
title: "OpenAI Agents",
2124
},
2225
vercelai: {
23-
title: "Vercel AI",
26+
title: "Vercel AI SDK",
2427
},
2528
};
2629

File renamed without changes.

app/en/guides/agent-frameworks/crewai/custom-auth-flow/page.mdx renamed to app/en/get-started/agent-frameworks/crewai/custom-auth-flow/page.mdx

File renamed without changes.

app/en/guides/agent-frameworks/crewai/use-arcade-tools/page.mdx renamed to app/en/get-started/agent-frameworks/crewai/use-arcade-tools/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import ToggleContent from "@/app/_components/toggle-content";
88

99
## Use CrewAI with Arcade
1010

11-
In this guide, we will explore how to integrate Arcade tools into your CrewAI application. Follow the step-by-step instructions below. If a tool requires authorization, an authorization URL will appear in the console, waiting for your approval. This process ensures that only the tools you choose to authorize are executed.
11+
This guide explains how to integrate Arcade tools into your CrewAI application. Follow the step-by-step instructions below. If a tool requires authorization, an authorization URL will appear in the console, waiting for your approval. This process ensures that only the tools you choose to authorize execute.
1212

13-
To tailor the tool authorization flow to meet your application's specific needs, check out the [Custom Auth Flow with CrewAI](/guides/agent-frameworks/crewai/custom-auth-flow) guide.
13+
To tailor the tool authorization flow to meet your application's specific needs, check out the [Custom Auth Flow with CrewAI](/get-started/agent-frameworks/crewai/custom-auth-flow) guide.
1414

1515
<Steps>
1616

0 commit comments

Comments
 (0)