import { type RepoGraphStatus, type RuntimeSnapshot } from "../runtime/client.js";
import type { PackSelectionArtifactData } from "./mcp-pack-selection.js";
export type ReadySubstrateStatus = "ready" | "partial" | "missing";
export interface ReadySubstrateArtifact {
    path: string;
    valid: boolean;
    required: boolean;
    role: "runtime-compat" | "repo-map" | "graph" | "impact" | "pack" | "review" | "tool-entry";
}
export interface ReadyRepoSubstrateState {
    artifactType: "kiwi-control/ready-substrate";
    version: 1;
    generatedAt: string;
    targetRoot: string;
    status: ReadySubstrateStatus;
    ready: boolean;
    summary: string;
    runtimeAuthority: {
        valid: boolean;
        revision: number | null;
        lifecycle: string | null;
        sourceCommand: string | null;
        nextCommand: string | null;
        lastUpdatedAt: string | null;
        sqlitePath: string;
        compatibilityStatePath: string;
        compatibilityEventsPath: string;
        note: string;
    };
    graphAuthority: {
        valid: boolean;
        ready: boolean;
        status: string;
        freshness: string;
        graphRevision: number | null;
        sourceRevision: number | null;
        sourceRuntimeRevision: number | null;
        generatedAt: string | null;
        graphAuthorityPath: string;
        kind: string;
        nodeCount: number;
        edgeCount: number;
        moduleCount: number;
        symbolCount: number;
        aliasKind: string;
        aliasCount: number;
        aliasAmbiguityCount: number;
        explicitAliasSourcePath: string;
        explicitAliasSourceAvailable: boolean;
        artifactPath: string | null;
        compatibilityExportReady: boolean;
        compatibilityInSync: boolean;
        compatibilityArtifacts: RepoGraphStatus["compatibilityArtifacts"];
        note: string;
    };
    packSelection: {
        selectedPack: string | null;
        selectedPackSource: string | null;
        explicitSelection: string | null;
        executable: boolean;
        unavailablePackReason: string | null;
        effectiveCapabilityIds: string[];
        preferredCapabilityIds: string[];
        availablePacks: Array<{
            id: string;
            executable: boolean;
            unavailablePackReason: string | null;
        }>;
    };
    artifacts: Record<string, ReadySubstrateArtifact>;
    readFirst: string[];
    toolEntry: {
        path: ".agent/context/agent-pack.json";
        note: string;
    };
    missingRequired: string[];
}
export declare function readySubstratePath(targetRoot: string): string;
export declare function buildReadyRepoSubstrate(targetRoot: string, runtimeSnapshot?: RuntimeSnapshot | null, packSelection?: PackSelectionArtifactData | null): Promise<ReadyRepoSubstrateState>;
export declare function persistReadyRepoSubstrate(targetRoot: string, packSelection?: PackSelectionArtifactData | null, runtimeSnapshot?: RuntimeSnapshot | null): Promise<string>;
export declare function loadReadyRepoSubstrate(targetRoot: string): Promise<ReadyRepoSubstrateState | null>;
//# sourceMappingURL=ready-substrate.d.ts.map