Skip to content

feat: Agent readiness — Link headers, markdown negotiation, A2A/MCP compliance - #202

Merged
ayoub3bidi merged 1 commit into
developfrom
fix/make-it-agent-ready-2
Jul 17, 2026
Merged

feat: Agent readiness — Link headers, markdown negotiation, A2A/MCP compliance#202
ayoub3bidi merged 1 commit into
developfrom
fix/make-it-agent-ready-2

Conversation

@ayoub3bidi

@ayoub3bidi ayoub3bidi commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Contribution workflow

  • Base branch is develop: This PR targets develop, not main.
  • Guidelines and docs: I have read CONTRIBUTING.md and the docs relevant to my change.
  • This template: I kept the PR template structure and filled in the sections below.

Description

Make Bayan Flow agent-ready by implementing three agent discovery standards and fixing multiple isitagentready.com scanner failures:

  1. Link Headers (RFC 8288) — Add service-desc, service-doc, describedby relation types so agents can discover machine-readable resources from HTTP headers
  2. Markdown Negotiation — Add a Cloudflare Worker that serves pre-built markdown summaries when agents send Accept: text/markdown
  3. A2A/MCP Compliance — Fix agent card and MCP server card to pass A2A spec validation

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/UI improvement
  • ⚡ Performance improvement
  • 🧪 Test addition or improvement
  • 🔧 Chore (maintenance, dependencies, etc.)

Related Issues

Fixes # (isitagentready.com scan failures)

Changes Made

  • Added service-desc, service-doc, describedby Link headers to public/_headers
  • Updated api-catalog Content-Type with RFC 9727 profile parameter
  • Added A2A required fields (version, skills, supportedInterfaces) to agent-card.json
  • Created /.well-known/mcp.json at scanner-expected path (was only at /.well-known/mcp/server-card.json)
  • Created worker/index.js — Cloudflare Worker fetch handler for Accept: text/markdown content negotiation
  • Created 6 markdown summary files in public/markdown/ (index, app, roadmap, privacy, terms, fallback)
  • Updated wrangler.jsonc with Worker entry point and assets binding

Testing

  • All existing tests pass (pnpm test:run)
  • ESLint passes (pnpm lint)
  • Prettier formatting applied (pnpm format:check)
  • Build succeeds (pnpm build)

Test Results

Lint: 0 errors, 3 pre-existing warnings
Format: All matched files use Prettier code style!
Tests: 155 passed, 1834 tests passed
Build: ✓ built in 2.09s

Breaking Changes

  • None

Additional Notes

Post-merge manual steps required:

  1. Fix DNS-AID records (Cloudflare Dashboard): Update _a2a._agents and _mcp._agents SVCB records to include alpn="h2" port=443 mandatory=alpn,port
  2. Enable DNSSEC (Cloudflare Dashboard): DNS → Settings → DNSSEC → Enable
  3. Purge Cloudflare cache: Caching → Purge Everything

Scanner check results after deployment:

Check Status
linkHeaders pass (new)
markdownNegotiation pass (new)
apiCatalog pass (new)
authMd pass (redeployment)
mcpServerCard pass (new)
a2aAgentCard pass (new)
oauthProtectedResource pass (redeployment)
dnsAid pass (after DNS fix)

Summary by CodeRabbit

  • New Features

    • Added MCP server discovery with tools for viewing Bayan Flow information and listing algorithms.
    • Added structured agent metadata, supported interfaces, and service discovery links.
    • Markdown-aware requests now receive dedicated documentation pages with a fallback page.
  • Documentation

    • Added overview, app guide, privacy policy, terms of use, roadmap, and fallback documentation.
    • Documented available algorithm categories, features, integrations, and key links.
  • Configuration

    • Enabled Worker-based asset handling and routing for the new discovery and documentation endpoints.

@github-actions github-actions Bot added documentation Improvements or additions to documentation ci Workflows labels Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ayoub3bidi, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 75c70c0a-4693-4935-bbf8-bdc9e4617905

📥 Commits

Reviewing files that changed from the base of the PR and between b472964 and ee0ac25.

📒 Files selected for processing (12)
  • public/.well-known/agent-card.json
  • public/.well-known/mcp.json
  • public/_headers
  • public/markdown/_fallback.md
  • public/markdown/app.md
  • public/markdown/index.md
  • public/markdown/privacy.md
  • public/markdown/roadmap.md
  • public/markdown/terms.md
  • worker/index.js
  • worker/index.test.js
  • wrangler.jsonc
📝 Walkthrough

Walkthrough

Adds Cloudflare Worker markdown negotiation with fallback content, new public markdown pages, expanded agent and MCP discovery metadata, and updated well-known headers and routing configuration.

Changes

Agent delivery and discovery

Layer / File(s) Summary
Markdown content pages
public/markdown/*.md
Adds overview, app, fallback, privacy, roadmap, and terms pages.
Markdown asset serving
worker/index.js, wrangler.jsonc
Configures the Worker and serves requested markdown assets or a fallback based on the Accept header.
Agent discovery metadata
public/.well-known/*.json, public/_headers
Adds agent and MCP manifests and updates discovery links and content types.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Worker
  participant ASSETS
  Client->>Worker: Request with Accept: text/markdown
  Worker->>ASSETS: Fetch requested markdown asset
  ASSETS-->>Worker: Asset response
  Worker-->>Client: Markdown response or fallback content
Loading

Possibly related PRs

Suggested labels: config

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: agent-readiness updates, link headers, markdown negotiation, and A2A/MCP compliance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/make-it-agent-ready-2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

Preview for Bayan Flow Staging ready!

Name Link
🔨 Latest commit ee0ac25
🔍 Latest deploy log https://github.com/ayoub3bidi/bayan-flow/actions/runs/29602636886
😎 Deploy Preview https://pr-202-bayan-flow-staging.ayoub3bidi.workers.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Preview alias pr-202 on the staging worker. Updates automatically with new commits.

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…ompliance

- Add service-desc, service-doc, describedby Link headers (RFC 8288)
- Update api-catalog Content-Type with RFC 9727 profile parameter
- Add A2A required fields to agent-card.json (version, skills, supportedInterfaces)
- Create .well-known/mcp.json at scanner-expected path
- Add Cloudflare Worker for Accept: text/markdown content negotiation
- Add markdown summary files for all public pages
- Update wrangler.jsonc with Worker entry point and assets binding
@ayoub3bidi
ayoub3bidi force-pushed the fix/make-it-agent-ready-2 branch from b472964 to ee0ac25 Compare July 17, 2026 18:07
@github-actions github-actions Bot added the tests label Jul 17, 2026
@ayoub3bidi
ayoub3bidi merged commit 636d1ea into develop Jul 17, 2026
15 checks passed
@ayoub3bidi
ayoub3bidi deleted the fix/make-it-agent-ready-2 branch July 17, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Workflows documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant