Schedule ASAP layers

schedule-asap-layers · version 1.0.0 · Graphs & scheduling · free, no key needed

Partition a DAG into ASAP topological generations: each layer is the nodes that become ready together.

Use when you need to: schedule asap layers · topological generations · ASAP depth layers of a DAG.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "nodes": [
    "fetch",
    "compile",
    "lint",
    "link",
    "docs"
  ],
  "edges": [
    {
      "from": "fetch",
      "to": "compile"
    },
    {
      "from": "fetch",
      "to": "lint"
    },
    {
      "from": "compile",
      "to": "link"
    },
    {
      "from": "lint",
      "to": "link"
    }
  ]
}

Response:

{
  "result": {
    "layers": [
      [
        "fetch",
        "docs"
      ],
      [
        "compile",
        "lint"
      ],
      [
        "link"
      ]
    ]
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "schedule-asap-layers",
  "version": "1.0.0",
  "input": {
    "nodes": [
      "fetch",
      "compile",
      "lint",
      "link",
      "docs"
    ],
    "edges": [
      {
        "from": "fetch",
        "to": "compile"
      },
      {
        "from": "fetch",
        "to": "lint"
      },
      {
        "from": "compile",
        "to": "link"
      },
      {
        "from": "lint",
        "to": "link"
      }
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/schedule-asap-layers/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"nodes":["fetch","compile","lint","link","docs"],"edges":[{"from":"fetch","to":"compile"},{"from":"fetch","to":"lint"},{"from":"compile","to":"link"},{"from":"lint","to":"link"}]}'

The machine-readable contract is at /v1/tools/schedule-asap-layers/versions/1.0.0.

CLI

node cli.mjs run schedule-asap-layers 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.