A desktop coding agent with free access to frontier models.
TypeScript
const { withBotId } = require("botid/next/config");
/** @type {import('next').NextConfig} */
const mintlifyOrigin = "https://docs.omnirush.ai";
const nextConfig = {
reactStrictMode: true,
transpilePackages: ["@omnirush/email", "@omnirush/ui"],
// Lets evals build/serve a production instance beside next dev without clobbering .next.
distDir: process.env.LANDING_DIST_DIR || ".next",
// Bake VERCEL_ENV at build time so the PostHog gates (app/layout.tsx and
// lib/posthog-server.ts) behave per-deployment: on Vercel the build env
// matches the runtime env, and local `next start` mirrors what was built.
env: {
VERCEL_ENV: process.env.VERCEL_ENV || "",
LANDING_POSTHOG_KEY: process.env.LANDING_POSTHOG_KEY || "",
},
async rewrites() {
return [
{
source: "/docs",
destination: `${mintlifyOrigin}/docs`,
},
{
source: "/docs/:match*",
destination: `${mintlifyOrigin}/docs/:match*`,
},
];
},
async headers() {
return [
{
source: "/",
headers: [
{
key: "Link",
value:
'</docs>; rel="service-doc", </.well-known/agent-skills/index.json>; rel="https://agentskills.io/rel/index", </.well-known/api-catalog>; rel="api-catalog"; type="application/linkset+json"',
},
],
},
{
source: "/.well-known/agent-skills/index.json",
headers: [
{ key: "Content-Type", value: "application/json" },
{ key: "Access-Control-Allow-Origin", value: "*" },
],
},
{
source: "/.well-known/agent-skills/:path*/SKILL.md",
headers: [
{ key: "Content-Type", value: "text/markdown; charset=utf-8" },
{ key: "Access-Control-Allow-Origin", value: "*" },
],
},
];
},
};
module.exports = withBotId(nextConfig);