/**
 * Unified Context — Single Source of Truth
 *
 * Merges the best of MegaContext (typed, deterministic scaffolding)
 * with Brain (narrative, registry, scan memory, checkpoints).
 *
 * context.json can contain ANY combination of these sections.
 * PlanningMode and ContextSyncer work with whatever sections are present.
 */
import { ProjectConfig } from "./index";
import { SpecState } from "./living-context";
import { MegaContext } from "./mega-context";
export interface BrainSection {
    version?: string;
    narrative?: string;
    status?: string;
    checkpoints?: Checkpoint[];
    updates?: any[];
    tasks?: any[];
    artifacts?: Record<string, any>;
    memory?: Record<string, any>;
    registry?: ComponentRegistry;
}
export interface Checkpoint {
    id: string;
    label: string;
    status: "complete" | "in-progress" | "planned";
}
export interface RegisteredComponent {
    name: string;
    description: string;
    path: string;
}
export interface ComponentRegistry {
    components: RegisteredComponent[];
}
export interface ArchitectureSection {
    type?: string;
    packages?: Record<string, PackageInfo>;
}
export interface PackageInfo {
    name?: string;
    version?: string;
    description?: string;
    entrypoint?: string;
    techStack?: string[];
    modules?: Record<string, any>;
    exports?: string[];
}
export interface CapabilitiesSection {
    [key: string]: string;
}
/**
 * The context.json file can contain any mix of these sections.
 * MegaContext fields are used for fresh scaffold projects.
 * Brain fields are used for existing/scanned projects.
 * Both can coexist.
 */
export interface UnifiedContext {
    brain?: BrainSection;
    architecture?: ArchitectureSection;
    capabilities?: CapabilitiesSection;
    project?: ProjectConfig & {
        framework?: string;
        backend?: string;
        styling?: string;
        type?: string;
        techStack?: string[];
        targetStack?: string[];
    };
    topLevelDesign?: MegaContext["topLevelDesign"];
    auth?: MegaContext["auth"];
    database?: MegaContext["database"];
    routing?: MegaContext["routing"];
    globalState?: MegaContext["globalState"];
    experiments?: string[];
    specifications?: Record<string, SpecState>;
    flows?: Array<{
        id: string;
        name: string;
        description: string;
        steps: string[];
        actors: string[];
        structuredSteps?: Array<{
            stepNumber: number;
            action: string;
            expectedOutcome: string;
            linkedComponentIds?: string[];
        }>;
        linkedFeatureId?: string;
    }>;
}
/**
 * Helper: Extract human-readable summary from any context shape
 */
export declare function getContextSummary(ctx: UnifiedContext): {
    name: string;
    description: string;
    entities: string[];
    routes: string[];
    roles: string[];
    components: RegisteredComponent[];
    checkpoints: Checkpoint[];
    capabilities: string[];
};
/**
 * Helper: Check if context has MegaContext fields (scaffold-ready)
 */
export declare function isMegaContext(ctx: UnifiedContext): ctx is UnifiedContext & {
    database: any;
    routing: any;
    auth: any;
};
/**
 * Helper: Check if context has Brain fields (scanned project)
 */
export declare function isBrainContext(ctx: UnifiedContext): boolean;
//# sourceMappingURL=unified-context.d.ts.map