You are reading the documentation for v0, which is no longer the latest version. Switch to v1
Middleware Extension
Middleware Extension
CLI will configure the middleware to use the Coveo integration and expose required API methods automatically.
To check automated changed - navigate to storefront-middleware/middleware.config.ts after running the CLI.