import type { CapabilityProvider } from '../../languages/capabilities/provider';
import type { StructuralResult } from '../../languages/capabilities/types';
import { type GraphJson } from '../../explore/types';
interface GraphifyResult {
    functionCount: number;
    classCount: number;
    maxFunctionsInFile: number;
    maxFunctionsFilePath: string;
    godNodeCount: number;
    communityCount: number;
    avgCohesion: number;
    orphanModuleCount: number;
    deadImportCount: number;
    commentedCodeRatio: number;
    sourceFilesInGraph: number;
    graph?: GraphJson;
}
/**
 * Outcome union mirrors the other global wrappers (gitleaks, semgrep,
 * jscpd). The capability provider collapses this to `StructuralResult
 * | null`; the Layer 2 reshape in `tools/parallel.ts` reads
 * `unavailable.reason` so `toolsUnavailable` surfaces the precise
 * failure mode (`graphify (not installed)`, `graphify (failed to run)`,
 * `graphify (parse error)`, …).
 */
export type StructuralGatherOutcome = {
    kind: 'success';
    envelope: StructuralResult;
} | {
    kind: 'unavailable';
    reason: string;
};
/**
 * Graph-artifact outcome for the explore CLI / dashboard viz / future
 * graph consumers. Sibling to `StructuralGatherOutcome` but carries
 * the full `GraphJson` instead of the aggregate envelope. Both
 * outcomes are populated from a single Python invocation; consumers
 * pick the slice they need.
 */
export type GraphGatherOutcome = {
    kind: 'success';
    graph: GraphJson;
} | {
    kind: 'unavailable';
    reason: string;
};
/**
 * Aggregate-metrics outcome — the existing API. Consumed by
 * `graphifyProvider` (capability dispatcher) + the Layer 2 legacy
 * reshape in `tools/parallel.ts`. Signature unchanged from pre-2.7.
 */
export declare function gatherGraphifyResult(cwd: string): Promise<StructuralGatherOutcome>;
/**
 * Graph-artifact outcome — new in 2.7. Consumed by the explore CLI's
 * `loadGraph` path (via the `.dxkit/reports/graph.json` write), by
 * direct in-memory consumers that want the graph without a disk
 * roundtrip, and by future 2.8 context-CLI + reachability gathers.
 *
 * Shares one Python invocation with `gatherGraphifyResult` per the
 * runPromises cache — concurrent calls coalesce; sequential calls
 * read from memoized caches.
 *
 * Side effect: when the gather succeeds AND `opts.writeToDisk` is
 * truthy (default), the graph is written to
 * `.dxkit/reports/graph.json`. Set `writeToDisk: false` for one-shot
 * in-memory consumers (tests, ephemeral CLI flows) that don't want
 * the file-system side effect. The write is idempotent — repeated
 * calls overwrite atomically.
 */
export declare function gatherGraphifyGraph(cwd: string, opts?: {
    writeToDisk?: boolean;
}): Promise<GraphGatherOutcome>;
/**
 * Pure JSON-to-envelope reshape so the normalization contract is
 * unit-testable without shelling out to Python.
 *
 * The Python helper emits `maxFunctionsFilePath` as an absolute path
 * (`str(Path(...))` on a value derived from `target = sys.argv[1]`).
 * Renderers downstream emit this field verbatim into customer-facing
 * markdown, so it has to be project-relative before it leaves the
 * gather layer — mirrors the gitleaks / semgrep / grep-secrets pattern
 * where each tool wrapper owns its own path normalization.
 */
export declare function buildGraphifyEnvelope(data: GraphifyResult, cwd: string): StructuralResult;
/**
 * Capability-shaped provider. Register in
 * `src/languages/capabilities/global.ts:GLOBAL_CAPABILITIES.structural`
 * so the dispatcher picks it up via `providersFor(STRUCTURAL)`.
 */
export declare const graphifyProvider: CapabilityProvider<StructuralResult> & {
    gatherOutcome(cwd: string): Promise<StructuralGatherOutcome>;
};
export {};
//# sourceMappingURL=graphify.d.ts.map