You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a hardened, read-only agent API and migrates the full-stack Next.js deployment from the archived Cloudflare Pages adapter to OpenNext on Cloudflare Workers.
Agent capabilities
Search API at /api/resources
Stable UUID/slug lookup at /api/resources/{id}
Facet discovery at /api/facets
Dataset health at /api/health
Agent discovery at /.well-known/agent-card.json
Generated OpenAPI and LLM-readable artifacts
Canonical remote MCP discovery at https://mcp.yourselftoscience.org/mcp
Workers migration
Worker name: yourselftoscience-web
Node.js 22.23.1
Next.js 15.5.22
React and React DOM 19.2.8
@opennextjs/cloudflare1.20.2
Wrangler 4.114.0
OpenNext static-assets cache with no R2, D1, KV, Durable Objects, or Queues
Removed @cloudflare/next-on-pages and obsolete direct Vercel build dependencies
Removed all route-level Edge Runtime declarations
Added wrangler.jsonc, open-next.config.ts, Workers scripts, static-asset headers, and local-secret templates
Integrated security controls
Strict single-value query parsing and bounded inputs
Strict integer ranges, enums, and boolean parsing
Tri-state boolean filtering
URL-safe bounded resource identifiers
Generic public errors with detailed failures kept server-side
Dataset, in-flight request, and normalized-search caching
Fail-closed generation and validation of AI/agent artifacts
Fixed-destination bounded Umami proxies
64 KiB analytics-event limit and strict JSON media type
Self-hosted Next image optimization disabled
Middleware redirects marked private, no-store and varied on x-nextjs-data
Patched direct and transitive runtime/build dependencies
Read-only permanent GitHub Actions validation
Final repository verification
Permanent workflow run 30865201782 passed on the final migration configuration:
The repository migration is complete, but the Worker has not yet been created in the Cloudflare account or tested through a live Workers preview. Keep this PR in draft and unmerged until:
yourselftoscience-web is created from this GitHub branch;
runtime secrets are configured;
the Workers preview passes the documented API, forms, analytics, redirects, static assets, agent-card, OpenAPI, and MCP smoke tests;
the custom domains are cut over from Pages without capturing mcp.yourselftoscience.org;
production verification passes.
The existing Pages project should remain available as a rollback target until the Worker cutover is proven. Detailed instructions are in docs/cloudflare-agent-api-security.md; deployment completion remains tracked in issue #36.
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
jnton
changed the title
Make Yourself to Science agent-ready on Cloudflare Pages
Make Yourself to Science agent-ready on Cloudflare Workers
Aug 4, 2026
permanent CI is read-only and now blocks high/critical runtime and build dependency findings
No one-shot migration or remediation workflow remains on the branch.
The only remaining blocker is live Cloudflare deployment. Create yourselftoscience-web from this branch, configure runtime secrets, run the documented Workers preview smoke tests, and complete the custom-domain cutover before marking this PR ready or merging it. Keep the existing Pages project as rollback until production verification passes.
Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a hardened, read-only agent API and migrates the full-stack Next.js deployment from the archived Cloudflare Pages adapter to OpenNext on Cloudflare Workers.
Agent capabilities
/api/resources/api/resources/{id}/api/facets/api/health/.well-known/agent-card.jsonhttps://mcp.yourselftoscience.org/mcpWorkers migration
yourselftoscience-web22.23.115.5.2219.2.8@opennextjs/cloudflare1.20.24.114.0@cloudflare/next-on-pagesand obsolete direct Vercel build dependencieswrangler.jsonc,open-next.config.ts, Workers scripts, static-asset headers, and local-secret templatesIntegrated security controls
private, no-storeand varied onx-nextjs-dataFinal repository verification
Permanent workflow run
30865201782passed on the final migration configuration:1677.25 KiB(below the Free-plan3072 KiBlimit)0findings0findingsDeployment state
The repository migration is complete, but the Worker has not yet been created in the Cloudflare account or tested through a live Workers preview. Keep this PR in draft and unmerged until:
yourselftoscience-webis created from this GitHub branch;mcp.yourselftoscience.org;The existing Pages project should remain available as a rollback target until the Worker cutover is proven. Detailed instructions are in
docs/cloudflare-agent-api-security.md; deployment completion remains tracked in issue #36.