Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ dist/
# dependencies
node_modules/

# synced agent skills source checkout
.cache/

# agent skill files synced at build time from nextflow-io/agent-skills
public/.well-known/agent-skills/*/

# logs
npm-debug.log*
yarn-debug.log*
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ publish:
--acl public-read \
--exclude "$0"

bash scripts/set-s3-agent-metadata.sh

invalidate:
aws cloudfront create-invalidation --distribution-id E3RPV5P71OW0UF --paths '/*'

Expand Down
20 changes: 20 additions & 0 deletions infra/cloudfront/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# CloudFront agent-readiness configuration

Production hosting uses S3 + CloudFront. Apply these after deploying static files.

## Link response headers (RFC 8288)

1. Create a response headers policy from `response-headers-policy.json`, or attach equivalent `Link` headers to the default cache behavior for `/` and `/index.html`.
2. Alternatively, rely on `scripts/set-s3-agent-metadata.sh` (runs during `make publish`) which sets S3 object metadata on `index.html`.

## Markdown content negotiation

1. Publish the CloudFront Function in `markdown-negotiation.js`.
2. Associate it with **viewer-request** on the default behavior.
3. Ensure `index.md` is deployed to S3 (copied from `public/index.md` via the Astro build).

The function rewrites `/` and `/index.html` to `/index.md` when `Accept: text/markdown` is present.

## Netlify previews

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't want to touch netlify


PR previews use `public/_headers` for Link headers and `netlify/edge-functions/markdown-negotiate.js` for markdown negotiation.
18 changes: 18 additions & 0 deletions infra/cloudfront/markdown-negotiation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// CloudFront Function: serve markdown when Accept: text/markdown is present.
// Associate with viewer-request on the nextflow.io CloudFront distribution.
function handler(event) {
var request = event.request;
var headers = request.headers;
var accept = headers.accept ? headers.accept.value : "";
var uri = request.uri;

if (accept.indexOf("text/markdown") === -1) {
return request;
}

if (uri === "/" || uri === "/index.html") {
request.uri = "/index.md";
}

return request;
}
23 changes: 23 additions & 0 deletions infra/cloudfront/response-headers-policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Comment": "Link response headers for nextflow.io agent discovery (RFC 8288)",
"Name": "nextflow-io-agent-discovery-headers",
"HeadersConfig": {
"HeaderBehavior": "whitelist",
"Headers": {
"Quantity": 1,
"Items": ["Link"]
}
},
"CustomHeadersConfig": {
"Quantity": 1,
"Items": [
{
"Header": "Link",
"Value": "</.well-known/api-catalog>; rel=\"api-catalog\", </docs.seqera.io/nextflow/>; rel=\"service-doc\", </openapi.json>; rel=\"service-desc\"",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still referencing openai even though it's gone

"Override": false
}
]
},
"SecurityHeadersConfig": {},
"CorsConfig": {}
}
18 changes: 18 additions & 0 deletions infra/dns-aid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# DNS for AI Discovery (DNS-AID)

Publish the records in `nextflow.io.zone` under the `_agents` namespace for `nextflow.io`.

## Requirements

1. Add `_index._agents.nextflow.io` and `_a2a._agents.nextflow.io` SVCB records (see zone file).
2. Enable DNSSEC on the public zone and publish DS records at your domain registrar.
3. Verify with DNS-over-HTTPS:

```bash
curl -s 'https://cloudflare-dns.com/dns-query?name=_index._agents.nextflow.io&type=SVCB' \
-H 'accept: application/dns-json'
```

## Production note

DNS-AID records are managed outside this repository (Route 53, Cloudflare DNS, or your registrar). Apply the zone file through your DNS operations workflow after review.
12 changes: 12 additions & 0 deletions infra/dns-aid/nextflow.io.zone
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; DNS for AI Discovery (DNS-AID) records for nextflow.io
; Deploy this zone (or merge these records) with your DNS provider.
; Sign the zone with DNSSEC and publish DS records at the registrar.

$ORIGIN nextflow.io.
$TTL 3600

; Index entrypoint — points agents to the site's API catalog
_index._agents.nextflow.io. IN SVCB 1 nextflow.io. alpn="h3,h2" port=443 mandatory=alpn,port

; Agent-to-agent discovery entrypoint
_a2a._agents.nextflow.io. IN SVCB 1 nextflow.io. alpn="h3,h2" port=443 mandatory=alpn,port
36 changes: 36 additions & 0 deletions netlify/edge-functions/markdown-negotiate.js

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't want any netlify stuff so can remove this

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const MARKDOWN_PATHS = {
"/": "/index.md",
"/index.html": "/index.md",
};

export default async function handler(request, context) {
const accept = request.headers.get("Accept") ?? "";
if (!accept.includes("text/markdown")) {
return context.next();
}

const url = new URL(request.url);
const markdownPath = MARKDOWN_PATHS[url.pathname];
if (!markdownPath) {
return context.next();
}

const markdownUrl = new URL(markdownPath, url.origin);
const markdownResponse = await context.rewrite(markdownUrl.toString());
if (!markdownResponse.ok) {
return context.next();
}

const body = await markdownResponse.text();
const tokenEstimate = Math.ceil(body.length / 4);

return new Response(body, {
status: 200,
headers: {
"Content-Type": "text/markdown; charset=utf-8",
"x-markdown-tokens": String(tokenEstimate),
Vary: "Accept",
"Cache-Control": "public, max-age=300, must-revalidate",
},
});
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"dev": "astro dev",
"start": "astro dev",
"docs": "bash build_docs.sh",
"prebuild": "node scripts/generate-agent-skills-index.mjs",
"build": "astro check && astro build && bash build_docs.sh",
"generate:agent-skills-index": "node scripts/generate-agent-skills-index.mjs",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be good if this ran on CI somewhere to auto-update (or at least check in CI so that we force it to stay up to date).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either that or add it onto the build command that runs during deployment (in which case, probably don't need the file itself under source control?)

"preview": "astro preview",
"astro": "astro"
},
Expand Down
30 changes: 30 additions & 0 deletions public/.well-known/agent-skills/index.json
Comment thread
ewels marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://schemas.agentskills.io/discovery/0.2.0/schema.json",
"source": "https://github.com/nextflow-io/agent-skills",
"skills": [
{
"name": "create-workflow",
"type": "skill-md",
"description": "INVOKE THIS SKILL IMMEDIATELY when user asks to: write/create/build a Nextflow pipeline or workflow,\ncreate any bioinformatics pipeline (RNA-seq, DNA-seq, variant calling, ChIP-seq, etc.),\nor compose/chain Nextflow modules from the Nextflow Registry. This skill handles all Nextflow workflow creation tasks.",
"url": "https://nextflow.io/.well-known/agent-skills/create-workflow/SKILL.md"
},
{
"name": "install-nextflow",
"type": "skill-md",
"description": "Install or upgrade Nextflow on the user's machine. Use when the user wants to install Nextflow, check their current Nextflow version, upgrade Nextflow, or set up the prerequisites (Java 17+) needed to run Nextflow.",
"url": "https://nextflow.io/.well-known/agent-skills/install-nextflow/SKILL.md"
},
{
"name": "launch-workflow",
"type": "skill-md",
"description": "Launch Nextflow pipeline executions on cloud and HPC clusters via Seqera Platform. Use when the user wants to run/launch/submit a pipeline on a cloud or cluster compute environment, configure a compute environment, push pipeline changes to GitHub before launching, or sign in to Seqera Platform.",
"url": "https://nextflow.io/.well-known/agent-skills/launch-workflow/SKILL.md"
},
{
"name": "run-module",
"type": "skill-md",
"description": "Run Nextflow Registry modules natively using `nextflow module` commands. Use when running, listing, or getting info about Nextflow modules.",
"url": "https://nextflow.io/.well-known/agent-skills/run-module/SKILL.md"
}
]
}
13 changes: 13 additions & 0 deletions public/.well-known/api-catalog
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"linkset": [
{
"anchor": "https://nextflow.io/",
"service-doc": [
{
"href": "https://docs.seqera.io/nextflow/",
"type": "text/html"
}
]
}
]
}
11 changes: 11 additions & 0 deletions public/.well-known/mcp/server-card.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"serverInfo": {
"name": "nextflow.io",
"version": "1.0.0"
},
"transport": {
"type": "webmcp",
"pageUrl": "https://nextflow.io/"
},
"capabilities": ["tools"]
}
26 changes: 26 additions & 0 deletions public/_headers

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove, as specifically for netlify

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/
Link: </.well-known/api-catalog>; rel="api-catalog", </docs.seqera.io/nextflow/>; rel="service-doc"

/index.html
Link: </.well-known/api-catalog>; rel="api-catalog", </docs.seqera.io/nextflow/>; rel="service-doc"

/.well-known/api-catalog
Content-Type: application/linkset+json
Cache-Control: public, max-age=300, must-revalidate
Access-Control-Allow-Origin: *


/.well-known/mcp/server-card.json
Content-Type: application/json
Cache-Control: public, max-age=300, must-revalidate
Access-Control-Allow-Origin: *

/.well-known/agent-skills/index.json
Content-Type: application/json
Cache-Control: public, max-age=300, must-revalidate
Access-Control-Allow-Origin: *

/index.md
Content-Type: text/markdown; charset=utf-8
Cache-Control: public, max-age=300, must-revalidate
Access-Control-Allow-Origin: *
56 changes: 56 additions & 0 deletions public/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Nextflow

> Reproducible Scientific Workflows at Scale

Nextflow enables scalable, reproducible, and portable scientific workflows for research and production use cases.

## Quick links

- [Documentation](https://docs.seqera.io/nextflow/)
- [Community forum](https://community.seqera.io/tag/nextflow)
- [Training](https://training.nextflow.io/latest/)
- [Examples](/basic-pipeline.html)
- [VS Code extension](https://marketplace.visualstudio.com/items?itemName=nextflow.nextflow)
- [Seqera AI assistant](https://seqera.io/ask-ai/)

## Features

### Fast prototyping

Nextflow allows you to write a computational pipeline by making it simpler to put together many different tasks. You may reuse your existing scripts and tools without learning a new language.

### Reproducibility

Nextflow supports [Docker](https://www.docker.com/) and [Singularity](https://apptainer.org/) containers, with Git integration for versioned, self-contained pipelines.

### Continuous checkpoints

Intermediate results are automatically tracked so you can resume from the last successful step.

### Portable

Pipelines run on GridEngine, SLURM, LSF, PBS, Kubernetes, AWS, Google Cloud, Azure, and more without code changes.

### Stream oriented

Nextflow extends the Unix pipes model with a fluent DSL for complex stream interactions and functional composition.

### Unified parallelism

Parallelisation is defined by process input and output declarations; applications scale transparently.

## Community resources

- [nf-core](https://nf-co.re/) — curated community pipelines
- [Seqera Pipelines](https://seqera.io/pipelines/) — browse open-source pipelines
- [GitHub issues](https://github.com/nextflow-io/nextflow/issues) — report bugs or request features

## Discovery

Machine-readable resources for agents:

- API catalog: `/.well-known/api-catalog`
- MCP server card: `/.well-known/mcp/server-card.json`
- Agent skills: `/.well-known/agent-skills/index.json`

Supported by [Seqera](https://seqera.io).
1 change: 1 addition & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ Disallow: /misc/
Disallow: /logs/
Disallow: /tests/
Disallow: /releases/
Content-Signal: ai-train=no, search=yes, ai-input=yes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to be in training sets..

Suggested change
Content-Signal: ai-train=no, search=yes, ai-input=yes
Content-Signal: ai-train=yes, search=yes, ai-input=yes


Sitemap: https://nextflow.io/sitemap-index.xml
4 changes: 3 additions & 1 deletion publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ aws s3 sync --delete output/docs s3://www2.nextflow.io/docs \
--storage-class STANDARD \
--acl public-read \
--exclude "$0" \
"$@"
"$@"

bash "$(dirname "$0")/scripts/set-s3-agent-metadata.sh"
Loading
Loading