/** * Flag family constants and validation shared by `scaffold init` and * `scaffold adopt`. * * Extracted from `src/cli/commands/init.ts` so that adopt can reuse the * same family detection, mixed-family rejection, and project-type * consistency checks without duplicating the logic. * * Every constant keeps its `as const` assertion — the literal union * narrowing is relied on elsewhere for type-safe argv key lookups. */ import type { z } from 'zod'; import type { GameConfigSchema, WebAppConfigSchema, BackendConfigSchema, CliConfigSchema, LibraryConfigSchema, MobileAppConfigSchema, DataPipelineConfigSchema, MlConfigSchema, BrowserExtensionConfigSchema, ResearchConfigSchema, McpServerConfigSchema, MacosNativeConfigSchema } from '../config/schema.js'; type GameConfig = z.infer; type WebAppConfig = z.infer; type BackendConfig = z.infer; type CliConfig = z.infer; type LibraryConfig = z.infer; type MobileAppConfig = z.infer; type DataPipelineConfig = z.infer; type MlConfig = z.infer; type BrowserExtensionConfig = z.infer; type ResearchConfig = z.infer; type McpServerConfig = z.infer; type MacosNativeConfig = z.infer; export declare const PROJECT_TYPE_FLAG: "project-type"; export declare const GAME_FLAGS: readonly ["engine", "multiplayer", "target-platforms", "online-services", "content-structure", "economy", "narrative", "locales", "npc-ai", "modding", "persistence"]; export declare const WEB_FLAGS: readonly ["web-rendering", "web-deploy-target", "web-realtime", "web-auth-flow"]; export declare const BACKEND_FLAGS: readonly ["backend-api-style", "backend-data-store", "backend-auth", "backend-messaging", "backend-deploy-target", "backend-domain"]; export declare const CLI_TYPE_FLAGS: readonly ["cli-interactivity", "cli-distribution", "cli-structured-output"]; export declare const LIB_FLAGS: readonly ["lib-visibility", "lib-runtime-target", "lib-bundle-format", "lib-type-definitions", "lib-doc-level"]; export declare const MOBILE_FLAGS: readonly ["mobile-platform", "mobile-distribution", "mobile-offline", "mobile-push-notifications"]; export declare const PIPELINE_FLAGS: readonly ["pipeline-processing", "pipeline-orchestration", "pipeline-quality", "pipeline-schema", "pipeline-catalog"]; export declare const ML_FLAGS: readonly ["ml-phase", "ml-model-type", "ml-serving", "ml-experiment-tracking"]; export declare const EXT_FLAGS: readonly ["ext-manifest", "ext-ui-surfaces", "ext-content-script", "ext-background-worker"]; export declare const RESEARCH_FLAGS: readonly ["research-driver", "research-interaction", "research-domain", "research-tracking"]; export declare const MCP_SERVER_FLAGS: readonly ["mcp-language", "mcp-transport", "mcp-primitives", "mcp-auth", "mcp-deployment", "mcp-stateful"]; export declare const MACOS_NATIVE_FLAGS: readonly ["macos-ui-framework", "macos-app-style", "macos-min-version", "macos-distribution", "macos-sandboxed", "macos-persistence", "macos-auto-update"]; export type PartialConfigOverrides = { type: 'game'; partial: Partial; } | { type: 'web-app'; partial: Partial; } | { type: 'backend'; partial: Partial; } | { type: 'cli'; partial: Partial; } | { type: 'library'; partial: Partial; } | { type: 'mobile-app'; partial: Partial; } | { type: 'data-pipeline'; partial: Partial; } | { type: 'ml'; partial: Partial; } | { type: 'browser-extension'; partial: Partial; } | { type: 'research'; partial: Partial; } | { type: 'mcp-server'; partial: Partial; } | { type: 'macos-native'; partial: Partial; } | undefined; /** * Apply all project-type flag-family validation rules. * * Throws on violation and returns `true` on success so it can be used as * the body of yargs' `.check()` contract. * * Init-only checks (`--depth`, `--adapters`, `--traits`) stay in the init * command's own `.check()` closure. */ export declare function applyFlagFamilyValidation(argv: Record): true | never; /** * Walk argv and return a discriminated-union payload keyed by the detected * project-type flag family. Returns `undefined` when no type-specific flags * are present. * * Field names are mapped from the kebab-case CLI flag form to the camelCase * schema field names (see `src/config/schema.ts`). Precedence matches the * init command's detection order: game → web-app → backend → cli → library * → mobile-app → data-pipeline → ml → browser-extension. * * `applyFlagFamilyValidation` must be called before this function to * guarantee at most one family is present in argv. */ export declare function buildFlagOverrides(argv: Record): PartialConfigOverrides; /** * The one flag each project type must be given under `--auto`, because the * wizard has no defensible default for it. `null` means the type is fully * defaultable and needs no flag. * * One source of truth for three consumers: the `--help` annotation in * init.ts, the INIT_AUTO_FLAG_REQUIRED error in wizard/questions.ts, and the * published contract in content/guides/cli/index.md. Adding a project type * without adding a row here fails init-flag-families.test.ts. * * Before this existed the same knowledge was duplicated across nine bare * `throw new Error(...)` sites and documented in none of them, which is why * `--auto` could not be driven from `--help` alone. */ export declare const AUTO_REQUIRED_FLAG: Readonly>; /** Help-text annotation for a flag that `--auto` requires. Empty otherwise. */ export declare function autoRequiredSuffix(flag: string): string; export {}; //# sourceMappingURL=init-flag-families.d.ts.map