Skip to content

Commit 9a09cbf

Browse files
Merge branch 'main' into codex/copilotkit-single-route-basepath
2 parents efe7cc7 + 6e452e5 commit 9a09cbf

1,708 files changed

Lines changed: 104129 additions & 104930 deletions

File tree

Some content is hidden

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

‎.changeset/angular-copilot-activity.md‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎.claude-plugin/marketplace.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
},
77
"metadata": {
88
"description": "AI agent skills for CopilotKit — search the current documentation and source, and drive the CopilotKit CLI",
9-
"version": "1.73.0"
9+
"version": "1.74.0"
1010
},
1111
"plugins": [
1212
{
1313
"name": "copilotkit",
1414
"source": "./",
1515
"description": "AI agent skills for CopilotKit — search the current documentation and source, and drive the CopilotKit CLI",
16-
"version": "1.73.0",
16+
"version": "1.74.0",
1717
"author": {
1818
"name": "CopilotKit",
1919
"url": "https://copilotkit.ai"

‎.claude-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "copilotkit",
33
"description": "AI agent skills for CopilotKit — search the current documentation and source, and drive the CopilotKit CLI",
4-
"version": "1.73.0",
4+
"version": "1.74.0",
55
"author": {
66
"name": "CopilotKit",
77
"url": "https://copilotkit.ai"

‎.claude/docs/aeo-synthetics.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ Failures are owned by `#oss-alerts`. The alert includes the failing URL, crawler
66

77
These checks send documented crawler `User-Agent` values to exercise CDN, firewall, and application behavior. A spoofed header does not prove that a provider's verified crawler IP ranges or reverse-DNS identity can reach the service; investigate provider-identity access separately when the header-based check passes but real crawl telemetry regresses.
88

9+
## Supported surfaces and owners
10+
11+
This is a maintainer checklist, not a public API or a new discovery endpoint. Keep endpoint expectations in [the existing checker](../../showcase/scripts/check-aeo-synthetics.ts); do not introduce a second JSON registry.
12+
13+
| Deployment / owner | Supported surfaces | Existing verification |
14+
| ------------------------------------------ | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15+
| Docs maintainers — `docs.copilotkit.ai` | `/`, `/robots.txt`, `/sitemap.xml`, `/llms.txt`, `/llms-full.txt` | Production synthetics check status, media type, canonical URLs, and index links. |
16+
| Docs maintainers — same deployment | Per-page `.md` and `.mdx` responses | Shell-docs route tests in the existing `shell-docs unit suite` CI job. Sample a real Markdown page after deployment. |
17+
| Website maintainers — `www.copilotkit.ai` | `/`, `/robots.txt`, `/sitemap.xml`, `/llms.txt` | Production synthetics plus route tests in `CopilotKit/website`. Website `/llms-full.txt` is not published or advertised; do not require it unless that changes. |
18+
| Docs MCP maintainers — `mcp.copilotkit.ai` | `/sse` transport | Service-owned verification; not covered by this HTTP discovery checker. |
19+
20+
For machine endpoints, a successful HTML fallback is a failure even if its header claims plain text. These checks measure reachability and response shape, not whether an answer engine recommends CopilotKit or Intelligence.
21+
22+
## When changing a discovery surface
23+
24+
1. Keep the existing URL and response format working, or update consumers and redirects deliberately. Robots/sitemaps/canonical metadata use web conventions; `llms.txt` is a community convention, not a crawler guarantee.
25+
2. Update the owning route test and, if a monitored endpoint changes, the existing checker and its tests in the same change. Coordinate website changes in `CopilotKit/website`; this repository does not deploy them.
26+
3. Reuse existing CI. For a focused local check, run `pnpm nx run @copilotkit/showcase-scripts:test -- __tests__/check-aeo-synthetics.test.ts __tests__/aeo-synthetics-wiring.test.ts --maxWorkers=1`.
27+
4. After deployment, run `pnpm nx run @copilotkit/showcase-scripts:check-aeo-synthetics` or the manual Actions workflow. When Markdown rendering changes, also fetch a representative page's `.md` and `.mdx` output and check its status, media type, and readable content.
28+
29+
Do not add a schedule or claim monitoring is active until the green production baseline and deliberate Slack alert exercise described below are complete.
30+
931
## Triage
1032

1133
1. Open the failed run and locate each `[FAIL]` record. Confirm whether the failure affects one crawler user agent or every agent.

‎.claude/docs/documentation.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ builds and serves **docs.copilotkit.ai**:
1818
When you add a **guide page** under `showcase/shell-docs/src/content/docs/`, also update
1919
that section's `meta.json` so it appears in navigation.
2020

21+
When the page is customer-facing Intelligence docs, follow
22+
`skills/intelligence-vocabulary/SKILL.md` before writing. One concept gets one
23+
approved name. Do not rename code identifiers, route slugs, env vars, or API
24+
fields to match that list.
25+
2126
### Hybrid docs architecture
2227

2328
Framework docs are in a hybrid state while showcase coverage is being completed. The

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*.sh text eol=lf
1414
showcase/shell-docs/public/images/prompt-claude.webp filter=lfs diff=lfs merge=lfs -text
1515
showcase/shell-docs/public/images/prompt-codex.webp filter=lfs diff=lfs merge=lfs -text
16+
showcase/shell-docs/public/images/cookbook/*.webp filter=lfs diff=lfs merge=lfs -text
1617

1718
# Generated by packages/react-core/scripts/generate-external-reexports.mjs.
1819
packages/react-core/src/v2/external-reexports.ts linguist-generated=true

‎.github/config-allowlist.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ examples/showcases/enterprise-brex/next.config.mjs
4646
examples/showcases/generative-ui-playground/next.config.ts
4747
examples/showcases/grok-generative-ui/next.config.ts
4848
examples/showcases/langgraph-js-support-agents/apps/web/next.config.ts
49+
examples/showcases/manufact-mcp-apps/web/next.config.ts
4950
examples/showcases/mcp-apps/mcp-server/apps/vite.config.ts
5051
examples/showcases/mcp-apps/next.config.ts
5152
examples/showcases/mcp-demo/next.config.ts
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: "Docs: open prod release PR"
2+
3+
on:
4+
# Chain: push -> Build & Push -> Verify Deploy -> this workflow. GitHub
5+
# limits workflow_run chaining to three downstream levels; do not grow
6+
# this pipeline without checking that limit. Promotion uses a PR event.
7+
workflow_run:
8+
workflows: ["Showcase: Verify Deploy"]
9+
types: [completed]
10+
branches: [main]
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: docs-open-release-pr
15+
cancel-in-progress: true
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
pending-release:
22+
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.head_branch == 'main'
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 5
25+
permissions:
26+
pull-requests: read
27+
outputs:
28+
exists: ${{ steps.pending.outputs.exists }}
29+
steps:
30+
# Never push a new pin over a reviewed release. A maintainer must merge
31+
# or close it before another candidate is prepared.
32+
- name: Keep an open release PR stable
33+
id: pending
34+
env:
35+
GH_TOKEN: ${{ github.token }}
36+
run: |
37+
set -euo pipefail
38+
count=$(gh pr list --repo "$GITHUB_REPOSITORY" --base main \
39+
--head release/docs/prod --state open --json number --jq 'length')
40+
if [ "$count" -gt 0 ]; then
41+
echo "exists=true" >> "$GITHUB_OUTPUT"
42+
echo "::notice::An open docs release PR is awaiting review; leaving its pin unchanged."
43+
else
44+
echo "exists=false" >> "$GITHUB_OUTPUT"
45+
fi
46+
47+
open-pr:
48+
needs: pending-release
49+
if: needs.pending-release.outputs.exists == 'false'
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 15
52+
environment: railway
53+
permissions:
54+
contents: write
55+
pull-requests: write
56+
steps:
57+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
58+
with:
59+
persist-credentials: false
60+
ref: main
61+
62+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
63+
with:
64+
node-version: 22.x
65+
66+
- working-directory: showcase/scripts
67+
env:
68+
EMIT_SKIP_OXFMT: "1"
69+
run: |
70+
npm ci
71+
npx tsx emit-railway-envs-json.ts
72+
73+
- name: Probe docs staging
74+
id: probe
75+
working-directory: showcase/scripts
76+
env:
77+
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
78+
run: |
79+
set -euo pipefail
80+
if [ -z "${RAILWAY_TOKEN:-}" ]; then
81+
echo "::notice::RAILWAY_TOKEN is not set; skipping docs release PR."
82+
echo "skip=true" >> "$GITHUB_OUTPUT"
83+
exit 0
84+
fi
85+
# Bracket the health probe with digest reads. The pin CLI checks
86+
# this snapshot against Railway again rather than pinning a newer,
87+
# unprobed deployment that arrived while verification was running.
88+
STAGING_DIGEST=$(npx tsx -e '
89+
import { resolveRailwayToken } from "./lib/railway-token.ts";
90+
import { liveFetchDeployedDigest } from "./reconcile-staging.ts";
91+
import { ENV_ID_BY_NAME, SERVICES } from "./railway-envs.ts";
92+
liveFetchDeployedDigest(resolveRailwayToken().token, SERVICES.docs.serviceId, ENV_ID_BY_NAME.staging)
93+
.then(digest => console.log(digest ?? ""))
94+
.catch(error => { console.error(error); process.exit(1); });
95+
')
96+
if [ -z "$STAGING_DIGEST" ]; then
97+
echo "::notice::docs staging has no deployed digest; skipping release PR."
98+
echo "skip=true" >> "$GITHUB_OUTPUT"
99+
exit 0
100+
fi
101+
if npx tsx verify-deploy.ts --env staging --services docs; then
102+
echo "staging-digest=$STAGING_DIGEST" >> "$GITHUB_OUTPUT"
103+
echo "skip=false" >> "$GITHUB_OUTPUT"
104+
else
105+
echo "::notice::docs staging probe is red; not opening a release PR."
106+
echo "skip=true" >> "$GITHUB_OUTPUT"
107+
fi
108+
109+
- name: Prepare pin file
110+
id: pin
111+
if: steps.probe.outputs.skip != 'true'
112+
working-directory: showcase/scripts
113+
env:
114+
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
115+
GIT_SHA: ${{ github.event.workflow_run.head_sha || github.sha }}
116+
VERIFIED_STAGING_DIGEST: ${{ steps.probe.outputs.staging-digest }}
117+
run: |
118+
set -euo pipefail
119+
npx tsx prepare-docs-release-pin.ts \
120+
--pin-path=../../showcase/pins/docs-prod.json \
121+
--verified-staging-digest="$VERIFIED_STAGING_DIGEST" \
122+
--git-sha="$GIT_SHA"
123+
124+
- name: Mint devops-bot token
125+
if: steps.probe.outputs.skip != 'true' && steps.pin.outputs.skip != 'true'
126+
id: app-token
127+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
128+
with:
129+
app-id: "1108748"
130+
private-key: ${{ secrets.DEVOPS_BOT_PRIVATE_KEY }}
131+
permission-contents: write
132+
permission-pull-requests: write
133+
permission-issues: write
134+
135+
- name: Open docs release PR
136+
if: steps.probe.outputs.skip != 'true' && steps.pin.outputs.skip != 'true'
137+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
138+
env:
139+
LEFTHOOK: "0"
140+
with:
141+
token: ${{ steps.app-token.outputs.token }}
142+
branch: release/docs/prod
143+
delete-branch: false
144+
add-paths: showcase/pins/docs-prod.json
145+
commit-message: "chore: release docs ${{ github.event.workflow_run.head_sha || github.sha }}"
146+
title: "chore: release docs to prod"
147+
labels: docs-release
148+
body: |
149+
Staging docs is green. Merge this PR to pin `docs.copilotkit.ai`
150+
to the digest in `showcase/pins/docs-prod.json`.
151+
152+
- Staging: https://docs.staging.copilotkit.ai
153+
- Verification trigger SHA: `${{ github.event.workflow_run.head_sha || github.sha }}`
154+
- Digest: `${{ steps.pin.outputs.digest }}`
155+
156+
This is the docs prod gate. It does not promote the showcase fleet.
157+
The trigger SHA can be a scripts-only change, not the image's source
158+
revision; the digest above is the release identity.
159+
160+
The bot will not refresh this PR while it is open. Update its branch
161+
to main if required, then obtain approval of the latest push and merge
162+
once required checks pass. To replace this candidate, close the PR and
163+
dispatch **Docs: open prod release PR** again on main.
164+
Staging can advance during review, so inspect the pinned digest as
165+
well as the current staging page. See showcase/bin/README.md for gates.
166+
167+
- [ ] Staging page looks right
168+
- [ ] Digest in the pin file is the one you want

‎.github/workflows/docs_promote.yml‎

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: "Docs: promote pin to prod"
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches: [main]
7+
workflow_dispatch:
8+
inputs:
9+
dry_run:
10+
description: "Print the pin and stop before promote"
11+
required: false
12+
default: false
13+
type: boolean
14+
15+
concurrency:
16+
group: docs-promote
17+
cancel-in-progress: false
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
promote:
24+
if: >
25+
github.event_name == 'workflow_dispatch' ||
26+
(github.event.pull_request.merged == true &&
27+
github.event.pull_request.head.ref == 'release/docs/prod')
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 20
30+
environment: railway
31+
permissions:
32+
contents: read
33+
packages: read
34+
steps:
35+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
36+
with:
37+
persist-credentials: false
38+
# Closed PR merge refs are not durable. Read the pin that actually
39+
# landed; manual dispatch instead reads the explicitly selected ref.
40+
ref: ${{ github.event.pull_request.merge_commit_sha || github.sha }}
41+
42+
- uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0
43+
with:
44+
ruby-version: "3.3"
45+
bundler-cache: false
46+
47+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
48+
with:
49+
node-version: 22.x
50+
51+
- working-directory: showcase/scripts
52+
env:
53+
EMIT_SKIP_OXFMT: "1"
54+
run: |
55+
npm ci
56+
npx tsx emit-railway-envs-json.ts
57+
58+
- name: Read pin
59+
id: pin
60+
working-directory: showcase/scripts
61+
run: |
62+
set -euo pipefail
63+
PIN=../../showcase/pins/docs-prod.json
64+
if [ ! -f "$PIN" ]; then
65+
echo "::error::showcase/pins/docs-prod.json is missing"
66+
exit 1
67+
fi
68+
export PIN
69+
npx tsx -e '
70+
import { appendFileSync, readFileSync } from "node:fs";
71+
import { parseDocsProdPin } from "./docs-prod-pin.ts";
72+
const pinPath = process.env.PIN;
73+
if (!pinPath) throw new Error("PIN is not set");
74+
const pin = parseDocsProdPin(readFileSync(pinPath, "utf8"));
75+
const out = process.env.GITHUB_OUTPUT;
76+
if (!out) throw new Error("GITHUB_OUTPUT is not set");
77+
appendFileSync(out, "digest=" + pin.digest + "\nimage=" + pin.image + "\n");
78+
'
79+
80+
- name: Promote docs
81+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.dry_run != true }}
82+
env:
83+
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
84+
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
IMAGE: ${{ steps.pin.outputs.image }}
86+
run: |
87+
set -euo pipefail
88+
if [ -z "$RAILWAY_TOKEN" ]; then
89+
echo "::error::RAILWAY_TOKEN is not set"
90+
exit 1
91+
fi
92+
# Explicit --digest deploys the reviewed pin, even if staging has
93+
# advanced. It skips P2 (in-flight race) and staging-drift checks;
94+
# P1 (digest exists) and P3 (staging live-green) still run.
95+
showcase/bin/railway promote docs --digest "$IMAGE" --yes --non-interactive
96+
97+
- name: Probe docs prod
98+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.dry_run != true }}
99+
working-directory: showcase/scripts
100+
env:
101+
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
102+
run: npx tsx verify-deploy.ts --env prod --services docs
103+
104+
- name: Slack notify
105+
if: always() && (github.event_name != 'workflow_dispatch' || inputs.dry_run != true)
106+
env:
107+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
108+
JOB_STATUS: ${{ job.status }}
109+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
110+
DIGEST: ${{ steps.pin.outputs.digest }}
111+
run: |
112+
set -euo pipefail
113+
if [ -z "${SLACK_BOT_TOKEN:-}" ]; then
114+
echo "::notice::SLACK_BOT_TOKEN is not set; skipping Slack notify."
115+
exit 0
116+
fi
117+
if [ "$JOB_STATUS" = "success" ]; then
118+
CHANNEL="#team-showcase"
119+
TEXT="Docs prod pin shipped \`$DIGEST\`. $RUN_URL"
120+
else
121+
CHANNEL="#oss-alerts"
122+
TEXT="Docs prod pin failed \`$DIGEST\`. $RUN_URL"
123+
fi
124+
curl -sS -X POST https://slack.com/api/chat.postMessage \
125+
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
126+
-H "Content-Type: application/json" \
127+
-d "$(jq -n --arg channel "$CHANNEL" --arg text "$TEXT" '{channel:$channel,text:$text}')"

0 commit comments

Comments
 (0)