import { Alepha, Static } from "alepha";
import { CliProvider, EnvUtils, RunnerMethod } from "alepha/command";
import { ConsoleColorProvider } from "alepha/logger";
import { FileSystemProvider, ShellProvider } from "alepha/system";
import { BrotliOptions, ZlibOptions, brotliCompress, gzip } from "node:zlib";
import { spawn } from "node:child_process";
import * as vite from "vite";
import { Logger, Plugin, ViteDevServer } from "vite";
import { DatabaseProvider } from "alepha/orm";
//#region ../../src/cli/core/alephaPackageJson.d.ts
declare const alephaPackageJson: {
  name: string;
  description: string;
  author: string;
  version: string;
  type: string;
  engines: {
    node: string;
    bun: string;
  };
  license: string;
  bin: string;
  main: string;
  types: string;
  files: string[];
  dependencies: {
    "@biomejs/biome": string;
    "@redis/client": string;
    "@vitejs/plugin-react": string;
    dayjs: string;
    "drizzle-kit": string;
    "drizzle-orm": string;
    postgres: string;
    s3mini: string;
    tsx: string;
    typescript: string;
    vite: string;
    "vite-bundle-analyzer": string;
    vitest: string;
    zod: string;
  };
  devDependencies: {
    "@cloudflare/workers-types": string;
    "@electric-sql/pglite": string;
    "@faker-js/faker": string;
    "@tailwindcss/vite": string;
    "@testing-library/dom": string;
    "@testing-library/react": string;
    "@types/bun": string;
    "@types/node": string;
    "@types/nodemailer": string;
    "@types/react": string;
    "@types/react-dom": string;
    "cron-schedule": string;
    jose: string;
    jsdom: string;
    nodemailer: string;
    "openid-client": string;
    "prom-client": string;
    react: string;
    "react-dom": string;
    "swagger-ui-dist": string;
    tailwindcss: string;
    tsdown: string;
  };
  peerDependencies: {
    react: string;
    "react-dom": string;
  };
  peerDependenciesMeta: {
    react: {
      optional: boolean;
    };
    "react-dom": {
      optional: boolean;
    };
  };
  scarfSettings: {
    enabled: boolean;
  };
  scripts: {
    lint: string;
    typecheck: string;
    test: string;
    build: string;
    "build:check": string;
    copy: string;
  };
  homepage: string;
  repository: {
    type: string;
    url: string;
  };
  keywords: string[];
  exports: {
    "./api/audits": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./api/files": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./api/jobs": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./api/keys": {
      types: string;
      import: string;
      default: string;
    };
    "./api/notifications": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./api/oauth": {
      types: string;
      import: string;
      default: string;
    };
    "./api/organizations": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./api/parameters": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./api/payments": {
      types: string;
      import: string;
      default: string;
    };
    "./api/subscriptions": {
      types: string;
      import: string;
      default: string;
    };
    "./api/users": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./api/verifications": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./background": {
      types: string;
      workerd: string;
      import: string;
      default: string;
    };
    "./batch": {
      types: string;
      import: string;
      default: string;
    };
    "./bin": {
      types: string;
      import: string;
      default: string;
    };
    "./bucket": {
      types: string;
      workerd: string;
      import: string;
      default: string;
    };
    "./cache": {
      types: string;
      workerd: string;
      import: string;
      default: string;
    };
    "./cache/database": {
      types: string;
      import: string;
      default: string;
    };
    "./cache/redis": {
      types: string;
      import: string;
      default: string;
    };
    "./captcha": {
      types: string;
      import: string;
      default: string;
    };
    "./cli/config": {
      types: string;
      import: string;
      default: string;
    };
    "./cli": {
      types: string;
      import: string;
      default: string;
    };
    "./cli/devtools": {
      types: string;
      import: string;
      default: string;
    };
    "./cli/i18n": {
      types: string;
      import: string;
      default: string;
    };
    "./cli/platform": {
      types: string;
      import: string;
      default: string;
    };
    "./cli/platform-lib": {
      types: string;
      import: string;
      default: string;
    };
    "./cli/vendor": {
      types: string;
      import: string;
      default: string;
    };
    "./command": {
      types: string;
      import: string;
      default: string;
    };
    ".": {
      types: string;
      "react-native": string;
      workerd: string;
      browser: string;
      import: string;
      default: string;
    };
    "./crypto": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./datetime": {
      types: string;
      import: string;
      default: string;
    };
    "./email/brevo": {
      types: string;
      import: string;
      default: string;
    };
    "./email/cloudflare": {
      types: string;
      import: string;
      default: string;
    };
    "./email": {
      types: string;
      workerd: string;
      import: string;
      default: string;
    };
    "./email/smtp": {
      types: string;
      import: string;
      default: string;
    };
    "./fake": {
      types: string;
      import: string;
      default: string;
    };
    "./lock": {
      types: string;
      import: string;
      default: string;
    };
    "./lock/redis": {
      types: string;
      import: string;
      default: string;
    };
    "./logger": {
      types: string;
      import: string;
      default: string;
    };
    "./mcp": {
      types: string;
      import: string;
      default: string;
    };
    "./orm": {
      types: string;
      "react-native": string;
      browser: string;
      bun: string;
      import: string;
      default: string;
    };
    "./orm/postgres": {
      types: string;
      bun: string;
      import: string;
      default: string;
    };
    "./queue": {
      types: string;
      workerd: string;
      import: string;
      default: string;
    };
    "./queue/redis": {
      types: string;
      import: string;
      default: string;
    };
    "./react/auth": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./react": {
      types: string;
      import: string;
      default: string;
    };
    "./react/form": {
      types: string;
      import: string;
      default: string;
    };
    "./react/head": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./react/i18n": {
      types: string;
      import: string;
      default: string;
    };
    "./react/intro": {
      types: string;
      import: string;
      default: string;
    };
    "./react/router": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./react/sitemap": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./react/testing": {
      types: string;
      import: string;
      default: string;
    };
    "./react/ui": {
      types: string;
      import: string;
      default: string;
    };
    "./redis": {
      types: string;
      bun: string;
      import: string;
      default: string;
    };
    "./retry": {
      types: string;
      import: string;
      default: string;
    };
    "./router": {
      types: string;
      import: string;
      default: string;
    };
    "./scheduler": {
      types: string;
      workerd: string;
      import: string;
      default: string;
    };
    "./security": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./server/auth": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./server/cookies": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./server": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./server/cors": {
      types: string;
      import: string;
      default: string;
    };
    "./server/etag": {
      types: string;
      import: string;
      default: string;
    };
    "./server/health": {
      types: string;
      import: string;
      default: string;
    };
    "./server/links": {
      types: string;
      "react-native": string;
      browser: string;
      import: string;
      default: string;
    };
    "./server/metrics": {
      types: string;
      import: string;
      default: string;
    };
    "./server/proxy": {
      types: string;
      import: string;
      default: string;
    };
    "./server/rate-limit": {
      types: string;
      import: string;
      default: string;
    };
    "./server/static": {
      types: string;
      import: string;
      default: string;
    };
    "./server/swagger": {
      types: string;
      import: string;
      default: string;
    };
    "./sms": {
      types: string;
      import: string;
      default: string;
    };
    "./system": {
      types: string;
      "react-native": string;
      workerd: string;
      browser: string;
      import: string;
      default: string;
    };
    "./topic": {
      types: string;
      import: string;
      default: string;
    };
    "./topic/redis": {
      types: string;
      import: string;
      default: string;
    };
    "./tsconfig.base": string;
    "./package.json": string;
  };
  publishConfig: {
    main: string;
    types: string;
    bin: string;
    exports: {
      "./api/audits": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./api/files": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./api/jobs": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./api/keys": {
        types: string;
        import: string;
        default: string;
      };
      "./api/notifications": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./api/oauth": {
        types: string;
        import: string;
        default: string;
      };
      "./api/organizations": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./api/parameters": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./api/payments": {
        types: string;
        import: string;
        default: string;
      };
      "./api/subscriptions": {
        types: string;
        import: string;
        default: string;
      };
      "./api/users": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./api/verifications": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./background": {
        types: string;
        workerd: string;
        import: string;
        default: string;
      };
      "./batch": {
        types: string;
        import: string;
        default: string;
      };
      "./bin": {
        types: string;
        import: string;
        default: string;
      };
      "./bucket": {
        types: string;
        workerd: string;
        import: string;
        default: string;
      };
      "./cache": {
        types: string;
        workerd: string;
        import: string;
        default: string;
      };
      "./cache/database": {
        types: string;
        import: string;
        default: string;
      };
      "./cache/redis": {
        types: string;
        import: string;
        default: string;
      };
      "./captcha": {
        types: string;
        import: string;
        default: string;
      };
      "./cli/config": {
        types: string;
        import: string;
        default: string;
      };
      "./cli": {
        types: string;
        import: string;
        default: string;
      };
      "./cli/devtools": {
        types: string;
        import: string;
        default: string;
      };
      "./cli/i18n": {
        types: string;
        import: string;
        default: string;
      };
      "./cli/platform": {
        types: string;
        import: string;
        default: string;
      };
      "./cli/platform-lib": {
        types: string;
        import: string;
        default: string;
      };
      "./cli/vendor": {
        types: string;
        import: string;
        default: string;
      };
      "./command": {
        types: string;
        import: string;
        default: string;
      };
      ".": {
        types: string;
        "react-native": string;
        workerd: string;
        browser: string;
        import: string;
        default: string;
      };
      "./crypto": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./datetime": {
        types: string;
        import: string;
        default: string;
      };
      "./email/brevo": {
        types: string;
        import: string;
        default: string;
      };
      "./email/cloudflare": {
        types: string;
        import: string;
        default: string;
      };
      "./email": {
        types: string;
        workerd: string;
        import: string;
        default: string;
      };
      "./email/smtp": {
        types: string;
        import: string;
        default: string;
      };
      "./fake": {
        types: string;
        import: string;
        default: string;
      };
      "./lock": {
        types: string;
        import: string;
        default: string;
      };
      "./lock/redis": {
        types: string;
        import: string;
        default: string;
      };
      "./logger": {
        types: string;
        import: string;
        default: string;
      };
      "./mcp": {
        types: string;
        import: string;
        default: string;
      };
      "./orm": {
        types: string;
        "react-native": string;
        browser: string;
        bun: string;
        import: string;
        default: string;
      };
      "./orm/postgres": {
        types: string;
        bun: string;
        import: string;
        default: string;
      };
      "./queue": {
        types: string;
        workerd: string;
        import: string;
        default: string;
      };
      "./queue/redis": {
        types: string;
        import: string;
        default: string;
      };
      "./react/auth": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./react": {
        types: string;
        import: string;
        default: string;
      };
      "./react/form": {
        types: string;
        import: string;
        default: string;
      };
      "./react/head": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./react/i18n": {
        types: string;
        import: string;
        default: string;
      };
      "./react/intro": {
        types: string;
        import: string;
        default: string;
      };
      "./react/router": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./react/sitemap": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./react/testing": {
        types: string;
        import: string;
        default: string;
      };
      "./react/ui": {
        types: string;
        import: string;
        default: string;
      };
      "./redis": {
        types: string;
        bun: string;
        import: string;
        default: string;
      };
      "./retry": {
        types: string;
        import: string;
        default: string;
      };
      "./router": {
        types: string;
        import: string;
        default: string;
      };
      "./scheduler": {
        types: string;
        workerd: string;
        import: string;
        default: string;
      };
      "./security": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./server/auth": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./server/cookies": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./server": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./server/cors": {
        types: string;
        import: string;
        default: string;
      };
      "./server/etag": {
        types: string;
        import: string;
        default: string;
      };
      "./server/health": {
        types: string;
        import: string;
        default: string;
      };
      "./server/links": {
        types: string;
        "react-native": string;
        browser: string;
        import: string;
        default: string;
      };
      "./server/metrics": {
        types: string;
        import: string;
        default: string;
      };
      "./server/proxy": {
        types: string;
        import: string;
        default: string;
      };
      "./server/rate-limit": {
        types: string;
        import: string;
        default: string;
      };
      "./server/static": {
        types: string;
        import: string;
        default: string;
      };
      "./server/swagger": {
        types: string;
        import: string;
        default: string;
      };
      "./sms": {
        types: string;
        import: string;
        default: string;
      };
      "./system": {
        types: string;
        "react-native": string;
        workerd: string;
        browser: string;
        import: string;
        default: string;
      };
      "./topic": {
        types: string;
        import: string;
        default: string;
      };
      "./topic/redis": {
        types: string;
        import: string;
        default: string;
      };
      "./tsconfig.base": string;
      "./package.json": string;
    };
  };
};
declare const version: string;
//#endregion
//#region ../../src/cli/core/atoms/appEntryOptions.d.ts
declare const appEntryOptions: import("alepha").Atom<import("zod").ZodObject<{
  server: import("zod").ZodOptional<import("zod").ZodString>;
  browser: import("zod").ZodOptional<import("zod").ZodString>;
  style: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod/v4/core").$strip>, "alepha.cli.appEntry.options">;
type AppEntryOptions = Static<typeof appEntryOptions.schema>;
//#endregion
//#region ../../src/cli/core/atoms/buildOptions.d.ts
/**
 * Deployment target for the build output.
 *
 * - `docker` - Generate Dockerfile for containerized deployment
 * - `vercel` - Generate Vercel deployment configuration (forces node runtime)
 * - `cloudflare` - Generate Cloudflare Workers configuration (forces workerd runtime)
 */
type BuildTarget = "bare" | "docker" | "vercel" | "cloudflare" | "static";
/**
 * JavaScript runtime for the build output.
 *
 * - `node` - Node.js runtime (default)
 * - `bun` - Bun runtime (uses bun export conditions)
 * - `workerd` - Cloudflare Workers runtime (auto-set with cloudflare target)
 */
type BuildRuntime = "node" | "bun" | "workerd";
/**
 * Build options atom for CLI build command.
 *
 * Defines the available build configuration options with their defaults.
 * Options can be overridden via alepha.config.ts or CLI flags.
 */
declare const buildOptions: import("alepha").Atom<import("zod").ZodObject<{
  stats: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodBoolean, import("zod").ZodEnum<{
    json: "json";
  }>]>>;
  target: import("zod").ZodOptional<import("zod").ZodEnum<{
    bare: "bare";
    cloudflare: "cloudflare";
    docker: "docker";
    static: "static";
    vercel: "vercel";
  }>>;
  runtime: import("zod").ZodOptional<import("zod").ZodEnum<{
    bun: "bun";
    node: "node";
    workerd: "workerd";
  }>>;
  output: import("zod").ZodOptional<import("zod").ZodObject<{
    dist: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
    public: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
  }, import("zod/v4/core").$strip>>;
  vercel: import("zod").ZodOptional<import("zod").ZodObject<{
    projectName: import("zod").ZodOptional<import("zod").ZodString>;
    orgId: import("zod").ZodOptional<import("zod").ZodString>;
    projectId: import("zod").ZodOptional<import("zod").ZodString>;
    config: import("zod").ZodOptional<import("zod").ZodObject<{
      crons: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
        path: import("zod").ZodString;
        schedule: import("zod").ZodString;
      }, import("zod/v4/core").$strip>>>;
    }, import("zod/v4/core").$strip>>;
  }, import("zod/v4/core").$strip>>;
  cloudflare: import("zod").ZodOptional<import("zod").ZodObject<{
    config: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
  }, import("zod/v4/core").$strip>>;
  docker: import("zod").ZodOptional<import("zod").ZodObject<{
    from: import("zod").ZodOptional<import("zod").ZodString>;
    command: import("zod").ZodOptional<import("zod").ZodString>;
    install: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
    image: import("zod").ZodOptional<import("zod").ZodObject<{
      tag: import("zod").ZodString;
      args: import("zod").ZodOptional<import("zod").ZodString>;
      oci: import("zod").ZodOptional<import("zod").ZodBoolean>;
    }, import("zod/v4/core").$strip>>;
    compile: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodBoolean, import("zod").ZodObject<{
      target: import("zod").ZodOptional<import("zod").ZodString>;
      base: import("zod").ZodOptional<import("zod").ZodString>;
      minify: import("zod").ZodOptional<import("zod").ZodBoolean>;
    }, import("zod/v4/core").$strip>]>>;
  }, import("zod/v4/core").$strip>>;
  static: import("zod").ZodOptional<import("zod").ZodObject<{
    domain: import("zod").ZodOptional<import("zod").ZodString>;
  }, import("zod/v4/core").$strip>>;
  pwa: import("zod").ZodOptional<import("zod").ZodObject<{
    name: import("zod").ZodString;
    shortName: import("zod").ZodOptional<import("zod").ZodString>;
    themeColor: import("zod").ZodOptional<import("zod").ZodString>;
    backgroundColor: import("zod").ZodOptional<import("zod").ZodString>;
    display: import("zod").ZodOptional<import("zod").ZodEnum<{
      browser: "browser";
      fullscreen: "fullscreen";
      "minimal-ui": "minimal-ui";
      standalone: "standalone";
    }>>;
    offline: import("zod").ZodOptional<import("zod").ZodBoolean>;
  }, import("zod/v4/core").$strip>>;
}, import("zod/v4/core").$strip>, "alepha.cli.build.options">;
/**
 * Type for build options.
 */
type BuildOptions = Static<typeof buildOptions.schema>;
//#endregion
//#region ../../src/cli/core/atoms/changelogOptions.d.ts
/**
 * Default scopes to ignore in changelog generation.
 * Commits with these scopes won't appear in release notes.
 */
declare const DEFAULT_IGNORE: string[];
/**
 * Changelog configuration atom.
 *
 * Configure in `alepha.config.ts`:
 * ```ts
 * import { changelogOptions } from "alepha/cli";
 *
 * alepha.set(changelogOptions, {
 *   ignore: ["project", "release", "chore", "docs"],
 * });
 * ```
 */
declare const changelogOptions: import("alepha").Atom<import("zod").ZodObject<{
  ignore: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
}, import("zod/v4/core").$strip>, "alepha.cli.changelog.options">;
type ChangelogOptions = Static<typeof changelogOptions.schema>;
//#endregion
//#region ../../src/cli/core/atoms/devOptions.d.ts
/**
 * Dev options atom for CLI dev command.
 *
 * Defines the available dev configuration options with their defaults.
 * Options can be overridden via alepha.config.ts or CLI flags.
 */
declare const devOptions: import("alepha").Atom<import("zod").ZodObject<{
  noViteReactPlugin: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
}, import("zod/v4/core").$strip>, "alepha.cli.dev.options">;
/**
 * Type for dev options.
 */
type DevOptions = Static<typeof devOptions.schema>;
//#endregion
//#region ../../src/cli/core/providers/AppEntryProvider.d.ts
/**
 * Service for locating entry files in Alepha projects.
 *
 * Resolves application entry points for the CLI build pipeline.
 */
declare class AppEntryProvider {
  protected readonly fs: FileSystemProvider;
  protected readonly options: Readonly<{
    server?: string | undefined;
    browser?: string | undefined;
    style?: string | undefined;
  }>;
  protected readonly serverEntries: readonly ["main.server.ts", "main.server.tsx", "main.ts", "main.tsx"];
  protected readonly browserEntries: readonly ["main.browser.ts", "main.browser.tsx", "main.ts", "main.tsx"];
  protected readonly styleEntries: readonly ["main.css", "styles.css", "style.css"];
  /**
   * Get application entry points.
   *
   * Server entry is required, an error is thrown if not found.
   * Browser entry is optional.
   *
   * It will first check for custom entries in options, see appEntryOptions.
   */
  getAppEntry(root: string): Promise<AppEntry>;
}
interface AppEntry {
  root: string;
  server: string;
  browser?: string;
  style?: string;
}
//#endregion
//#region ../../src/cli/core/services/ViteUtils.d.ts
interface BufferedLogEntry {
  level: "info" | "warn" | "error";
  msg: string;
  timestamp: Date;
}
interface BufferedLogger extends Logger {
  /**
   * Flush all buffered log messages to console.
   * Call this on build failure to show what happened.
   */
  flush(): void;
  /**
   * Get all buffered log entries.
   */
  getEntries(): BufferedLogEntry[];
  /**
   * Clear all buffered entries without printing.
   */
  clear(): void;
}
/**
 * Preload manifest mapping short keys to source paths.
 * Generated at build time, consumed by SSRManifestProvider at runtime.
 */
interface PreloadManifest {
  [key: string]: string;
}
/**
 * Vite integration utilities for the Alepha CLI.
 *
 * Centralizes all Vite-specific code: lazy loading, plugin creation,
 * buffered logger, dev server management.
 * When Vite is replaced, only this file needs to change.
 */
declare class ViteUtils {
  protected readonly fs: FileSystemProvider;
  protected viteDevServer?: ViteDevServer;
  /**
   * Lazy-load Vite (with rolldown-vite fallback).
   */
  importVite(): Promise<typeof import("vite")>;
  /**
   * Lazy-load @vitejs/plugin-react (optional).
   */
  importViteReact(): Promise<any>;
  /**
   * Create a Vite logger that buffers all messages instead of printing them.
   * Useful for silent builds that only show output on failure.
   */
  createBufferedLogger(): BufferedLogger;
  /**
   * Vite plugin that reads tsconfig.json `compilerOptions.paths` and converts
   * them to Vite `resolve.alias` entries. Enables `@/*` → `src/*` style imports
   * with zero config beyond tsconfig.json.
   */
  createTsconfigPathsPlugin(): Plugin;
  /**
   * Vite plugin that generates a preload manifest for SSR module preloading.
   *
   * Collects lazy import paths from $page definitions during transform,
   * generates a manifest mapping short keys to resolved source paths,
   * and injects only the short key into $page definitions.
   */
  createSsrPreloadPlugin(): Plugin;
  generateIndexHtml(entry: AppEntry, opts?: {
    pwa?: boolean;
  }): string;
  /**
   * We need to close the Vite dev server after build is done.
   */
  protected onReady: import("alepha").HookPrimitive<"ready">;
  protected onStop: import("alepha").HookPrimitive<"stop">;
  runAlepha(opts: {
    entry: AppEntry;
    mode: "production" | "development";
  }): Promise<Alepha>;
}
//#endregion
//#region ../../src/cli/core/providers/ViteBuildProvider.d.ts
declare class ViteBuildProvider {
  protected alepha?: Alepha;
  protected appEntry?: AppEntry;
  protected readonly viteUtils: ViteUtils;
  init(opts: {
    entry: AppEntry;
  }): Promise<Alepha>;
  hasClient(): boolean;
}
//#endregion
//#region ../../src/cli/core/services/AlephaCliUtils.d.ts
/**
 * Core utility service for CLI commands.
 *
 * Provides:
 * - Command execution
 * - File editing helpers
 * - Drizzle/ORM utilities
 * - Environment loading
 */
declare class AlephaCliUtils {
  protected readonly log: import("alepha/logger").Logger;
  protected readonly fs: FileSystemProvider;
  protected readonly envUtils: EnvUtils;
  protected readonly boot: AppEntryProvider;
  protected readonly shell: ShellProvider;
  protected readonly viteUtils: ViteUtils;
  protected readonly alepha: Alepha;
  /**
   * Execute a command with inherited stdio.
   */
  exec(command: string, options?: {
    root?: string;
    env?: Record<string, string>;
    global?: boolean;
    capture?: boolean;
  }): Promise<void>;
  /**
   * Resolve the absolute path to a toolchain binary that ships embedded in
   * `alepha`'s own `dependencies` (typescript, vite, vitest, @biomejs/biome,
   * drizzle-kit).
   *
   * The CLI runs the result via `node <path>` so the toolchain works under
   * every package manager — including pnpm with a strict node-linker, where
   * a transitive dependency's bin is NOT hoisted into the project's
   * `node_modules/.bin`. Resolution starts from `alepha`'s own location, so
   * the version is whatever `alepha` shipped — the project never pins it.
   *
   * @param pkg - npm package name (e.g. `"typescript"`)
   * @param binName - which `bin` entry to use (e.g. `"tsc"`); defaults to the
   *   package's only/first bin
   */
  resolveBin(pkg: string, binName?: string): string;
  /**
   * Write a configuration file to node_modules/.alepha directory.
   */
  writeConfigFile(name: string, content: string, root?: string): Promise<string>;
  loadAlephaFromServerEntryFile(opts: {
    mode: "production" | "development";
  } & ({
    entry: AppEntry;
  } | {
    root: string;
  })): Promise<Alepha>;
  /**
   * Load environment variables from a .env file.
   */
  loadEnv(root: string, files?: string[]): Promise<void>;
  exists(root: string, path: string): Promise<boolean>;
  /**
   * Check if a command is installed and available in the system PATH.
   */
  isInstalledAsync(cmd: string): Promise<boolean>;
  /**
   * Get the current git revision (commit SHA).
   *
   * @returns The short commit SHA or "unknown" if not in a git repo
   */
  getGitRevision(): Promise<string>;
  /**
   * Get the user's email from git config.
   *
   * @returns The git user email or undefined if not configured
   */
  getGitEmail(): Promise<string | undefined>;
}
//#endregion
//#region ../../src/cli/core/services/PackageManagerUtils.d.ts
/**
 * Context information about a workspace root.
 * Used when initializing a package inside a monorepo.
 */
interface WorkspaceContext {
  /**
   * Whether we're inside a workspace package.
   */
  isPackage: boolean;
  /**
   * The workspace root directory (e.g., ../.. from packages/my-pkg).
   */
  workspaceRoot: string | null;
  /**
   * Package manager detected at workspace root.
   */
  packageManager: "yarn" | "pnpm" | "npm" | "bun" | null;
  /**
   * Config files present at workspace root.
   */
  config: {
    biomeJson: boolean;
    editorconfig: boolean;
    tsconfigJson: boolean;
  };
}
/**
 * Utility service for package manager operations.
 *
 * Handles detection, installation, and cleanup for:
 * - Yarn
 * - npm
 * - pnpm
 * - Bun
 */
declare class PackageManagerUtils {
  protected readonly log: import("alepha/logger").Logger;
  protected readonly fs: FileSystemProvider;
  protected readonly alepha: Alepha;
  /**
   * Detect the package manager used in the project.
   * Checks current directory first, then workspace root if in a monorepo.
   */
  getPackageManager(root: string, pm?: "yarn" | "pnpm" | "npm" | "bun"): Promise<"yarn" | "pnpm" | "npm" | "bun">;
  /**
   * Detect workspace context when inside a monorepo package.
   *
   * Checks if we're inside a workspace package by walking up to 3 levels
   * for workspace indicators like lockfiles and config files.
   * This covers both standard layouts (packages/my-pkg) and deeper nesting
   * (packages/scope/my-pkg).
   *
   * @param root - The current package directory
   * @returns Workspace context with root path, PM, and config presence
   */
  getWorkspaceContext(root: string): Promise<WorkspaceContext>;
  protected checkWorkspaceRoot(candidate: string): Promise<WorkspaceContext | null>;
  /**
   * Get the install command for a package.
   */
  getInstallCommand(root: string, packageName: string, dev?: boolean): Promise<string>;
  /**
   * Check if a dependency is installed in the project.
   */
  hasDependency(root: string, packageName: string): Promise<boolean>;
  /**
   * Check if Expo is present in the project.
   */
  hasExpo(root: string): Promise<boolean>;
  /**
   * Check if React is present in the project.
   */
  hasReact(root: string): Promise<boolean>;
  /**
   * Install a dependency if it's missing from the project.
   * Optionally checks workspace root for the dependency in monorepo setups.
   */
  ensureDependency(root: string, packageName: string, options?: {
    dev?: boolean;
    /**
     * Also check workspace root for the dependency (for monorepo setups).
     */
    checkWorkspace?: boolean;
    run?: RunnerMethod;
    exec?: (cmd: string, opts?: {
      global?: boolean;
      root?: string;
    }) => Promise<void>;
  }): Promise<void>;
  ensureYarn(root: string): Promise<void>;
  ensureBun(root: string): Promise<void>;
  ensurePnpm(root: string): Promise<void>;
  ensureNpm(root: string): Promise<void>;
  removeAllPmFilesExcept(root: string, except: string): Promise<void>;
  removeYarn(root: string): Promise<void>;
  removePnpm(root: string): Promise<void>;
  removeNpm(root: string): Promise<void>;
  removeBun(root: string): Promise<void>;
  readPackageJson(root: string): Promise<Record<string, any>>;
  writePackageJson(root: string, content: Record<string, any>): Promise<void>;
  editPackageJson(root: string, editFn: (pkg: Record<string, any>) => Record<string, any>): Promise<void>;
  ensurePackageJson(root: string, modes: DependencyModes): Promise<Record<string, any>>;
  generatePackageJsonContent(modes: DependencyModes): {
    dependencies: Record<string, string>;
    devDependencies: Record<string, string>;
    scripts: Record<string, string>;
    type: "module";
  };
  protected removeFiles(root: string, files: string[]): Promise<void>;
}
interface DependencyModes {
  react?: boolean;
  expo?: boolean;
  tailwind?: boolean;
  /**
   * Whether the project is a workspace package inside a monorepo.
   */
  isPackage?: boolean;
}
//#endregion
//#region ../../src/cli/core/services/ProjectScaffolder.d.ts
/**
 * Service for scaffolding new Alepha projects.
 *
 * Handles creation of:
 * - Project structure (src/api, src/web)
 * - Configuration files (tsconfig, biome, editorconfig)
 * - Entry points (main.server.ts, main.browser.ts)
 * - Example code (HelloController, Home component)
 */
declare class ProjectScaffolder {
  protected readonly log: import("alepha/logger").Logger;
  protected readonly colors: ConsoleColorProvider;
  protected readonly fs: FileSystemProvider;
  protected readonly pm: PackageManagerUtils;
  protected readonly utils: AlephaCliUtils;
  /**
   * Get the app name from the directory name.
   *
   * Converts the directory name to a valid module name:
   * - Converts to lowercase
   * - Replaces spaces, dashes, underscores with nothing
   * - Falls back to "app" if empty
   */
  getAppName(root: string): string;
  /**
   * Ensure all configuration files exist.
   */
  ensureConfig(root: string, opts: {
    force?: boolean;
    /**
     * Check workspace root for existing config files.
     */
    checkWorkspace?: boolean;
    packageJson?: boolean | DependencyModes;
    tsconfigJson?: boolean;
    biomeJson?: boolean;
    editorconfig?: boolean;
    agentMd?: boolean;
    /**
     * Write `.vscode/settings.json` pointing the editor's TypeScript
     * server at the `typescript` copy embedded in `alepha`.
     */
    vscodeSettings?: boolean;
  }): Promise<void>;
  ensureTsConfig(root: string, opts?: {
    force?: boolean;
  }): Promise<void>;
  ensureBiomeConfig(root: string, opts?: {
    force?: boolean;
    checkWorkspace?: boolean;
  }): Promise<void>;
  ensureEditorConfig(root: string, opts?: {
    force?: boolean;
    checkWorkspace?: boolean;
  }): Promise<void>;
  /**
   * Ensure `.vscode/settings.json` exists, pointing the editor's TypeScript
   * language server at the `typescript` copy embedded in `alepha`. Keeps the
   * IDE on the same compiler version as `alepha typecheck` — see
   * `vscodeSettingsJson`.
   */
  ensureVscodeSettings(root: string, opts?: {
    force?: boolean;
    checkWorkspace?: boolean;
  }): Promise<void>;
  /**
   * Ensure git repository is initialized with .gitignore.
   *
   * @returns true if git was initialized, false if already exists or git unavailable
   */
  ensureGitRepo(root: string, opts?: {
    force?: boolean;
  }): Promise<boolean>;
  /**
   * Ensure AGENTS.md (cross-tool standard, canonical source) exists, with a
   * CLAUDE.md stub that imports it via Claude Code's `@` syntax. Single
   * source of truth, cross-platform, no symlink needed.
   */
  ensureAgentMd(root: string, options?: {
    force?: boolean;
  }): Promise<void>;
  /**
   * Ensure alepha.config.ts exists with documented options.
   */
  ensureAlephaConfig(root: string, opts?: {
    force?: boolean;
  }): Promise<void>;
  /**
   * Ensure src/main.server.ts exists with correct module imports.
   */
  ensureMainServerTs(root: string, opts?: {
    api?: boolean;
    react?: boolean;
    force?: boolean;
  }): Promise<void>;
  /**
   * Ensure API module structure exists.
   *
   * Creates:
   * - src/api/index.ts (API module)
   * - src/api/controllers/HelloController.ts (example controller)
   */
  ensureApiProject(root: string, opts?: {
    force?: boolean;
  }): Promise<void>;
  /**
   * Ensure web/React project structure exists.
   *
   * Creates:
   * - src/main.browser.ts
   * - src/main.css
   * - src/web/index.ts, src/web/AppRouter.ts, src/web/components/Home.tsx
   */
  ensureWebProject(root: string, opts?: {
    api?: boolean;
    tailwind?: boolean;
    force?: boolean;
  }): Promise<void>;
  /**
   * Ensure test directory exists with a dummy test file + a self-contained
   * `vitest.config.ts`. Pinning `test.root` prevents Vitest from walking up
   * to a parent monorepo config (e.g. one that boots a Postgres container).
   */
  ensureTestDir(root: string): Promise<void>;
  /**
   * Full project init — scaffolds files, installs deps, sets up PM and git.
   */
  init({ run, root, flags, args }: {
    run: RunnerMethod;
    root: string;
    flags: {
      pm?: "yarn" | "npm" | "pnpm" | "bun";
      api?: boolean;
      react?: boolean;
      tailwind?: boolean;
      force?: boolean;
    };
    args?: string;
  }): Promise<void>;
  /**
   * Write a file, optionally overriding if it exists.
   */
  protected ensureFile(root: string, relativePath: string, content: string, force?: boolean): Promise<void>;
  /**
   * Check if a file exists in the given directory or any parent directory.
   */
  protected existsInParents(root: string, filename: string): Promise<boolean>;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildCloudflareTask.d.ts
interface WranglerConfig {
  [key: string]: any;
}
/**
 * Build-time snapshot describing what the workspace needs at deploy
 * time. Written to `dist/manifest.json` alongside `wrangler.jsonc`.
 *
 * Lets `alepha platform up --prebuilt` skip the Vite-based
 * introspection step on the deploy side — and lets Alepha Rocket skip
 * the workspace's runtime `npm install` because no app source is
 * booted at deploy time. The manifest captures the bits of primitive
 * data that the deploy steps (provision, secrets, hooks) need to
 * know.
 */
interface BuildManifest {
  version: 1;
  project: string;
  /**
   * Default environment when `--env` is omitted at deploy time.
   * Captured from `platformOptions.default` (defaults to `"production"`).
   */
  defaultEnv: string;
  /**
   * Multi-tenancy mode (`none` | `optional` | `required`). Captured from
   * `platformOptions.tenancy` so the prebuilt deploy side (Rocket) can
   * validate `--tenant` without re-evaluating `alepha.config.ts`.
   */
  tenancy?: "none" | "optional" | "required";
  /**
   * Resolved `platform({ environments: ... })` map. Captured at build
   * time from the workspace's `alepha.config.ts` so the deploy side
   * doesn't need to re-evaluate the config. Each value is the same
   * `EnvironmentConfig` shape consumed by the orchestrator (adapter,
   * domain, zone, jurisdiction, accountId).
   */
  environments: Record<string, {
    adapter: "cloudflare" | "vercel";
    domain?: string;
    zone?: string;
    jurisdiction?: "eu" | "fedramp";
    accountId?: string;
  }>;
  resources: {
    hasDatabase: boolean;
    hasBucket: boolean;
    hasKV: boolean;
    hasQueue: boolean;
    hasCron: boolean;
  };
  /**
   * All distinct cron expressions registered by `$scheduler`
   * primitives. Empty when `hasCron` is false.
   */
  crons: string[];
  /**
   * Cloudflare email binding, captured when the app registers
   * `CloudflareEmailProvider` at artifact-build time. The prebuilt/manifest
   * deploy path (Alepha Rocket `--prebuilt`) has no Vite introspection, so it
   * reads this to re-emit the `send_email` wrangler binding. Absent when the
   * app doesn't use Cloudflare email.
   */
  email?: {
    binding: string;
  };
  /**
   * Every env var the app declares via `$env`, captured from
   * `alepha.dump().env` at build time. The deploy `secrets` step uses this
   * as the worker-secret allowlist (minus build/binding vars) so CI can
   * deliver secrets straight from `process.env` without a `.env` file —
   * `platform.secrets.keys` overrides it when set. Empty when introspection
   * was unavailable (older artifacts / prebuilt mode).
   */
  env: string[];
}
/**
 * Generate Cloudflare Workers deployment configuration.
 *
 * Creates:
 * - wrangler.jsonc with worker configuration
 * - main.cloudflare.js entry point for Cloudflare Workers
 */
declare class BuildCloudflareTask extends BuildTask {
  protected readonly fs: FileSystemProvider;
  protected readonly viteUtils: ViteUtils;
  protected readonly warningComment: string;
  run(ctx: BuildTaskContext): Promise<void>;
  protected generateCloudflare(ctx: BuildTaskContext, distDir: string): Promise<void>;
  /**
   * Write `dist/manifest.json` — a build-time snapshot of everything
   * downstream tooling needs to know about the app without re-booting
   * it. Used by `alepha platform up --prebuilt` (and Alepha Rocket) so
   * the deploy path can skip the Vite-based introspection step and the
   * workspace's runtime npm install.
   */
  protected writeManifest(ctx: BuildTaskContext, root: string, distDir: string, name: string): Promise<void>;
  /** Worker-to-worker service bindings, from CLOUDFLARE_SERVICES (JSON). */
  protected enhanceServices(wrangler: WranglerConfig): void;
  protected enhanceDomain(wrangler: WranglerConfig): void;
  protected enhanceCron(ctx: BuildTaskContext, wrangler: WranglerConfig): void;
  protected discoverCrons(ctx: BuildTaskContext): string[];
  protected enhanceDatabase(wrangler: WranglerConfig): void;
  protected static readonly D1_BINDING = "DB";
  protected enhanceD1(wrangler: WranglerConfig): void;
  protected enhanceHyperdrive(wrangler: WranglerConfig): void;
  protected enhanceR2(wrangler: WranglerConfig): void;
  protected enhanceKV(wrangler: WranglerConfig): void;
  protected enhanceQueue(wrangler: WranglerConfig): void;
  protected enhanceEmail(ctx: BuildTaskContext, wrangler: WranglerConfig): void;
  protected writeWorkerEntryPoint(root: string, distDir: string): Promise<void>;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildTask.d.ts
interface BuildTaskContext {
  /**
   * The user's app Alepha container (NOT the CLI container).
   * Used for metadata extraction (pages, primitives, store, etc.).
   */
  alepha: Alepha;
  /**
   * Resolved build options (flags merged with atom defaults).
   * BuildCommand mutates the atom before creating the context,
   * so stats, target, runtime are all resolved values.
   */
  options: BuildOptions;
  /**
   * CLI runner for progress logging.
   * Tasks call this when they have work to show.
   * Tasks decide IF and WHEN to call run — e.g. skip entirely if nothing to do.
   */
  run: RunnerMethod;
  /**
   * Project root directory.
   */
  root: string;
  /**
   * Application entry points resolved by AppEntryProvider.
   */
  entry: AppEntry;
  /**
   * Whether the app has a client-side bundle (React).
   */
  hasClient: boolean;
  /**
   * Raw CLI flags passed through from the command.
   * Tasks can read flags relevant to their domain.
   */
  /**
   * Build-time snapshot of primitive data, read from
   * `dist/manifest.json`. Populated only in `--prebuilt` mode when a
   * previous build's manifest is present — lets BuildCloudflareTask
   * regenerate `wrangler.jsonc` without re-booting the workspace.
   * `null` when introspection (`ctx.alepha`) is the source of truth.
   */
  manifest: BuildManifest | null;
  /**
   * Resolved `platform({ default, environments, ... })` options from
   * the workspace's `alepha.config.ts`. Populated by `BuildCommand`
   * from the CLI's Alepha instance (where alepha.config.ts ran) —
   * BuildCloudflareTask uses these to write the corresponding fields
   * into `dist/manifest.json` so the deploy side doesn't need to
   * re-load `alepha.config.ts`. `null` when no platform options were
   * declared.
   */
  platformOptions: {
    default?: string;
    tenancy?: "none" | "optional" | "required";
    environments?: Record<string, {
      adapter: "cloudflare" | "vercel";
      domain?: string;
      zone?: string;
      jurisdiction?: "eu" | "fedramp";
      accountId?: string;
    }>;
  } | null;
  flags?: {
    image?: boolean | string;
    /**
     * Skip the slow build steps (Vite client + Vite server + asset
     * compression). Only runs the deploy-config generation
     * (wrangler.jsonc, etc.) — useful when the caller already has a
     * built `dist/` and just needs the wrangler config refreshed for
     * per-tenant overrides.
     */
    prebuilt?: boolean;
  };
}
/**
 * Abstract base class for build pipeline tasks.
 *
 * Each task encapsulates a step in the build pipeline.
 * Tasks control their own progress reporting via ctx.run.
 */
declare abstract class BuildTask {
  abstract run(ctx: BuildTaskContext): Promise<void>;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildAssetsTask.d.ts
/**
 * Copy assets from Alepha packages to the build output directory.
 *
 * Reads `alepha.build.assets` state to find packages with assets,
 * and copies their `/assets` directories to the build output.
 * Used by modules like AlephaServerSwagger to distribute UI files.
 */
declare class BuildAssetsTask extends BuildTask {
  protected readonly fs: FileSystemProvider;
  run(ctx: BuildTaskContext): Promise<void>;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildClientTask.d.ts
/**
 * Build client-side bundle with Vite.
 *
 * Compiles the browser/client code for production,
 * including code splitting and minification.
 * Analyze step stays in BuildCommand (ViteBuildProvider).
 * This task wraps only the actual Vite client build call.
 */
declare class BuildClientTask extends BuildTask {
  protected readonly alepha: Alepha;
  protected readonly fs: FileSystemProvider;
  protected readonly viteUtils: ViteUtils;
  run(ctx: BuildTaskContext): Promise<void>;
  protected buildClient(opts: {
    dist: string;
    stats?: boolean | "json";
    silent?: boolean;
  }): Promise<void>;
  /**
   * Weird cleanup required because we changed input from "index.html" to "node_modules/.alepha/index.html".
   */
  postBuildCleanUpForIndexHtml(dist?: string): Promise<void>;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildCompressTask.d.ts
interface CompressOptions {
  /**
   * Enable brotli compression. Can be true or brotli-specific options.
   *
   * @default true
   */
  brotli?: boolean | BrotliOptions;
  /**
   * Enable gzip compression. Can be true or gzip-specific options.
   *
   * @default false
   */
  gzip?: boolean | ZlibOptions;
  /**
   * Filter which files to compress.
   * Can be a RegExp or a function that returns true for files to compress.
   *
   * @default /\.(js|mjs|cjs|css|wasm|svg|html|xml)$/
   */
  filter?: RegExp | ((fileName: string) => boolean);
}
/**
 * Compresses all matching files in the public output directory.
 *
 * Creates .gz and .br copies alongside each matching file.
 * Runs as the LAST step in the build pipeline, after all other tasks
 * have written their files.
 */
declare class BuildCompressTask extends BuildTask {
  protected readonly fs: FileSystemProvider;
  protected readonly gzipCompress: typeof gzip.__promisify__;
  protected readonly brotliCompress: typeof brotliCompress.__promisify__;
  protected readonly defaultFilter: RegExp;
  run(ctx: BuildTaskContext): Promise<void>;
  /**
   * Compress all matching files in a directory (recursive).
   */
  protected compressDirectory(dir: string, options?: CompressOptions): Promise<number>;
  /**
   * Compress a single file. Creates .gz and .br alongside original.
   */
  protected compressFile(filePath: string, options?: CompressOptions): Promise<void>;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildDockerTask.d.ts
/**
 * Resolved compile options after merging config + flag defaults.
 */
interface ResolvedCompile {
  target: string;
  base: string;
  minify: boolean;
}
/**
 * Generate Docker deployment configuration and optionally build the image.
 *
 * Two modes:
 *
 * 1. Standard (default) - copies the bundled JS + `package.json` and runs
 *    `bun install` (or `npm install`) inside the container.
 * 2. Compile - runs `bun build --compile` to produce a single static binary
 *    and packages it inside a minimal distroless image. No `node_modules`
 *    are ever installed; all dependencies must be bundled by Vite. Requires
 *    `runtime: "bun"`.
 *
 * Creates:
 * - Dockerfile (compile or standard variant)
 * - Copies migrations directory if it exists
 * - Builds Docker image when `--image` flag is provided
 */
declare class BuildDockerTask extends BuildTask {
  protected readonly fs: FileSystemProvider;
  protected readonly utils: AlephaCliUtils;
  run(ctx: BuildTaskContext): Promise<void>;
  /**
   * Merge the user-supplied compile config with sensible defaults.
   * Returns null when compile mode is disabled.
   */
  protected resolveCompile(ctx: BuildTaskContext): ResolvedCompile | null;
  /**
   * Resolve the default Bun target triple for the current host arch.
   * Always targets linux-musl (the container OS), regardless of build host.
   */
  protected defaultBunTarget(): string;
  /**
   * Build the `bun build --compile` invocation. Runs from `<root>/<dist>` so
   * the entry path stays relative and the output lands next to the migrations.
   */
  protected buildCompileCommand(compile: ResolvedCompile): string;
  /**
   * Compile mode requires fully-bundled output. If Vite left anything in
   * `dist/package.json`'s `dependencies`, fail loudly so the user can
   * either bundle the dep or disable compile.
   */
  protected assertNoExternals(root: string, distDir: string): Promise<void>;
  /**
   * Remove artifacts that are no longer needed once the binary exists.
   * The binary embeds the JS bundle and runtime; the standalone files
   * would just bloat the image.
   */
  protected cleanupPreCompileArtifacts(root: string, distDir: string): Promise<void>;
  protected copyMigrations(root: string, distDir: string): Promise<boolean>;
  /**
   * Whether the produced `dist/package.json` declares any runtime
   * dependencies. Alepha apps normally bundle everything into the
   * server entry via Vite, leaving `dependencies: {}` — in which case
   * the generated Dockerfile's `RUN npm install` is wasted work
   * (and emits deprecation noise). Skip the line when empty.
   */
  protected hasRuntimeDeps(root: string, distDir: string): Promise<boolean>;
  protected writeDockerfile(root: string, distDir: string, opts: {
    compile: ResolvedCompile | null;
    standard: {
      image: string;
      command: string;
    };
    hasMigrations: boolean;
    hasDeps: boolean;
    install: string[];
  }): Promise<void>;
  protected buildDockerImage(ctx: BuildTaskContext, distDir: string): Promise<void>;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildPrerenderTask.d.ts
/**
 * Pre-render static pages and routes defined in the Alepha application.
 *
 * Two passes, both writing into `dist/public`:
 * - **pages** — every `$page` with `static: true` is rendered to an HTML file
 *   (supports parameterized routes via `static.entries`).
 * - **routes** — every `static` route primitive (a `$route({ static: true })`
 *   or a `$sitemap`) is invoked in-process and its body written verbatim to
 *   `{path}` (e.g. `sitemap.xml`, `robots.txt`).
 *
 * Both passes read the primitive registry and call a method on the already
 * created primitive instances — no provider is re-injected, so this works in
 * the build's configured-but-not-started container.
 */
declare class BuildPrerenderTask extends BuildTask {
  protected readonly fs: FileSystemProvider;
  run(ctx: BuildTaskContext): Promise<void>;
  protected getStaticPages(ctx: BuildTaskContext): any[];
  /**
   * Static route primitives to snapshot: `$route({ static: true })` and every
   * `$sitemap`. Both expose an async `prerender(): { path, body }`.
   */
  protected getStaticRoutePrimitives(ctx: BuildTaskContext): any[];
  protected prerenderFromAlepha(pages: any[], dist: string): Promise<number>;
  protected prerenderRoutes(primitives: any[], dist: string): Promise<void>;
  protected renderFile(page: any, options: any, dist: string): Promise<void>;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildPwaTask.d.ts
/**
 * Generate PWA web app manifest.
 *
 * Produces a `manifest.webmanifest` in the public output directory
 * from the `pwa` section of build options. Detects icons from `public/`.
 */
declare class BuildPwaTask extends BuildTask {
  protected readonly fs: FileSystemProvider;
  run(ctx: BuildTaskContext): Promise<void>;
  /**
   * Detect icon files in the public output directory.
   *
   * Looks for common icon filenames and generates
   * manifest icon entries with appropriate sizes and types.
   */
  protected detectIcons(publicDir: string): Promise<Array<{
    src: string;
    sizes: string;
    type: string;
  }>>;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildServerTask.d.ts
/**
 * Build server-side SSR bundle with Vite.
 *
 * Compiles the server code for production, generates the externals
 * package.json, and creates the dist/index.js entry wrapper.
 */
declare class BuildServerTask extends BuildTask {
  protected readonly alepha: Alepha;
  protected readonly log: import("alepha/logger").Logger;
  protected readonly fs: FileSystemProvider;
  protected readonly viteUtils: ViteUtils;
  run(ctx: BuildTaskContext): Promise<void>;
  protected buildServer(opts: {
    root: string;
    entry: string;
    distDir: string;
    clientDir?: string;
    stats?: boolean | "json";
    silent?: boolean;
    conditions?: string[];
    alepha: Alepha;
  }): Promise<void>;
  /**
   * Detect a favicon file in the given directory.
   * Returns "mimeType:/path" if found, undefined otherwise.
   */
  protected detectFavicon(publicDir: string): Promise<string | undefined>;
  protected generateExternals(distDir: string, externals: string[]): Promise<void>;
  protected loadJsonFile(path: string): Promise<any>;
  protected stripClientManifest(manifest: Record<string, any> | undefined): Record<string, any> | undefined;
  protected extractEntryFromBundle(root: string, entry: string, result: vite.Rollup.RollupOutput | vite.Rollup.RollupOutput[] | vite.Rollup.RollupWatcher): string;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildStaticTask.d.ts
/**
 * Generate a static site output.
 *
 * Ensures index.html, 200.html, and 404.html exist in the client directory,
 * then removes all server artifacts from dist, keeping only the public directory.
 */
declare class BuildStaticTask extends BuildTask {
  protected readonly fs: FileSystemProvider;
  run(ctx: BuildTaskContext): Promise<void>;
  protected renderRootPage(ctx: BuildTaskContext, publicDir: string): Promise<void>;
  protected stripRootContent(html: string): string;
  protected cleanDist(distDir: string, clientDir: string): Promise<void>;
  protected generateDomain(root: string): Promise<string>;
}
//#endregion
//#region ../../src/cli/core/tasks/BuildVercelTask.d.ts
/**
 * Generate Vercel Build Output API v3 deployment configuration.
 *
 * Creates:
 * - .vercel/output/config.json with routes and version
 * - .vercel/output/static/ (moved from dist/public/)
 * - .vercel/output/functions/index.func/ with handler, index.js, server/, package.json
 * - .vercel/project.json if projectId and orgId are set
 */
declare class BuildVercelTask extends BuildTask {
  protected readonly fs: FileSystemProvider;
  protected readonly warningComment: string;
  run(ctx: BuildTaskContext): Promise<void>;
  protected generateVercel(ctx: BuildTaskContext, distDir: string): Promise<void>;
  /**
   * Collect every registered `$scheduler` / `$job({ cron })` and turn it
   * into a Vercel Cron entry. Vercel hits `path` on the configured
   * `schedule`; the entry-point handler routes that to a `serverless:cron`
   * event so `CronProvider` runs the matching job in-process.
   *
   * Mirrors the equivalent in `BuildCloudflareTask.enhanceCron`, except
   * Vercel needs one path per job (it doesn't dispatch by cron expression
   * the way Cloudflare does).
   */
  protected collectCronJobs(ctx: BuildTaskContext): {
    path: string;
    schedule: string;
  }[];
  /**
   * Write .vercel/output/config.json with Build Output API v3 format.
   *
   * `userCrons` are merged with auto-collected `$scheduler` / `$job({ cron })`
   * entries — explicit user config wins on conflicting paths.
   */
  protected writeOutputConfig(outputDir: string, config?: {
    crons?: {
      path: string;
      schedule: string;
    }[];
  }, autoCrons?: {
    path: string;
    schedule: string;
  }[]): Promise<void>;
  /**
   * Write .vc-config.json for the serverless function.
   */
  protected writeVcConfig(funcDir: string): Promise<void>;
  /**
   * Write the handler.js entry point that uses node:request event.
   */
  protected writeHandler(funcDir: string): Promise<void>;
  /**
   * Copy the server bundle (index.js, server/, package.json) into the function directory.
   */
  protected copyServerBundle(dist: string, funcDir: string): Promise<void>;
  /**
   * Move static assets from dist/public/ to .vercel/output/static/.
   */
  protected copyStaticAssets(dist: string, staticDir: string): Promise<void>;
  /**
   * Write .vercel/project.json if projectId and orgId are available.
   */
  protected writeProjectConfig(ctx: BuildTaskContext, dist: string): Promise<void>;
}
//#endregion
//#region ../../src/cli/core/commands/build.d.ts
declare class BuildCommand {
  protected readonly alepha: Alepha;
  protected readonly log: import("alepha/logger").Logger;
  protected readonly utils: AlephaCliUtils;
  protected readonly pm: PackageManagerUtils;
  protected readonly scaffolder: ProjectScaffolder;
  protected readonly boot: AppEntryProvider;
  protected readonly viteBuildProvider: ViteBuildProvider;
  protected readonly options: Readonly<{
    stats?: "json" | boolean | undefined;
    target?: "bare" | "cloudflare" | "docker" | "static" | "vercel" | undefined;
    runtime?: "bun" | "node" | "workerd" | undefined;
    output?: {
      dist?: string | undefined;
      public?: string | undefined;
    } | undefined;
    vercel?: {
      projectName?: string | undefined;
      orgId?: string | undefined;
      projectId?: string | undefined;
      config?: {
        crons?: {
          path: string;
          schedule: string;
        }[] | undefined;
      } | undefined;
    } | undefined;
    cloudflare?: {
      config?: Record<string, any> | undefined;
    } | undefined;
    docker?: {
      from?: string | undefined;
      command?: string | undefined;
      install?: string[] | undefined;
      image?: {
        tag: string;
        args?: string | undefined;
        oci?: boolean | undefined;
      } | undefined;
      compile?: boolean | {
        target?: string | undefined;
        base?: string | undefined;
        minify?: boolean | undefined;
      } | undefined;
    } | undefined;
    static?: {
      domain?: string | undefined;
    } | undefined;
    pwa?: {
      name: string;
      shortName?: string | undefined;
      themeColor?: string | undefined;
      backgroundColor?: string | undefined;
      display?: "browser" | "fullscreen" | "minimal-ui" | "standalone" | undefined;
      offline?: boolean | undefined;
    } | undefined;
  }>;
  /**
   * Build pipeline: tasks run sequentially in this order.
   * Each task self-guards (checks target, hasClient, etc.).
   * Order matters — compress must be last.
   */
  protected readonly pipeline: (BuildAssetsTask | BuildClientTask | BuildCloudflareTask | BuildCompressTask | BuildDockerTask | BuildPrerenderTask | BuildPwaTask | BuildServerTask | BuildStaticTask | BuildVercelTask)[];
  /**
   * Value aliases accepted for `--target`.
   *
   * These let the CLI accept short forms (e.g. `--target cf`) that are
   * canonicalized to a real {@link BuildTarget} before they flow into the
   * pipeline. The enum in `flags.target` must also list the alias so it
   * passes schema validation.
   */
  protected readonly targetAliases: Record<string, BuildTarget>;
  /**
   * Canonicalize a raw `--target` value, mapping any known alias
   * (e.g. `cf` → `cloudflare`) to its real {@link BuildTarget}.
   */
  protected resolveTarget(target: string | undefined): BuildTarget | undefined;
  /**
   * Resolve the effective runtime based on target and explicit runtime flag.
   *
   * Some targets force a specific runtime:
   * - `cloudflare` always uses `workerd`
   * - `vercel` always uses `node`
   * - `docker` and bare deployments respect the runtime flag
   *
   * @throws {AlephaError} If an incompatible runtime is specified for a target
   */
  protected resolveRuntime(target: BuildTarget | undefined, runtime: BuildRuntime | undefined): BuildRuntime;
  readonly build: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    stats: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodBoolean, import("zod").ZodEnum<{
      json: "json";
    }>]>>;
    target: import("zod").ZodOptional<import("zod").ZodEnum<{
      bare: "bare";
      cf: "cf";
      cloudflare: "cloudflare";
      docker: "docker";
      static: "static";
      vercel: "vercel";
    }>>;
    runtime: import("zod").ZodOptional<import("zod").ZodEnum<{
      bun: "bun";
      node: "node";
      workerd: "workerd";
    }>>;
    image: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodBoolean, import("zod").ZodString]>>;
    compile: import("zod").ZodOptional<import("zod").ZodBoolean>;
    prebuilt: import("zod").ZodOptional<import("zod").ZodBoolean>;
  }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>;
  /**
   * Read `dist/manifest.json` produced by a previous `alepha build`.
   * Returns null when absent or unparseable — caller falls back to the
   * Vite-introspection path.
   */
  protected loadManifest(root: string): Promise<BuildManifest | null>;
}
//#endregion
//#region ../../src/cli/core/commands/clean.d.ts
declare class CleanCommand {
  /**
   * Clean the project, removing the "dist" directory
   */
  readonly clean: import("alepha/command").CommandPrimitive<import("alepha").TObject, import("alepha").ZType, import("alepha").TObject>;
}
//#endregion
//#region ../../src/cli/core/commands/db.d.ts
declare class DbCommand {
  protected readonly log: import("alepha/logger").Logger;
  protected readonly fs: FileSystemProvider;
  protected readonly utils: AlephaCliUtils;
  protected readonly pm: PackageManagerUtils;
  protected readonly entryProvider: AppEntryProvider;
  protected readonly viteUtil: ViteUtils;
  /**
   * Check if database migrations are up to date.
   */
  protected readonly check: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    provider: import("zod").ZodOptional<import("zod").ZodString>;
  }, import("zod/v4/core").$strip>, import("zod").ZodOptional<import("zod").ZodString>, import("alepha").TObject>;
  /**
   * Generate database migration files
   */
  protected readonly create: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    provider: import("zod").ZodOptional<import("zod").ZodString>;
    custom: import("zod").ZodOptional<import("zod").ZodBoolean>;
    name: import("zod").ZodOptional<import("zod").ZodString>;
  }, import("zod/v4/core").$strip>, import("zod").ZodOptional<import("zod").ZodString>, import("alepha").TObject>;
  /**
   * Push database schema changes directly to the database
   */
  protected readonly push: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    provider: import("zod").ZodOptional<import("zod").ZodString>;
    dryRun: import("zod").ZodOptional<import("zod").ZodBoolean>;
  }, import("zod/v4/core").$strip>, import("zod").ZodOptional<import("zod").ZodString>, import("alepha").TObject>;
  /**
   * Apply pending database migrations
   */
  protected readonly apply: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    provider: import("zod").ZodOptional<import("zod").ZodString>;
  }, import("zod/v4/core").$strip>, import("zod").ZodOptional<import("zod").ZodString>, import("alepha").TObject>;
  /**
   * Launch Drizzle Studio database browser
   */
  protected readonly studio: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    provider: import("zod").ZodOptional<import("zod").ZodString>;
  }, import("zod/v4/core").$strip>, import("zod").ZodOptional<import("zod").ZodString>, import("alepha").TObject>;
  /**
   * Parent command for migration operations.
   */
  protected readonly migrations: import("alepha/command").CommandPrimitive<import("alepha").TObject, import("alepha").ZType, import("alepha").TObject>;
  /**
   * Parent command for database operations.
   */
  readonly db: import("alepha/command").CommandPrimitive<import("alepha").TObject, import("alepha").ZType, import("alepha").TObject>;
  /**
   * Run a drizzle-kit command for all database providers in an Alepha instance.
   */
  runDrizzleKitCommand(options: {
    root: string;
    args?: string;
    command: string;
    commandFlags?: string;
    provider?: string;
    logMessage: (providerName: string, dialect: string) => string;
  }): Promise<void>;
  /**
   * Remove `"public".` schema qualifiers from FK REFERENCES in SQL migration files.
   *
   * drizzle-kit generates `REFERENCES "public"."table"(...)` even for schema-free
   * models. This breaks when deploying to a non-public schema via search_path.
   */
  protected stripPublicSchemaFromMigrations(migrationsDir: string): Promise<void>;
  /**
   * Refuse a freshly generated migration that drops a table.
   *
   * Drizzle rebuilds a SQLite table by dropping and recreating it. On
   * Cloudflare D1 that is a data-loss bomb: D1 ignores `PRAGMA
   * foreign_keys=OFF`, so dropping a table that other tables reference with
   * `ON DELETE CASCADE` silently wipes every child row — with no error, on
   * deploy, in production.
   *
   * The generated file is left on disk on purpose: the point is to force a
   * human to read it. If the drop really is intended, keep the file and move
   * on (a re-run detects no schema diff, so nothing is regenerated and this
   * guard stays quiet).
   */
  protected assertNoDestructiveMigrations(migrationsDir: string, files: string[]): Promise<void>;
  /**
   * Extract `DROP TABLE` statements from a SQL migration, skipping any that sit
   * inside a `--` line comment.
   */
  protected findDropTableStatements(sql: string): string[];
  /**
   * Prepare Drizzle configuration files for a database provider.
   */
  prepareDrizzleConfig(options: {
    kit: any;
    provider: DatabaseProvider;
    providerName: string;
    providerUrl: string;
    providerDriver: string;
    dialect: string;
    entry: string;
    rootDir: string;
    command?: string;
  }): Promise<string>;
  /**
   * Generate JavaScript code for Drizzle entities export.
   *
   * When `withoutSchema` is true, uses `getModelsWithoutSchema()` to produce
   * schema-free models for migration generation.
   */
  generateEntitiesJs(entry: string, provider: string, models?: string[], withoutSchema?: boolean): string;
}
//#endregion
//#region ../../src/cli/core/providers/ViteDevServerProvider.d.ts
interface DevServerOptions {
  /**
   * Root directory of the project.
   */
  root: string;
  /**
   * Path to the server entry file.
   */
  entry: AppEntry;
  /**
   * Disable Vite React plugin.
   */
  noViteReactPlugin?: boolean;
}
/**
 * Hook called after Alepha is loaded during dev server init/reload.
 */
type OnAlephaLoadedHook = (alepha: Alepha, server: ViteDevServer) => Promise<void>;
/**
 * Vite development server with Alepha integration.
 *
 * Architecture:
 * - Vite owns the HTTP server
 * - Alepha handles requests via Vite plugin middleware
 * - Request flow: Vite built-in (HMR, assets) → Alepha routes
 *
 * HMR Strategy:
 * - Browser-only changes (CSS, client components) → Vite HMR (React Fast Refresh)
 * - Server-only changes → Reload Alepha → Full browser reload
 * - Shared changes → Reload Alepha → Let HMR propagate
 */
declare class ViteDevServerProvider {
  protected readonly log: import("alepha/logger").Logger;
  protected readonly fs: FileSystemProvider;
  protected readonly colors: ConsoleColorProvider;
  protected readonly viteUtils: ViteUtils;
  protected server: ViteDevServer;
  protected options: DevServerOptions;
  alepha: Alepha | null;
  protected hasError: boolean;
  protected currentError: Error | null;
  protected changedFiles: Set<string>;
  protected waitingForRetry: boolean;
  protected reloadDebounceTimer: ReturnType<typeof setTimeout> | null;
  protected isReloading: boolean;
  protected needsBrowserReload: boolean;
  protected currentReloadPromise: Promise<void> | null;
  protected extraVitePlugins: Plugin[];
  protected alephaLoadedHooks: OnAlephaLoadedHook[];
  /**
   * Register an additional Vite plugin.
   * Must be called before init().
   */
  addVitePlugin(plugin: Plugin): void;
  /**
   * Register a hook called after Alepha is loaded/reloaded.
   */
  onAlephaLoaded(hook: OnAlephaLoadedHook): void;
  /**
   * Trigger a full Alepha reload programmatically.
   */
  reload(): void;
  /**
   * Initialize the dev server and load Alepha.
   */
  init(options: DevServerOptions): Promise<Alepha>;
  /**
   * Start the Alepha server and begin listening.
   */
  start(): Promise<void>;
  /**
   * Check if project uses React.
   */
  hasReact(): boolean;
  /**
   * Create the Vite server with Alepha plugin.
   */
  protected createServer(): Promise<void>;
  /**
   * Intercept Vite's server.restart() to handle .env file changes.
   * Vite calls restart() when .env files change.
   */
  protected patchServerRestartForEnvReload(): void;
  /**
   * Start listening for connections.
   */
  protected listen(): Promise<void>;
  /**
   * Vite plugin that integrates Alepha.
   */
  protected createAlephaPlugin(): Plugin;
  /**
   * Send full browser reload via Vite's HMR.
   * Uses a custom event so the client can poll for readiness before reloading.
   */
  protected sendBrowserReload(): void;
  /**
   * Send error to Vite's native error overlay.
   */
  protected sendErrorOverlay(err: Error): void;
  /**
   * Schedule a debounced reload.
   * Batches rapid file changes into a single reload operation.
   */
  protected scheduleReload(): void;
  /**
   * Perform the actual reload.
   * Returns a promise that callers can await to know when reload is done.
   * If a reload is already in progress, returns that promise.
   */
  protected performReload(): Promise<void>;
  /**
   * Execute the reload work.
   */
  protected executeReload(): Promise<void>;
  /**
   * Load or reload the Alepha instance.
   */
  protected loadAlepha(isInitialLoad?: boolean, filesToInvalidate?: Set<string>): Promise<Alepha>;
  /**
   * Setup Alepha instance with dev-specific configuration.
   */
  protected setupAlepha(): Promise<void>;
  /**
   * Detect a favicon file in the given directory.
   * Returns "mimeType:/path" if found, undefined otherwise.
   */
  protected detectFavicon(publicDir: string): Promise<string | undefined>;
  /**
   * Generate dev head content for SSR.
   *
   * IMPORTANT: We call transformIndexHtml() on an EMPTY <head> (no script/link
   * tags) to collect plugin-injected preambles — specifically the React Fast
   * Refresh runtime from @vitejs/plugin-react. We then manually append our
   * own browser entry and stylesheet tags.
   *
   * Why not include <script>/<link> tags in the HTML passed to transformIndexHtml?
   * Because Vite would pre-transform the referenced browser entry module, which
   * walks the entire client module graph and triggers dep discovery. This creates
   * a race condition with Vite's background dep scanner: both find the same deps,
   * but the scanner commits a second optimization pass that replaces the first,
   * causing "504 Outdated Optimize Dep" errors on cold start.
   *
   * By passing empty HTML, we get the preamble without triggering the module
   * graph walk, leaving the scanner as the single dep discovery mechanism.
   */
  protected generateDevHead(): Promise<string>;
  /**
   * Setup environment variables for dev mode.
   */
  protected setupEnvironment(): Promise<void>;
  /**
   * Invalidate modules and all their importers, across both client and
   * SSR module graphs.
   *
   * Vite registers a file under multiple module ids (one per query
   * variant — e.g. `?v=…`, `?import` and the bare path), and `getModuleById`
   * only matches one. For workspace-linked source files (`@alepha/ui/...`)
   * the SSR-graph entry is keyed by the absolute path while the client
   * may use the package-qualified id. `getModulesByFile` returns every
   * variant Vite knows about for a given absolute path — invalidating
   * each catches both halves of the dual graph and prevents stale SSR
   * compiled exports from surviving across edits.
   */
  protected invalidateModulesWithImporters(changedFiles: Set<string>): void;
  /**
   * Wait for file changes and retry loading until successful.
   */
  protected waitForSuccessfulLoad(): Promise<Alepha>;
  /**
   * Clear global Alepha references before reload.
   */
  protected clearAlephaRefs(): void;
  /**
   * Destroy the current Alepha instance.
   */
  protected destroyAlepha(): Promise<void>;
  /**
   * Get the loaded Alepha instance from globalThis.
   */
  protected getLoadedAlepha(): Alepha;
  /**
   * Fix stack trace using Vite's SSR stack trace fixer.
   */
  protected fixStacktrace(error: Error): void;
  /**
   * Log a formatted error with stack trace.
   */
  protected logError(title: string, err: unknown): void;
  /**
   * Log error message and stack, recursively logging cause if present.
   */
  protected logErrorWithCause(err: unknown, depth?: number): void;
}
//#endregion
//#region ../../src/cli/core/commands/dev.d.ts
declare class DevCommand {
  protected readonly log: import("alepha/logger").Logger;
  protected readonly fs: FileSystemProvider;
  protected readonly utils: AlephaCliUtils;
  protected readonly pm: PackageManagerUtils;
  protected readonly scaffolder: ProjectScaffolder;
  protected readonly alepha: Alepha;
  protected readonly viteDevServer: ViteDevServerProvider;
  protected readonly boot: AppEntryProvider;
  protected readonly options: Readonly<{
    noViteReactPlugin?: boolean | undefined;
  }>;
  /**
   * Will run the project in watch mode.
   *
   * When run from a workspace root (with apps/ directory), spawns all apps in parallel.
   * When run from an app directory, starts a single Vite dev server.
   */
  readonly dev: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    only: import("zod").ZodOptional<import("zod").ZodString>;
  }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>;
  /**
   * Discover apps in the workspace root.
   *
   * Looks for directories under apps/ that contain a package.json.
   * Supports scoped directories (e.g., apps/@passeo/api).
   * Returns empty array if not in a workspace root.
   */
  protected discoverApps(root: string): Promise<Array<{
    name: string;
    path: string;
  }>>;
  /**
   * Run a single app (existing behavior).
   */
  protected runSingle(root: string): Promise<void>;
  /**
   * Run multiple apps in parallel with colored prefixed output.
   */
  protected runMultiple(_root: string, apps: Array<{
    name: string;
    path: string;
  }>, flags: Record<string, unknown>): Promise<void>;
  /**
   * Spawn a single app process with inherited stdio.
   *
   * Each child process gets APP_NAME set, so the Alepha logger
   * handles prefixing automatically.
   */
  protected spawnApp(app: {
    name: string;
    path: string;
  }, port: number): ReturnType<typeof spawn>;
}
//#endregion
//#region ../../src/cli/core/services/GitMessageParser.d.ts
/**
 * Service for parsing git commit messages into structured format.
 *
 * Only parses **conventional commits with a scope**:
 * - `feat(scope): description` → feature
 * - `fix(scope): description` → bug fix
 * - `feat(scope)!: description` → breaking change
 *
 * Commits without scope are ignored, allowing developers to commit
 * work-in-progress changes without polluting release notes:
 * - `cli: work in progress` → ignored (no type)
 * - `fix: quick patch` → ignored (no scope)
 * - `feat(cli): add command` → included
 */
declare class GitMessageParser {
  protected readonly log: import("alepha/logger").Logger;
  /**
   * Parse a git commit line into a structured Commit object.
   *
   * **Format:** `type(scope): description` or `type(scope)!: description`
   *
   * **Supported types:** feat, fix, docs, refactor, perf, revert
   *
   * **Breaking changes:** Use `!` before `:` (e.g., `feat(api)!: remove endpoint`)
   *
   * @returns Commit object or null if not matching/ignored
   */
  parseCommit(line: string, config: ChangelogOptions): Commit | null;
}
//#endregion
//#region ../../src/cli/core/commands/gen/changelog.d.ts
/**
 * Git provider for executing git commands.
 * Can be substituted in tests with a mock implementation.
 */
declare class GitProvider {
  exec(cmd: string, cwd: string): Promise<string>;
}
interface Commit {
  hash: string;
  type: string;
  scope: string | null;
  description: string;
  breaking: boolean;
}
interface ChangelogEntry {
  features: Commit[];
  fixes: Commit[];
}
/**
 * Changelog command for generating release notes from git commits.
 *
 * Usage:
 * - `alepha gen changelog` - Show unreleased changes since latest tag to HEAD
 * - `alepha gen changelog --from=1.0.0` - Show changes from version to HEAD
 * - `alepha gen changelog --from=1.0.0 --to=1.1.0` - Show changes between two refs
 * - `alepha gen changelog | tee -a CHANGELOG.md` - Append to file
 */
declare class ChangelogCommand {
  protected readonly log: import("alepha/logger").Logger;
  protected readonly git: GitProvider;
  protected readonly parser: GitMessageParser;
  protected readonly config: Readonly<{
    ignore?: string[] | undefined;
  }>;
  /**
   * Format a single commit line.
   * Example: `- **cli**: add new command (\`abc1234\`)`
   * Breaking changes are flagged: `- **cli**: add new command [BREAKING] (\`abc1234\`)`
   */
  protected formatCommit(commit: Commit): string;
  /**
   * Format the changelog entry with sections.
   */
  protected formatEntry(entry: ChangelogEntry): string;
  /**
   * Parse git log output into a changelog entry.
   */
  protected parseCommits(commitsOutput: string): ChangelogEntry;
  /**
   * Check if entry has any public commits.
   */
  protected hasChanges(entry: ChangelogEntry): boolean;
  /**
   * Get the latest version tag.
   */
  protected getLatestTag(git: (cmd: string) => Promise<string>): Promise<string | null>;
  readonly command: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    from: import("zod").ZodOptional<import("zod").ZodString>;
    to: import("zod").ZodOptional<import("zod").ZodString>;
  }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>;
}
//#endregion
//#region ../../src/cli/core/commands/gen/openapi.d.ts
declare class OpenApiCommand {
  protected readonly log: import("alepha/logger").Logger;
  protected readonly utils: AlephaCliUtils;
  protected readonly fs: FileSystemProvider;
  readonly command: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    out: import("zod").ZodOptional<import("zod").ZodString>;
  }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>;
}
//#endregion
//#region ../../src/cli/core/commands/init.d.ts
declare class InitCommand {
  protected readonly scaffolder: ProjectScaffolder;
  /**
   * Ensure the project has the necessary Alepha configuration files.
   * Add the correct dependencies to package.json and install them.
   */
  readonly init: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    pm: import("zod").ZodOptional<import("zod").ZodEnum<{
      bun: "bun";
      npm: "npm";
      pnpm: "pnpm";
      yarn: "yarn";
    }>>;
    api: import("zod").ZodOptional<import("zod").ZodBoolean>;
    react: import("zod").ZodOptional<import("zod").ZodBoolean>;
    tailwind: import("zod").ZodOptional<import("zod").ZodBoolean>;
    force: import("zod").ZodOptional<import("zod").ZodBoolean>;
  }, import("zod/v4/core").$strip>, import("zod").ZodOptional<import("zod").ZodString>, import("alepha").TObject>;
}
//#endregion
//#region ../../src/cli/core/commands/lint.d.ts
declare class LintCommand {
  protected readonly utils: AlephaCliUtils;
  protected readonly scaffolder: ProjectScaffolder;
  readonly lint: import("alepha/command").CommandPrimitive<import("alepha").TObject, import("alepha").ZType, import("alepha").TObject>;
}
//#endregion
//#region ../../src/cli/core/commands/pack.d.ts
/**
 * Pack the workspace into a deployable `tar.gz`.
 *
 * The tar contains everything a remote runner (Alepha Rocket, or any
 * `alepha platform <op> --prebuilt` consumer) needs to deploy the app:
 *
 *   dist/                 pre-built output (incl. manifest.json)
 *   migrations/           SQL files (if present)
 *
 * No source, no `alepha.config.ts`, no `package.json` — the deploy
 * side reads everything from `dist/manifest.json` and never touches
 * source. Excludes: `node_modules`, `.DS_Store`, macOS AppleDouble
 * (`._*`), `.alepha` build cache, `e2e`, `playwright-report`,
 * `coverage`.
 *
 * Output name: `<project-name>-<tag>.tar.gz` (default tag
 * "latest"). Project name comes from `package.json.name`. Naming
 * mirrors Docker tags — same artifact, different tag = different
 * file.
 */
declare class PackCommand {
  protected readonly log: import("alepha/logger").Logger;
  protected readonly fs: FileSystemProvider;
  protected readonly shell: ShellProvider;
  readonly pack: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    tag: import("zod").ZodOptional<import("zod").ZodString>;
    output: import("zod").ZodOptional<import("zod").ZodString>;
  }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>;
}
//#endregion
//#region ../../src/cli/core/commands/root.d.ts
declare class RootCommand {
  protected readonly log: import("alepha/logger").Logger;
  protected readonly cli: CliProvider;
  protected readonly alepha: Alepha;
  protected readonly color: ConsoleColorProvider;
  /**
   * Called when no command is provided
   */
  readonly root: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    version: import("zod").ZodOptional<import("zod").ZodBoolean>;
  }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>;
}
//#endregion
//#region ../../src/cli/core/commands/test.d.ts
declare class TestCommand {
  protected readonly utils: AlephaCliUtils;
  protected readonly scaffolder: ProjectScaffolder;
  readonly test: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{
    config: import("zod").ZodOptional<import("zod").ZodString>;
  }, import("zod/v4/core").$strip>, import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodObject<{
    VITEST_ARGS: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
  }, import("zod/v4/core").$strip>>;
}
//#endregion
//#region ../../src/cli/core/commands/typecheck.d.ts
declare class TypecheckCommand {
  protected readonly utils: AlephaCliUtils;
  protected readonly scaffolder: ProjectScaffolder;
  /**
   * Run TypeScript type checking across the codebase with no emit.
   */
  readonly typecheck: import("alepha/command").CommandPrimitive<import("alepha").TObject, import("alepha").ZType, import("alepha").TObject>;
}
//#endregion
//#region ../../src/cli/core/commands/verify.d.ts
declare class VerifyCommand {
  protected readonly utils: AlephaCliUtils;
  protected readonly pm: PackageManagerUtils;
  /**
   * Run a series of verification commands to ensure code quality and correctness.
   *
   * This command runs the following checks in order:
   * - Clean the project
   * - Format the code
   * - Lint the code
   * - Run tests (if a `test/` directory exists)
   * - Check database migrations (if a migrations directory exists)
   * - Type check the code
   * - Build the project
   * - Clean the project again
   */
  readonly verify: import("alepha/command").CommandPrimitive<import("alepha").TObject, import("alepha").ZType, import("alepha").TObject>;
}
//#endregion
//#region ../../src/cli/core/providers/AlephaCliExtensionProvider.d.ts
declare class AlephaCliExtensionProvider {
  protected readonly alepha: Alepha;
  protected readonly fs: FileSystemProvider;
  protected readonly onConfigure: import("alepha").HookPrimitive<"configure">;
}
//#endregion
//#region ../../src/cli/core/index.d.ts
/**
 * Services, providers, and build tasks — no commands.
 * Use this module when you need CLI utilities without registering commands.
 */
declare const AlephaCliServices: import("alepha").Service<import("alepha").Module>;
/**
 * Full CLI module — all services and commands.
 */
declare const AlephaCli: import("alepha").Service<import("alepha").Module>;
//#endregion
export { AlephaCli, AlephaCliExtensionProvider, AlephaCliServices, AlephaCliUtils, AppEntry, AppEntryOptions, AppEntryProvider, BufferedLogger, BuildAssetsTask, BuildClientTask, BuildCloudflareTask, BuildCommand, BuildCompressTask, BuildDockerTask, BuildManifest, BuildOptions, BuildPrerenderTask, BuildRuntime, BuildServerTask, BuildStaticTask, BuildTarget, BuildTask, BuildTaskContext, BuildVercelTask, ChangelogCommand, ChangelogOptions, CleanCommand, Commit, CompressOptions, DEFAULT_IGNORE, DbCommand, DependencyModes, DevCommand, DevOptions, DevServerOptions, GitMessageParser, GitProvider, InitCommand, LintCommand, OnAlephaLoadedHook, OpenApiCommand, PackCommand, PackageManagerUtils, PreloadManifest, ProjectScaffolder, RootCommand, TestCommand, TypecheckCommand, VerifyCommand, ViteBuildProvider, ViteDevServerProvider, ViteUtils, WorkspaceContext, alephaPackageJson, appEntryOptions, buildOptions, changelogOptions, devOptions, version };
//# sourceMappingURL=index.d.ts.map