import type { ScaffoldError, ScaffoldWarning, ProjectType, GameConfig, DetectedConfig } from '../types/index.js'; import type { Confidence, DetectionEvidence } from './detectors/types.js'; import type { PartialConfigOverrides } from '../cli/init-flag-families.js'; declare const TYPE_KEY: Record; export { TYPE_KEY }; export type AdaptationStrategy = 'update-mode' | 'skip-recommended' | 'context-only' | 'full-run'; export interface ArtifactMatch { artifactPath: string; matchedStep: string; strategy: AdaptationStrategy; } export interface AdoptionResult { mode: 'greenfield' | 'brownfield' | 'v1-migration'; artifactsFound: number; detectedArtifacts: ArtifactMatch[]; stepsCompleted: string[]; stepsRemaining: string[]; methodology: string; errors: ScaffoldError[]; warnings: ScaffoldWarning[]; projectType?: ProjectType; /** @deprecated Use detectedConfig instead. Removed in v4.0. */ gameConfig?: Partial; detectedConfig?: DetectedConfig; detectionEvidence?: readonly DetectionEvidence[]; detectionConfidence?: Confidence; } /** * Scan projectRoot for existing artifacts, match to pipeline steps, * and pre-populate state.json. */ export declare function runAdoption(options: { projectRoot: string; metaPromptDir: string; methodology: string; dryRun: boolean; auto?: boolean; force?: boolean; verbose?: boolean; explicitProjectType?: ProjectType; flagOverrides?: PartialConfigOverrides; }): Promise; export interface FieldConflict { readonly field: string; readonly existing: unknown; readonly detected: unknown; } /** * Shallow merge: existing values win on overlap, detected fills gaps. * Returns the merged object plus a list of FieldConflict records for any field * where detected and existing disagree (caller emits ADOPT_FIELD_CONFLICT warnings). * * Uses JSON.stringify for value equality so arrays and (future) nested objects * are compared by content, not reference. */ export declare function mergeRawConfig>(detected: Partial, existing: Record | undefined): { merged: Record; conflicts: FieldConflict[]; }; export declare function applyFlagOverrides>(base: Record, overrides: Partial | undefined): Record; /** * Convert FieldConflict[] into ADOPT_FIELD_CONFLICT warnings for the orchestrator * to push onto result.warnings. */ export declare function emitFieldConflictWarnings(conflicts: readonly FieldConflict[], configKey: string): import('../types/index.js').ScaffoldWarning[]; //# sourceMappingURL=adopt.d.ts.map