mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
2dcfc25b4c
OSS-451 shipped because nothing linked a demo page's CopilotKit runtimeUrl to the existence of the /api route it names. The only automatic pre-merge gate for showcase/** is a Docker build, which compiles a page that references a non-existent route just fine (runtimeUrl is an unchecked string) — so the page-404-on-load class was invisible. Add a static validator (validate-runtime-routes.ts) that, for every SHIPPED demo (a demo listed in its integration's manifest `features`), asserts its runtimeUrl resolves to a real route dir under src/app/api. Unshipped / experimental demos (not in `features`) and not_supported_features are skipped, so incomplete placeholders don't fail the gate — but promoting one into `features` immediately starts enforcing it. A baseline file can grandfather pre-existing violations; the fleet is currently clean (0). Wire it into a new pre-merge workflow (showcase_validate-wiring.yml) that runs on every showcase/integrations PR alongside the build check. Add it to branch-protection required checks to make it blocking. Regression test proves it flags the exact OSS-451 shape (shipped demo, missing route) while passing existing/base routes and skipping unshipped. Verified: npm run validate-routes -> clean fleet-wide; removing the 3 OSS-451 routes -> flags exactly those 3; full showcase/scripts vitest suite (2151 tests) green. Refs OSS-451
41 lines
1.3 KiB
JSON
41 lines
1.3 KiB
JSON
{
|
|
"name": "@copilotkit/showcase-scripts",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"generate-registry": "tsx generate-registry.ts",
|
|
"verify-shell-docs": "tsx verify-shell-docs.ts",
|
|
"verify-shell-docs:fast": "tsx verify-shell-docs.ts --skip-build",
|
|
"probe-docs": "tsx probe-docs.ts",
|
|
"probe-claude-quickstarts": "tsx probe-claude-quickstarts.ts",
|
|
"check-claude-quickstarts:runtime": "tsx check-claude-quickstarts-runtime.ts",
|
|
"validate-manifests": "tsx generate-registry.ts --validate-only",
|
|
"validate-routes": "tsx validate-runtime-routes.ts --all",
|
|
"showcase:audit": "tsx audit.ts",
|
|
"create-integration": "tsx create-integration/index.ts",
|
|
"bundle-content": "tsx bundle-demo-content.ts",
|
|
"bundle-setup-content": "tsx bundle-setup-content.ts",
|
|
"extract-starter": "tsx extract-starter.ts",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@copilotkit/aimock": "1.26.1",
|
|
"@playwright/test": "^1.59.1",
|
|
"ajv": "^8.17.1",
|
|
"ajv-formats": "^3.0.1",
|
|
"chalk": "^5.4.0",
|
|
"glob": "^10.4.0",
|
|
"playwright": "^1.59.1",
|
|
"prompts": "^2.4.2",
|
|
"tsx": "^4.19.0",
|
|
"yaml": "^2.7.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.0.0",
|
|
"@types/prompts": "^2.4.9",
|
|
"@vitest/coverage-v8": "^4.1.5",
|
|
"vitest": "^4.1.5"
|
|
}
|
|
}
|