/**
 * Nexus Prime — Staged Bootstrap Types
 *
 * Defines the contract for the 3-stage bootstrap:
 *   1. bootstrap_fast  → orientation (workspace, memory, DNA)
 *   2. bootstrap_deep  → preparation (candidates, knowledge fabric, planning)
 *   3. run_prepare     → assembly (instruction packet, worker plan)
 */
export interface WorkspaceEnvelope {
    repoRoot: string;
    repoName: string;
    workspaceRoot: string;
    workspaceSource: string;
    stateKey: string;
    stateRoot: string;
}
export interface RuntimeIdentity {
    runtimeId: string;
    sessionId: string;
    startedAt: number;
}
export interface MemoryHealthSummary {
    prefrontal: number;
    hippocampus: number;
    cortex: number;
    quarantined: number;
    totalEntries: number;
}
export interface SessionSummaryBootstrap {
    summary: string;
    summaryTokens: number;
    originalTokens: number;
    savedTokens: number;
}
export interface ProjectMemoryBootstrap {
    count: number;
    excerpts: string[];
}
export interface BootstrapFastResult {
    /** Workspace envelope resolved from the repo/cwd */
    workspace: WorkspaceEnvelope;
    /** Session and runtime identity */
    runtime: RuntimeIdentity;
    /** Prior session summary (if available — saves re-reading) */
    sessionSummary?: SessionSummaryBootstrap;
    /** Prior project-scoped memories recovered */
    projectMemory?: ProjectMemoryBootstrap;
    /** Memory health counts per tier */
    memoryHealth: MemoryHealthSummary;
    /** Memory recall results for the current task */
    memoryRecall: {
        count: number;
        matches: string[];
    };
    /** Intent classification from task text */
    intent: {
        taskType: string;
        riskClass: string;
        complexity: number;
    };
    /** What the caller should do next */
    recommendedNextStep: 'nexus_orchestrate' | 'nexus_plan_execution';
    /** Whether deep bootstrap should follow (e.g. if candidate count is high) */
    needsDeepBootstrap: boolean;
    /** Whether token optimization is likely needed */
    tokenOptimizationLikely: boolean;
    /** Timestamp of bootstrap completion */
    bootstrappedAt: number;
}
export interface CandidateFile {
    path: string;
    reason: string;
}
export interface BootstrapShortlist {
    skills: string[];
    specialists: string[];
    workflows: string[];
}
export interface SourceMixRecommendation {
    dominantSource: string;
    reasons: string[];
}
export interface KnowledgeWarmupSummary {
    repoSelectedFiles: number;
    memorySources: number;
    ragChunks: number;
    patternHits: number;
}
export interface TopologyHint {
    suggestedWorkers: number;
    mode: string;
    rationale: string;
}
export interface BootstrapDeepResult {
    /** Candidate files discovered from the repo */
    candidateFiles: CandidateFile[];
    /** Dropped candidates (outside repo scope) */
    candidateFilesDropped: string[];
    /** Artifact shortlist for skills / specialists / workflows */
    shortlist: BootstrapShortlist;
    /** Knowledge fabric source mix recommendation */
    sourceMixRecommendation: SourceMixRecommendation;
    /** Summary of knowledge warmup */
    knowledgeWarmup: KnowledgeWarmupSummary;
    /** Worker topology hints for the planner */
    topologyHints: TopologyHint[];
    /** Resolved catalog health */
    catalogHealth: {
        overall: string;
    };
    /** Deep bootstrap timestamp */
    deepBootstrappedAt: number;
}
export interface RunPrepareResult {
    /** Assembled instruction packet (task + context + constraints) */
    packetSummary: string;
    /** Source-aware token budget */
    sourceAwareBudget: {
        totalBudget: number;
        allocatedBySource: Record<string, number>;
        reason: string;
    };
    /** Artifact selection audit */
    selectedArtifacts: {
        skills: string[];
        specialists: string[];
        workflows: string[];
        hooks: string[];
    };
    /** Worker plan */
    workerPlan: {
        totalWorkers: number;
        mode: string;
        lanes: Array<{
            role: string;
            files: string[];
        }>;
    };
    /** Task graph */
    taskGraph: {
        phases: string[];
        independentBranches: number;
    };
}
export interface RepoIdentity {
    repoRoot: string;
    repoName: string;
    gitHead?: string;
}
export interface BootstrapReceipt {
    /** Workspace state key — unique to this workspace */
    workspaceStateKey: string;
    /** Session ID that produced this receipt */
    sessionId: string;
    /** Timestamp when bootstrap completed */
    bootstrappedAt: number;
    /** Whether fast bootstrap was completed */
    fast: boolean;
    /** Whether deep bootstrap was completed */
    deep: boolean;
    /** Recommended next step at time of bootstrap */
    recommendedNextStep: string;
    /** Repo identity for staleness detection */
    repoIdentity: RepoIdentity;
}
/** Check whether staged bootstrap is enabled via env var. */
export declare function isStagedBootstrapEnabled(): boolean;
