@doccov/sdk 0.30.6 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,195 @@
1
- import { DocCovSpec, TypeReferenceLocation } from "@doccov/spec";
1
+ import { DocCovSpec, ExportAnalysis, TypeReferenceLocation } from "@doccov/spec";
2
+ /**
3
+ * Configuration types for DocCov.
4
+ * These types are shared between CLI and API.
5
+ */
6
+ /**
7
+ * Documentation configuration options.
8
+ */
9
+ interface DocsConfig {
10
+ /** Glob patterns for markdown docs to include */
11
+ include?: string[];
12
+ /** Glob patterns for markdown docs to exclude */
13
+ exclude?: string[];
14
+ }
15
+ /**
16
+ * Example validation modes.
17
+ */
18
+ type ExampleValidationMode = "presence" | "typecheck" | "run";
19
+ /**
20
+ * Documentation style presets.
21
+ *
22
+ * - 'minimal': Only description required (default)
23
+ * - 'verbose': Description, params, returns all required
24
+ * - 'types-only': No documentation required (rely on TypeScript types)
25
+ */
26
+ type StylePreset = "minimal" | "verbose" | "types-only";
27
+ /**
28
+ * Fine-grained documentation requirements.
29
+ * Use with `require` config to override preset defaults.
30
+ */
31
+ interface DocRequirements {
32
+ /** Require description/summary */
33
+ description?: boolean;
34
+ /** Require @param tags for function parameters */
35
+ params?: boolean;
36
+ /** Require @returns tag for functions */
37
+ returns?: boolean;
38
+ /** Require @example blocks */
39
+ examples?: boolean;
40
+ /** Require @since tag */
41
+ since?: boolean;
42
+ }
43
+ /**
44
+ * Schema extraction modes for validation libraries (Zod, Valibot, TypeBox, ArkType).
45
+ *
46
+ * - 'static': TypeScript Compiler API only (no runtime, always safe)
47
+ * - 'runtime': Standard Schema runtime extraction (requires built package)
48
+ * - 'hybrid': Try runtime first, fall back to static
49
+ */
50
+ type SchemaExtractionMode = "static" | "runtime" | "hybrid";
51
+ /**
52
+ * API surface configuration options.
53
+ */
54
+ interface ApiSurfaceConfig {
55
+ /** Minimum completeness percentage to pass (0-100) */
56
+ minCompleteness?: number;
57
+ /** Warning threshold - warn when below this (0-100) */
58
+ warnBelow?: number;
59
+ /** Type names to ignore (won't be flagged as forgotten exports) */
60
+ ignore?: string[];
61
+ }
62
+ /**
63
+ * Check command configuration options.
64
+ */
65
+ interface CheckConfig {
66
+ /**
67
+ * Example validation modes to run.
68
+ * Can be a single mode, array of modes, or comma-separated string.
69
+ * - 'presence': Check that @example blocks exist on exports
70
+ * - 'typecheck': Compile examples with TypeScript
71
+ * - 'run': Execute examples and validate assertions
72
+ */
73
+ examples?: ExampleValidationMode | ExampleValidationMode[] | string;
74
+ /** Minimum health score required (0-100). Unified metric combining coverage + accuracy. */
75
+ minHealth?: number;
76
+ /** @deprecated Use minHealth instead */
77
+ minCoverage?: number;
78
+ /** @deprecated Use minHealth instead */
79
+ maxDrift?: number;
80
+ /** API surface configuration */
81
+ apiSurface?: ApiSurfaceConfig;
82
+ /**
83
+ * Documentation style preset.
84
+ * - 'minimal': Only description required (default)
85
+ * - 'verbose': Description, params, returns all required
86
+ * - 'types-only': No documentation required
87
+ */
88
+ style?: StylePreset;
89
+ /**
90
+ * Fine-grained documentation requirements.
91
+ * Overrides preset defaults for specific rules.
92
+ */
93
+ require?: DocRequirements;
94
+ }
95
+ /**
96
+ * Normalized DocCov configuration.
97
+ * This is the parsed/normalized form used by commands.
98
+ */
99
+ interface DocCovConfig {
100
+ /** Export include patterns */
101
+ include?: string[];
102
+ /** Export exclude patterns */
103
+ exclude?: string[];
104
+ /** Plugins (future) */
105
+ plugins?: unknown[];
106
+ /** Documentation configuration */
107
+ docs?: DocsConfig;
108
+ /** Check command configuration */
109
+ check?: CheckConfig;
110
+ /**
111
+ * Schema extraction mode for validation libraries.
112
+ *
113
+ * - 'static' (default): Safe, uses TypeScript Compiler API
114
+ * - 'runtime': Uses Standard Schema (requires built package)
115
+ * - 'hybrid': Tries runtime first, falls back to static
116
+ *
117
+ * Runtime extraction provides richer JSON Schema output (formats, patterns)
118
+ * but requires the package to be built first.
119
+ */
120
+ schemaExtraction?: SchemaExtractionMode;
121
+ }
122
+ /**
123
+ * Define a DocCov configuration.
124
+ * Helper function for type-safe configuration in doccov.config.ts.
125
+ *
126
+ * @param config - Configuration object
127
+ * @returns The configuration object (for type inference)
128
+ *
129
+ * @example
130
+ * ```typescript
131
+ * // doccov.config.ts
132
+ * import { defineConfig } from '@doccov/sdk';
133
+ *
134
+ * defineConfig({
135
+ * include: ['MyClass', 'myFunction'],
136
+ * exclude: ['internal*'],
137
+ * check: {
138
+ * minHealth: 80,
139
+ * },
140
+ * });
141
+ * ```
142
+ */
143
+ declare function defineConfig(config: DocCovConfig): DocCovConfig;
144
+ /**
145
+ * Documentation style presets for DocCov.
146
+ *
147
+ * Presets define expected documentation patterns that vary by project.
148
+ * Some projects require verbose docs with @param/@returns for every function,
149
+ * while others rely on TypeScript types and only need descriptions.
150
+ */
151
+ /**
152
+ * Documentation requirements - what must be present for an to be considered documented.
153
+ */
154
+ interface DocRequirements2 {
155
+ /** Require description/summary */
156
+ description: boolean;
157
+ /** Require @param tags for function parameters */
158
+ params: boolean;
159
+ /** Require @returns tag for functions */
160
+ returns: boolean;
161
+ /** Require @example blocks */
162
+ examples: boolean;
163
+ /** Require @since tag */
164
+ since: boolean;
165
+ }
166
+ /**
167
+ * Style preset names.
168
+ */
169
+ type StylePreset2 = "minimal" | "verbose" | "types-only";
170
+ /**
171
+ * Default requirements (when no preset/custom config provided).
172
+ * Same as 'minimal' - just description required.
173
+ */
174
+ declare const DEFAULT_REQUIREMENTS: DocRequirements2;
175
+ /**
176
+ * Preset definitions.
177
+ *
178
+ * | Preset | description | params | returns | examples |
179
+ * |------------|-------------|----------|----------|----------|
180
+ * | minimal | required | optional | optional | optional |
181
+ * | verbose | required | required | required | optional |
182
+ * | types-only | optional | optional | optional | optional |
183
+ */
184
+ declare const PRESETS: Record<StylePreset2, DocRequirements2>;
185
+ /**
186
+ * Resolve documentation requirements from config.
187
+ *
188
+ * @param style - Style preset name
189
+ * @param require - Custom requirements (overrides preset)
190
+ * @returns Resolved requirements
191
+ */
192
+ declare function resolveRequirements(style?: StylePreset2, require?: Partial<DocRequirements2>): DocRequirements2;
2
193
  import { OpenPkg } from "@openpkg-ts/spec";
3
194
  type OpenPkgSpec = OpenPkg;
4
195
  /** Forgotten from extract package (different shape than spec type) */
@@ -22,6 +213,23 @@ interface BuildDocCovOptions {
22
213
  forgottenExports?: ExtractForgottenExport[];
23
214
  /** Type names to ignore in API surface calculation */
24
215
  apiSurfaceIgnore?: string[];
216
+ /**
217
+ * Export names from the package entry point.
218
+ * When analyzing a sub-file, provide this to filter out false positive
219
+ * "forgotten" exports that are actually exported from the main entry.
220
+ */
221
+ entryExportNames?: string[];
222
+ /** Progress callback for long-running analysis */
223
+ onProgress?: (current: number, total: number, item: string) => void;
224
+ /**
225
+ * Callback invoked after each is analyzed.
226
+ * Can be used for incremental persistence (crash recovery).
227
+ */
228
+ onExportAnalyzed?: (id: string, name: string, analysis: ExportAnalysis, index: number, total: number) => void | Promise<void>;
229
+ /** Documentation style preset */
230
+ style?: StylePreset;
231
+ /** Custom documentation requirements (overrides preset) */
232
+ require?: Partial<DocRequirements2>;
25
233
  }
26
234
  /**
27
235
  * Build a DocCov spec from an OpenPkg spec.
@@ -29,7 +237,7 @@ interface BuildDocCovOptions {
29
237
  * @param options - Build options
30
238
  * @returns DocCov specification with coverage analysis
31
239
  */
32
- declare function buildDocCovSpec(options: BuildDocCovOptions): DocCovSpec;
240
+ declare function buildDocCovSpec(options: BuildDocCovOptions): Promise<DocCovSpec>;
33
241
  /**
34
242
  * All possible drift type identifiers.
35
243
  */
@@ -38,6 +246,11 @@ type SpecDocDrift = {
38
246
  type: DriftType;
39
247
  target?: string;
40
248
  issue: string;
249
+ /** Expected value from JSDoc/documentation */
250
+ expected?: string;
251
+ /** Actual value from TypeScript signature/code */
252
+ actual?: string;
253
+ /** Actionable suggestion for fixing the drift */
41
254
  suggestion?: string;
42
255
  };
43
256
  /**
@@ -87,6 +300,11 @@ interface ExportRegistry {
87
300
  types: Set<string>;
88
301
  /** Combined set of all names (for backward compatibility) */
89
302
  all: Set<string>;
303
+ /** Pre-computed candidate lists for fuzzy matching (performance optimization) */
304
+ callableNames: string[];
305
+ typeNames: string[];
306
+ allExportNames: string[];
307
+ allNames: string[];
90
308
  }
91
309
  /**
92
310
  * Extended drift with category and fixability metadata.
@@ -166,6 +384,93 @@ declare function getDriftSummary(drifts: SpecDocDrift[]): DriftSummary;
166
384
  */
167
385
  declare function formatDriftSummaryLine(summary: DriftSummary): string;
168
386
  import { SpecExport } from "@openpkg-ts/spec";
387
+ import { OpenPkg as OpenPkg2 } from "@openpkg-ts/spec";
388
+ /**
389
+ * Information about a module in the graph.
390
+ */
391
+ interface ModuleInfo {
392
+ /**
393
+ * Module name (package name).
394
+ */
395
+ name: string;
396
+ /**
397
+ * Set of exported symbol names from this module.
398
+ */
399
+ exports: Set<string>;
400
+ /**
401
+ * Set of type names exported from this module.
402
+ */
403
+ types: Set<string>;
404
+ }
405
+ /**
406
+ * Graph of modules and their exported symbols for cross-module validation.
407
+ */
408
+ interface ModuleGraph {
409
+ /**
410
+ * Map of module names to their info.
411
+ */
412
+ modules: Map<string, ModuleInfo>;
413
+ /**
414
+ * Map of symbol names to the module that exports them.
415
+ * For symbols exported from multiple modules, contains the first found.
416
+ */
417
+ exports: Map<string, string>;
418
+ /**
419
+ * Map of type names to the module that exports them.
420
+ */
421
+ types: Map<string, string>;
422
+ /**
423
+ * Combined set of all exported symbol and type names across all modules.
424
+ */
425
+ all: Set<string>;
426
+ }
427
+ /**
428
+ * Build a module graph from multiple OpenPkg specs.
429
+ *
430
+ * Used for cross-module @link validation in batch mode.
431
+ *
432
+ * @param specs - Array of OpenPkg specs to build graph from
433
+ * @returns ModuleGraph for cross-module symbol lookup
434
+ *
435
+ * @example
436
+ * ```ts
437
+ * import { buildModuleGraph } from '@doccov/sdk';
438
+ *
439
+ * const graph = buildModuleGraph([pkg1Spec, pkg2Spec]);
440
+ *
441
+ * // Check if symbol exists in any module
442
+ * if (graph.all.has('Schedule')) {
443
+ * console.log(`Schedule is exported from: ${graph.exports.get('Schedule')}`);
444
+ * }
445
+ * ```
446
+ */
447
+ declare function buildModuleGraph(specs: OpenPkg2[]): ModuleGraph;
448
+ /**
449
+ * Check if a symbol exists in the module graph.
450
+ *
451
+ * @param graph - Module graph to search
452
+ * @param symbol - Symbol name to find
453
+ * @returns Module name if found, undefined otherwise
454
+ */
455
+ declare function findSymbolModule(graph: ModuleGraph, symbol: string): string | undefined;
456
+ /**
457
+ * Check if a symbol exists anywhere in the module graph.
458
+ *
459
+ * @param graph - Module graph to search
460
+ * @param symbol - Symbol name to check
461
+ * @returns true if symbol exists in any module
462
+ */
463
+ declare function symbolExistsInGraph(graph: ModuleGraph, symbol: string): boolean;
464
+ /**
465
+ * Options for computing drift.
466
+ */
467
+ interface ComputeDriftOptions {
468
+ /**
469
+ * Module graph for cross-module @link validation.
470
+ * When provided, @link targets are validated across all modules.
471
+ */
472
+ moduleGraph?: ModuleGraph;
473
+ }
169
474
  /**
170
475
  * Build a registry of all export/type names for cross-reference validation.
171
476
  */
@@ -174,16 +479,18 @@ declare function buildExportRegistry(spec: OpenPkgSpec): ExportRegistry;
174
479
  * Compute drift for all exports in a spec.
175
480
  *
176
481
  * @param spec - The OpenPkg spec to analyze
482
+ * @param options - Optional config including moduleGraph for cross-module validation
177
483
  * @returns Drift results per */
178
- declare function computeDrift(spec: OpenPkgSpec): DriftResult;
484
+ declare function computeDrift(spec: OpenPkgSpec, options?: ComputeDriftOptions): DriftResult;
179
485
  /**
180
486
  * Compute drift for a single export.
181
487
  *
182
488
  * @param entry - The to analyze
183
489
  * @param registry - Registry of known exports and types for validation
490
+ * @param options - Optional config including moduleGraph for cross-module validation
184
491
  * @returns Array of drift issues detected
185
492
  */
186
- declare function computeExportDrift(entry: SpecExport, registry?: ExportRegistry): SpecDocDrift[];
493
+ declare function computeExportDrift(entry: SpecExport, registry?: ExportRegistry, options?: ComputeDriftOptions): SpecDocDrift[];
187
494
  /**
188
495
  * Calculate aggregate coverage score from a spec's exports.
189
496
  *
@@ -302,6 +609,15 @@ declare function hasNonAssertionComments(code: string): boolean;
302
609
  */
303
610
  declare function detectExampleAssertionFailures(entry: SpecExport2, runtimeResults: Map<number, ExampleRunResult>): SpecDocDrift[];
304
611
  import { DocumentationHealth, DriftCategory as DriftCategory2, MissingDocRule } from "@doccov/spec";
612
+ import { SpecExport as SpecExport7 } from "@openpkg-ts/spec";
613
+ /**
614
+ * Check if an has meaningful documentation.
615
+ * An is considered documented if it has:
616
+ * - A description
617
+ * - Meaningful JSDoc tags
618
+ * - For namespaces: description counts as documented (no examples required)
619
+ */
620
+ declare function isExportDocumented(exp: SpecExport7): boolean;
305
621
  /**
306
622
  * Input data for computing documentation health score.
307
623
  */
@@ -337,8 +653,8 @@ interface HealthInput {
337
653
  * Score thresholds: green 80+, yellow 60-79, red <60
338
654
  */
339
655
  declare function computeHealth(input: HealthInput): DocumentationHealth;
340
- import { DocCovDrift, DocCovSpec as DocCovSpec2, ExportAnalysis, MissingDocRule as MissingDocRule2 } from "@doccov/spec";
341
- import { SpecExport as SpecExport7 } from "@openpkg-ts/spec";
656
+ import { DocCovDrift, DocCovSpec as DocCovSpec2, ExportAnalysis as ExportAnalysis2, MissingDocRule as MissingDocRule2 } from "@doccov/spec";
657
+ import { SpecExport as SpecExport8 } from "@openpkg-ts/spec";
342
658
  /**
343
659
  * Get the full analysis data for an export.
344
660
  *
@@ -346,7 +662,7 @@ import { SpecExport as SpecExport7 } from "@openpkg-ts/spec";
346
662
  * @param doccov - The DocCov spec containing analysis data
347
663
  * @returns Export analysis or undefined if not found
348
664
  */
349
- declare function getExportAnalysis(exp: SpecExport7, doccov: DocCovSpec2): ExportAnalysis | undefined;
665
+ declare function getExportAnalysis(exp: SpecExport8, doccov: DocCovSpec2): ExportAnalysis2 | undefined;
350
666
  /**
351
667
  * Get the coverage score for an export.
352
668
  *
@@ -354,7 +670,7 @@ declare function getExportAnalysis(exp: SpecExport7, doccov: DocCovSpec2): Expor
354
670
  * @param doccov - The DocCov spec containing analysis data
355
671
  * @returns Coverage score (0-100) or 100 if not found
356
672
  */
357
- declare function getExportScore(exp: SpecExport7, doccov: DocCovSpec2): number;
673
+ declare function getExportScore(exp: SpecExport8, doccov: DocCovSpec2): number;
358
674
  /**
359
675
  * Get drift issues for an export.
360
676
  *
@@ -362,7 +678,7 @@ declare function getExportScore(exp: SpecExport7, doccov: DocCovSpec2): number;
362
678
  * @param doccov - The DocCov spec containing analysis data
363
679
  * @returns Array of drift issues or empty array if none
364
680
  */
365
- declare function getExportDrift(exp: SpecExport7, doccov: DocCovSpec2): DocCovDrift[];
681
+ declare function getExportDrift(exp: SpecExport8, doccov: DocCovSpec2): DocCovDrift[];
366
682
  /**
367
683
  * Get missing documentation rules for an export.
368
684
  *
@@ -370,7 +686,7 @@ declare function getExportDrift(exp: SpecExport7, doccov: DocCovSpec2): DocCovDr
370
686
  * @param doccov - The DocCov spec containing analysis data
371
687
  * @returns Array of missing rule IDs or empty array if none
372
688
  */
373
- declare function getExportMissing(exp: SpecExport7, doccov: DocCovSpec2): MissingDocRule2[];
689
+ declare function getExportMissing(exp: SpecExport8, doccov: DocCovSpec2): MissingDocRule2[];
374
690
  /**
375
691
  * Check if an has complete documentation.
376
692
  *
@@ -378,9 +694,9 @@ declare function getExportMissing(exp: SpecExport7, doccov: DocCovSpec2): Missin
378
694
  * @param doccov - The DocCov spec containing analysis data
379
695
  * @returns True if has 100% coverage and no drift
380
696
  */
381
- declare function isExportFullyDocumented(exp: SpecExport7, doccov: DocCovSpec2): boolean;
697
+ declare function isExportFullyDocumented(exp: SpecExport8, doccov: DocCovSpec2): boolean;
382
698
  import { DocCovSpec as DocCovSpec3 } from "@doccov/spec";
383
- import { OpenPkg as OpenPkg2 } from "@openpkg-ts/spec";
699
+ import { OpenPkg as OpenPkg3 } from "@openpkg-ts/spec";
384
700
  import { ApiSurfaceResult, DocumentationHealth as DocumentationHealth2 } from "@doccov/spec";
385
701
  /**
386
702
  * DocCov report schema version.
@@ -522,6 +838,10 @@ interface ExportCoverageData {
522
838
  * Drift issues for this export.
523
839
  */
524
840
  drift?: SpecDocDrift[];
841
+ /**
842
+ * Number of overloads if > 1 (for overloaded functions).
843
+ */
844
+ overloadCount?: number;
525
845
  }
526
846
  /**
527
847
  * DocCov report - a persistable coverage analysis result.
@@ -584,7 +904,7 @@ interface DocCovReport {
584
904
  * console.log(`Coverage: ${report.coverage.score}%`);
585
905
  * ```
586
906
  */
587
- declare function generateReport(spec: OpenPkg2, openpkgPath?: string): DocCovReport;
907
+ declare function generateReport(spec: OpenPkg3, openpkgPath?: string): Promise<DocCovReport>;
588
908
  /**
589
909
  * Generate a DocCov report from OpenPkg spec + DocCov spec composition.
590
910
  *
@@ -595,7 +915,7 @@ declare function generateReport(spec: OpenPkg2, openpkgPath?: string): DocCovRep
595
915
  * @param doccov - The DocCov spec with analysis data
596
916
  * @returns A DocCov report with coverage analysis
597
917
  */
598
- declare function generateReportFromDocCov(openpkg: OpenPkg2, doccov: DocCovSpec3): DocCovReport;
918
+ declare function generateReportFromDocCov(openpkg: OpenPkg3, doccov: DocCovSpec3): DocCovReport;
599
919
  /**
600
920
  * Load a cached DocCov report from disk.
601
921
  *
@@ -630,7 +950,247 @@ declare function saveReport(report: DocCovReport, reportPath?: string): void;
630
950
  * fs.writeFileSync('api-surface.md', apiSurface);
631
951
  * ```
632
952
  */
633
- declare function renderApiSurface(spec: OpenPkg2): string;
953
+ declare function renderApiSurface(spec: OpenPkg3): string;
954
+ import { DocCovSpec as DocCovSpec4 } from "@doccov/spec";
955
+ import { OpenPkg as OpenPkg4 } from "@openpkg-ts/spec";
956
+ /**
957
+ * Result from analyzing a single package in batch mode.
958
+ */
959
+ interface PackageResult {
960
+ /**
961
+ * Package name (from openpkg.meta.name).
962
+ */
963
+ name: string;
964
+ /**
965
+ * Package version (from openpkg.meta.version).
966
+ */
967
+ version?: string;
968
+ /**
969
+ * Entry point path that was analyzed.
970
+ */
971
+ entryPath: string;
972
+ /**
973
+ * Total number of exports.
974
+ */
975
+ totalExports: number;
976
+ /**
977
+ * Number of documented exports.
978
+ */
979
+ documented: number;
980
+ /**
981
+ * Health score (0-100).
982
+ */
983
+ health: number;
984
+ /**
985
+ * Number of drift issues.
986
+ */
987
+ driftCount: number;
988
+ /**
989
+ * Coverage score (0-100).
990
+ */
991
+ coverageScore: number;
992
+ /**
993
+ * The full OpenPkg spec (for detailed reporting).
994
+ */
995
+ openpkg: OpenPkg4;
996
+ /**
997
+ * The full DocCov spec (for detailed reporting).
998
+ */
999
+ doccov: DocCovSpec4;
1000
+ }
1001
+ /**
1002
+ * Aggregated result from batch analysis.
1003
+ */
1004
+ interface BatchResult {
1005
+ /**
1006
+ * Individual package results.
1007
+ */
1008
+ packages: PackageResult[];
1009
+ /**
1010
+ * Aggregated metrics across all packages.
1011
+ */
1012
+ aggregate: {
1013
+ /**
1014
+ * Total exports across all packages.
1015
+ */
1016
+ totalExports: number;
1017
+ /**
1018
+ * Total documented exports across all packages.
1019
+ */
1020
+ documented: number;
1021
+ /**
1022
+ * Weighted average health score.
1023
+ */
1024
+ health: number;
1025
+ /**
1026
+ * Total drift issues across all packages.
1027
+ */
1028
+ driftCount: number;
1029
+ /**
1030
+ * Weighted average coverage score.
1031
+ */
1032
+ coverageScore: number;
1033
+ };
1034
+ }
1035
+ /**
1036
+ * Create a PackageResult from analyzed specs.
1037
+ *
1038
+ * @param openpkg - The OpenPkg spec
1039
+ * @param doccov - The DocCov spec with coverage analysis
1040
+ * @param entryPath - Path to the entry point that was analyzed
1041
+ * @returns PackageResult for batch aggregation
1042
+ */
1043
+ declare function createPackageResult(openpkg: OpenPkg4, doccov: DocCovSpec4, entryPath: string): PackageResult;
1044
+ /**
1045
+ * Aggregate results from multiple package analyses.
1046
+ *
1047
+ * Health and coverage scores are weighted by count so packages
1048
+ * with more exports have more influence on the aggregate.
1049
+ *
1050
+ * @param packages - Individual package results to aggregate
1051
+ * @returns BatchResult with aggregate metrics
1052
+ *
1053
+ * @example
1054
+ * ```ts
1055
+ * import { aggregateResults, createPackageResult } from '@doccov/sdk';
1056
+ *
1057
+ * const results = [
1058
+ * createPackageResult(pkg1Openpkg, pkg1Doccov, 'packages/a/src/index.ts'),
1059
+ * createPackageResult(pkg2Openpkg, pkg2Doccov, 'packages/b/src/index.ts'),
1060
+ * ];
1061
+ *
1062
+ * const batch = aggregateResults(results);
1063
+ * console.log(`Total health: ${batch.aggregate.health}%`);
1064
+ * ```
1065
+ */
1066
+ declare function aggregateResults(packages: PackageResult[]): BatchResult;
1067
+ import { DocCovDrift as DocCovDrift2, ExportAnalysis as ExportAnalysis3, MissingDocRule as MissingDocRule3 } from "@doccov/spec";
1068
+ /**
1069
+ * Result from analyzing a single incrementally.
1070
+ */
1071
+ interface IncrementalExportResult {
1072
+ /** Export ID (usually name) */
1073
+ id: string;
1074
+ /** Export name */
1075
+ name: string;
1076
+ /** Coverage score (0-100) */
1077
+ coverageScore: number;
1078
+ /** Missing documentation rules */
1079
+ missing?: MissingDocRule3[];
1080
+ /** Drift issues detected */
1081
+ drift?: DocCovDrift2[];
1082
+ /** Number of overloads (if > 1) */
1083
+ overloadCount?: number;
1084
+ /** Timestamp when this result was written */
1085
+ timestamp: number;
1086
+ }
1087
+ /**
1088
+ * Partial analysis state recovered from temp file.
1089
+ */
1090
+ interface PartialAnalysisState {
1091
+ /** Results collected before interruption */
1092
+ results: IncrementalExportResult[];
1093
+ /** Total exports that were expected */
1094
+ totalExpected?: number;
1095
+ /** Whether analysis was interrupted */
1096
+ interrupted: boolean;
1097
+ }
1098
+ /**
1099
+ * Options for IncrementalAnalyzer.
1100
+ */
1101
+ interface IncrementalAnalyzerOptions {
1102
+ /** Custom temp directory (defaults to os.tmpdir()) */
1103
+ tempDir?: string;
1104
+ /** Prefix for temp file name */
1105
+ prefix?: string;
1106
+ }
1107
+ /**
1108
+ * Analyzer that persists results incrementally for crash recovery.
1109
+ *
1110
+ * Usage:
1111
+ * ```ts
1112
+ * const analyzer = new IncrementalAnalyzer();
1113
+ * analyzer.setTotal(exports.length);
1114
+ *
1115
+ * for (const exp of exports) {
1116
+ * const result = analyzeExport(exp);
1117
+ * await analyzer.writeResult(result);
1118
+ * }
1119
+ *
1120
+ * // On success, clean up
1121
+ * analyzer.cleanup();
1122
+ *
1123
+ * // On crash, recover partial results:
1124
+ * const partial = await analyzer.getPartialResults();
1125
+ * ```
1126
+ */
1127
+ declare class IncrementalAnalyzer {
1128
+ private tempPath;
1129
+ private totalExpected?;
1130
+ private resultCount;
1131
+ private fileHandle?;
1132
+ constructor(options?: IncrementalAnalyzerOptions);
1133
+ /**
1134
+ * Get the temp file path (for debugging/logging).
1135
+ */
1136
+ get path(): string;
1137
+ /**
1138
+ * Get count of results written so far.
1139
+ */
1140
+ get count(): number;
1141
+ /**
1142
+ * Set total expected exports (for progress reporting).
1143
+ */
1144
+ setTotal(total: number): void;
1145
+ /**
1146
+ * Initialize the file handle for writing.
1147
+ * Called automatically on first writeResult, but can be called
1148
+ * explicitly for eager initialization.
1149
+ */
1150
+ init(): Promise<void>;
1151
+ /**
1152
+ * Write a single result to the temp file.
1153
+ */
1154
+ writeResult(result: IncrementalExportResult): Promise<void>;
1155
+ /**
1156
+ * Write an analysis result (converts from ExportAnalysis format).
1157
+ */
1158
+ writeExportAnalysis(id: string, name: string, analysis: ExportAnalysis3): Promise<void>;
1159
+ /**
1160
+ * Read partial results from the temp file.
1161
+ * Returns empty array if file doesn't exist.
1162
+ */
1163
+ getPartialResults(): Promise<PartialAnalysisState>;
1164
+ /**
1165
+ * Clean up the temp file. Call this on successful completion.
1166
+ */
1167
+ cleanup(): Promise<void>;
1168
+ /**
1169
+ * Synchronous cleanup for use in signal handlers.
1170
+ * Note: May lose last few writes that haven't been flushed.
1171
+ */
1172
+ cleanupSync(): void;
1173
+ /**
1174
+ * Check if temp file exists (for recovery detection).
1175
+ */
1176
+ exists(): boolean;
1177
+ /**
1178
+ * Get partial results synchronously (for signal handlers).
1179
+ * May miss most recent writes.
1180
+ */
1181
+ getPartialResultsSync(): PartialAnalysisState;
1182
+ }
1183
+ /**
1184
+ * Find any orphaned temp files from previous crashed runs.
1185
+ * Returns paths to .ndjson files that match the doccov pattern.
1186
+ */
1187
+ declare function findOrphanedTempFiles(tempDir?: string, prefix?: string): string[];
1188
+ /**
1189
+ * Clean up orphaned temp files older than maxAge.
1190
+ *
1191
+ * @param maxAge - Maximum age in milliseconds (default: 1 hour)
1192
+ */
1193
+ declare function cleanupOrphanedTempFiles(tempDir?: string, prefix?: string, maxAge?: number): number;
634
1194
  /**
635
1195
  * Compute a hash of file contents.
636
1196
  * Uses truncated SHA-256 for balance of speed and collision resistance.
@@ -662,7 +1222,7 @@ declare function hashFiles(filePaths: string[], cwd: string): Record<string, str
662
1222
  * @returns Array of file paths that changed, were added, or were removed
663
1223
  */
664
1224
  declare function diffHashes(cached: Record<string, string>, current: Record<string, string>): string[];
665
- import { OpenPkg as OpenPkg3 } from "@openpkg-ts/spec";
1225
+ import { OpenPkg as OpenPkg5 } from "@openpkg-ts/spec";
666
1226
  /** Current cache format version - bump when spec extraction logic changes */
667
1227
  declare const CACHE_VERSION = "1.3.0";
668
1228
  /** Default cache file path */
@@ -726,7 +1286,7 @@ interface SpecCache {
726
1286
  /** Analysis configuration that affects output */
727
1287
  config: SpecCacheConfig;
728
1288
  /** The cached OpenPkg spec */
729
- spec: OpenPkg3;
1289
+ spec: OpenPkg5;
730
1290
  /** Cached spec-level diagnostics (info/warning messages from extraction) */
731
1291
  specDiagnostics?: CachedDiagnostic[];
732
1292
  /** Cached forgotten exports */
@@ -781,7 +1341,7 @@ declare function loadSpecCache(cwd: string): SpecCache | null;
781
1341
  * @param spec - OpenPkg spec to cache
782
1342
  * @param context - Cache context with file paths and config
783
1343
  */
784
- declare function saveSpecCache(spec: OpenPkg3, context: CacheContext): void;
1344
+ declare function saveSpecCache(spec: OpenPkg5, context: CacheContext): void;
785
1345
  /**
786
1346
  * Validate if cached spec is still valid.
787
1347
  *
@@ -830,112 +1390,6 @@ interface FilterOptions {
830
1390
  visibility?: ReleaseTag[];
831
1391
  }
832
1392
  import { z } from "zod";
833
- /**
834
- * Configuration types for DocCov.
835
- * These types are shared between CLI and API.
836
- */
837
- /**
838
- * Documentation configuration options.
839
- */
840
- interface DocsConfig {
841
- /** Glob patterns for markdown docs to include */
842
- include?: string[];
843
- /** Glob patterns for markdown docs to exclude */
844
- exclude?: string[];
845
- }
846
- /**
847
- * Example validation modes.
848
- */
849
- type ExampleValidationMode = "presence" | "typecheck" | "run";
850
- /**
851
- * Schema extraction modes for validation libraries (Zod, Valibot, TypeBox, ArkType).
852
- *
853
- * - 'static': TypeScript Compiler API only (no runtime, always safe)
854
- * - 'runtime': Standard Schema runtime extraction (requires built package)
855
- * - 'hybrid': Try runtime first, fall back to static
856
- */
857
- type SchemaExtractionMode = "static" | "runtime" | "hybrid";
858
- /**
859
- * API surface configuration options.
860
- */
861
- interface ApiSurfaceConfig {
862
- /** Minimum completeness percentage to pass (0-100) */
863
- minCompleteness?: number;
864
- /** Warning threshold - warn when below this (0-100) */
865
- warnBelow?: number;
866
- /** Type names to ignore (won't be flagged as forgotten exports) */
867
- ignore?: string[];
868
- }
869
- /**
870
- * Check command configuration options.
871
- */
872
- interface CheckConfig {
873
- /**
874
- * Example validation modes to run.
875
- * Can be a single mode, array of modes, or comma-separated string.
876
- * - 'presence': Check that @example blocks exist on exports
877
- * - 'typecheck': Compile examples with TypeScript
878
- * - 'run': Execute examples and validate assertions
879
- */
880
- examples?: ExampleValidationMode | ExampleValidationMode[] | string;
881
- /** Minimum health score required (0-100). Unified metric combining coverage + accuracy. */
882
- minHealth?: number;
883
- /** @deprecated Use minHealth instead */
884
- minCoverage?: number;
885
- /** @deprecated Use minHealth instead */
886
- maxDrift?: number;
887
- /** API surface configuration */
888
- apiSurface?: ApiSurfaceConfig;
889
- }
890
- /**
891
- * Normalized DocCov configuration.
892
- * This is the parsed/normalized form used by commands.
893
- */
894
- interface DocCovConfig {
895
- /** Export include patterns */
896
- include?: string[];
897
- /** Export exclude patterns */
898
- exclude?: string[];
899
- /** Plugins (future) */
900
- plugins?: unknown[];
901
- /** Documentation configuration */
902
- docs?: DocsConfig;
903
- /** Check command configuration */
904
- check?: CheckConfig;
905
- /**
906
- * Schema extraction mode for validation libraries.
907
- *
908
- * - 'static' (default): Safe, uses TypeScript Compiler API
909
- * - 'runtime': Uses Standard Schema (requires built package)
910
- * - 'hybrid': Tries runtime first, falls back to static
911
- *
912
- * Runtime extraction provides richer JSON Schema output (formats, patterns)
913
- * but requires the package to be built first.
914
- */
915
- schemaExtraction?: SchemaExtractionMode;
916
- }
917
- /**
918
- * Define a DocCov configuration.
919
- * Helper function for type-safe configuration in doccov.config.ts.
920
- *
921
- * @param config - Configuration object
922
- * @returns The configuration object (for type inference)
923
- *
924
- * @example
925
- * ```typescript
926
- * // doccov.config.ts
927
- * import { defineConfig } from '@doccov/sdk';
928
- *
929
- * defineConfig({
930
- * include: ['MyClass', 'myFunction'],
931
- * exclude: ['internal*'],
932
- * check: {
933
- * minHealth: 80,
934
- * },
935
- * });
936
- * ```
937
- */
938
- declare function defineConfig(config: DocCovConfig): DocCovConfig;
939
1393
  declare const stringList: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
940
1394
  /**
941
1395
  * Docs configuration schema
@@ -956,6 +1410,16 @@ declare const apiSurfaceConfigSchema: z.ZodObject<{
956
1410
  warnBelow: z.ZodOptional<z.ZodNumber>;
957
1411
  ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
958
1412
  }>;
1413
+ /** Documentation style preset */
1414
+ declare const stylePresetSchema: z.ZodEnum<["minimal", "verbose", "types-only"]>;
1415
+ /** Fine-grained documentation requirements */
1416
+ declare const docRequirementsSchema: z.ZodObject<{
1417
+ description: z.ZodOptional<z.ZodBoolean>;
1418
+ params: z.ZodOptional<z.ZodBoolean>;
1419
+ returns: z.ZodOptional<z.ZodBoolean>;
1420
+ examples: z.ZodOptional<z.ZodBoolean>;
1421
+ since: z.ZodOptional<z.ZodBoolean>;
1422
+ }>;
959
1423
  /**
960
1424
  * Check command configuration schema.
961
1425
  */
@@ -965,6 +1429,8 @@ declare const checkConfigSchema: z.ZodObject<{
965
1429
  minCoverage: z.ZodOptional<z.ZodNumber>;
966
1430
  maxDrift: z.ZodOptional<z.ZodNumber>;
967
1431
  apiSurface: z.ZodOptional<typeof apiSurfaceConfigSchema>;
1432
+ style: z.ZodOptional<typeof stylePresetSchema>;
1433
+ require: z.ZodOptional<typeof docRequirementsSchema>;
968
1434
  }>;
969
1435
  declare const docCovConfigSchema: z.ZodObject<{
970
1436
  include: z.ZodOptional<typeof stringList>;
@@ -1207,6 +1673,26 @@ declare function getPrimaryBuildScript(buildInfo: BuildInfo): string | null;
1207
1673
  * @throws Error if no entry point can be found
1208
1674
  */
1209
1675
  declare function detectEntryPoint(fs: FileSystem, packagePath?: string): Promise<EntryPointInfo>;
1676
+ /**
1677
+ * Find the package entry point for a given source file.
1678
+ * Walks up directories to find package.json and detects entry point.
1679
+ *
1680
+ * @param fs - FileSystem implementation
1681
+ * @param filePath - Absolute or relative path to the source file
1682
+ * @returns Entry point info and package path, or null if not found
1683
+ */
1684
+ declare function findEntryPointForFile(fs: FileSystem, filePath: string): Promise<{
1685
+ entryPoint: EntryPointInfo;
1686
+ packagePath: string;
1687
+ } | null>;
1688
+ /**
1689
+ * Check if a file is the package entry point.
1690
+ *
1691
+ * @param fs - FileSystem implementation
1692
+ * @param filePath - Path to check
1693
+ * @returns True if the file is the package entry point
1694
+ */
1695
+ declare function isPackageEntryPoint(fs: FileSystem, filePath: string): Promise<boolean>;
1210
1696
  import { Sandbox } from "@vercel/sandbox";
1211
1697
  /**
1212
1698
  * Node.js filesystem implementation for CLI usage.
@@ -1424,7 +1910,7 @@ declare function parseExamplesFlag(value: boolean | string | undefined): Example
1424
1910
  * Check if a specific validation is enabled.
1425
1911
  */
1426
1912
  declare function shouldValidate(validations: ExampleValidation[], check: ExampleValidation): boolean;
1427
- import { SpecExport as SpecExport8 } from "@openpkg-ts/spec";
1913
+ import { SpecExport as SpecExport9 } from "@openpkg-ts/spec";
1428
1914
  interface ExampleTypeError {
1429
1915
  /** Index of the example in the examples array */
1430
1916
  exampleIndex: number;
@@ -1547,8 +2033,8 @@ interface ExampleValidationResult {
1547
2033
  * - `typecheck`: type-checks examples (doesn't require presence or run)
1548
2034
  * - `run`: executes examples (doesn't require presence or typecheck)
1549
2035
  */
1550
- declare function validateExamples(exports: SpecExport8[], options: ExampleValidationOptions): Promise<ExampleValidationResult>;
1551
- import { SpecExport as SpecExport9 } from "@openpkg-ts/spec";
2036
+ declare function validateExamples(exports: SpecExport9[], options: ExampleValidationOptions): Promise<ExampleValidationResult>;
2037
+ import { SpecExport as SpecExport10 } from "@openpkg-ts/spec";
1552
2038
  import * as TS from "typescript";
1553
2039
  /**
1554
2040
  * Represents a single parameter in a JSDoc patch
@@ -1675,7 +2161,7 @@ declare function isFixableDrift(drift: SpecDocDrift): boolean;
1675
2161
  /**
1676
2162
  * Generate a fix for a single drift issue
1677
2163
  */
1678
- declare function generateFix(drift: SpecDocDrift, exportEntry: SpecExport9, existingPatch?: JSDocPatch): FixSuggestion | null;
2164
+ declare function generateFix(drift: SpecDocDrift, exportEntry: SpecExport10, existingPatch?: JSDocPatch): FixSuggestion | null;
1679
2165
  /**
1680
2166
  * Generate all fixes for an export's drift issues.
1681
2167
  *
@@ -1683,7 +2169,7 @@ declare function generateFix(drift: SpecDocDrift, exportEntry: SpecExport9, exis
1683
2169
  * @param existingPatch - Optional existing JSDoc patch to merge with
1684
2170
  * @param driftList - Optional drift list from DocCovSpec (if not provided, reads from exportEntry.docs?.drift for backward compat)
1685
2171
  */
1686
- declare function generateFixesForExport(exportEntry: SpecExport9, existingPatch?: JSDocPatch, driftList?: SpecDocDrift[]): FixSuggestion[];
2172
+ declare function generateFixesForExport(exportEntry: SpecExport10, existingPatch?: JSDocPatch, driftList?: SpecDocDrift[]): FixSuggestion[];
1687
2173
  /**
1688
2174
  * Merge multiple fix patches into a single patch
1689
2175
  */
@@ -1913,7 +2399,7 @@ declare function extractImports(code: string): Array<{
1913
2399
  * @deprecated Use extractCallsAST for more detailed info.
1914
2400
  */
1915
2401
  declare function extractFunctionCalls(code: string): string[];
1916
- import { CategorizedBreaking, OpenPkg as OpenPkg5, SpecDiff as SpecDiff2 } from "@openpkg-ts/spec";
2402
+ import { CategorizedBreaking, OpenPkg as OpenPkg7, SpecDiff as SpecDiff2 } from "@openpkg-ts/spec";
1917
2403
  /**
1918
2404
  * Extended spec diff result with docs impact
1919
2405
  */
@@ -1975,7 +2461,7 @@ interface DiffWithDocsOptions {
1975
2461
  * }
1976
2462
  * ```
1977
2463
  */
1978
- declare function diffSpecWithDocs(oldSpec: OpenPkg5, newSpec: OpenPkg5, options?: DiffWithDocsOptions): SpecDiffWithDocs;
2464
+ declare function diffSpecWithDocs(oldSpec: OpenPkg7, newSpec: OpenPkg7, options?: DiffWithDocsOptions): SpecDiffWithDocs;
1979
2465
  /**
1980
2466
  * Check if a diff has any docs impact
1981
2467
  */
@@ -2033,7 +2519,7 @@ interface DetectedSchemaEntry {
2033
2519
  schema: Record<string, unknown>;
2034
2520
  vendor: string;
2035
2521
  }
2036
- import { OpenPkg as OpenPkg6 } from "@openpkg-ts/spec";
2522
+ import { OpenPkg as OpenPkg8 } from "@openpkg-ts/spec";
2037
2523
  /** Directory for storing history snapshots (relative to .doccov) */
2038
2524
  declare const HISTORY_DIR = ".doccov/history";
2039
2525
  /**
@@ -2120,7 +2606,7 @@ interface ExtendedTrendAnalysis {
2120
2606
  /**
2121
2607
  * Compute a coverage snapshot from an OpenPkg spec.
2122
2608
  */
2123
- declare function computeSnapshot(spec: OpenPkg6, options?: {
2609
+ declare function computeSnapshot(spec: OpenPkg8, options?: {
2124
2610
  commit?: string;
2125
2611
  branch?: string;
2126
2612
  }): CoverageSnapshot;
@@ -2150,7 +2636,7 @@ declare function loadSnapshots(cwd: string): CoverageSnapshot[];
2150
2636
  * @param options - Optional git metadata
2151
2637
  * @returns Trend data with history and delta
2152
2638
  */
2153
- declare function getTrend(spec: OpenPkg6, cwd: string, options?: {
2639
+ declare function getTrend(spec: OpenPkg8, cwd: string, options?: {
2154
2640
  commit?: string;
2155
2641
  branch?: string;
2156
2642
  }): CoverageTrend;
@@ -2186,7 +2672,7 @@ declare function pruneHistory(cwd: string, keepCount?: number): number;
2186
2672
  * @param options - Optional git metadata
2187
2673
  * @returns Extended trend analysis
2188
2674
  */
2189
- declare function getExtendedTrend(spec: OpenPkg6, cwd: string, options?: {
2675
+ declare function getExtendedTrend(spec: OpenPkg8, cwd: string, options?: {
2190
2676
  commit?: string;
2191
2677
  branch?: string;
2192
2678
  }): ExtendedTrendAnalysis;
@@ -2276,7 +2762,7 @@ declare function parseListFlag(value?: string | string[]): string[] | undefined;
2276
2762
  * ```
2277
2763
  */
2278
2764
  declare function mergeFilters(config: DocCovConfig | null, overrides: FilterOptions): ResolvedFilters;
2279
- import { OpenPkg as OpenPkg7 } from "@openpkg-ts/spec";
2765
+ import { OpenPkg as OpenPkg9 } from "@openpkg-ts/spec";
2280
2766
  /**
2281
2767
  * Parsed components of a GitHub URL.
2282
2768
  */
@@ -2369,7 +2855,7 @@ declare function buildRawUrl(parsed: ParsedGitHubUrl, filePath: string): string;
2369
2855
  * }
2370
2856
  * ```
2371
2857
  */
2372
- declare function fetchSpecFromGitHub(parsed: ParsedGitHubUrl): Promise<OpenPkg7 | null>;
2858
+ declare function fetchSpecFromGitHub(parsed: ParsedGitHubUrl): Promise<OpenPkg9 | null>;
2373
2859
  /**
2374
2860
  * Options for fetching a spec from GitHub.
2375
2861
  */
@@ -2389,7 +2875,7 @@ interface FetchSpecOptions {
2389
2875
  * @param branchOrOptions - Branch name (default: 'main') or options object
2390
2876
  * @returns The OpenPkg spec, or null if not found
2391
2877
  */
2392
- declare function fetchSpec(owner: string, repo: string, branchOrOptions?: string | FetchSpecOptions): Promise<OpenPkg7 | null>;
2878
+ declare function fetchSpec(owner: string, repo: string, branchOrOptions?: string | FetchSpecOptions): Promise<OpenPkg9 | null>;
2393
2879
  /**
2394
2880
  * Progress event for installation status updates.
2395
2881
  */
@@ -2576,8 +3062,8 @@ declare function fetchGitHubContext(repoUrl: string, refOrOptions?: string | Fet
2576
3062
  * List packages in a monorepo workspace.
2577
3063
  */
2578
3064
  declare function listWorkspacePackages(owner: string, repo: string, ref: string, patterns: string[], authToken?: string): Promise<string[]>;
2579
- import { DocCovSpec as DocCovSpec4 } from "@doccov/spec";
2580
- import { OpenPkg as OpenPkg8 } from "@openpkg-ts/spec";
3065
+ import { DocCovSpec as DocCovSpec5 } from "@doccov/spec";
3066
+ import { OpenPkg as OpenPkg10 } from "@openpkg-ts/spec";
2581
3067
  /**
2582
3068
  * A documentation drift issue in a spec summary.
2583
3069
  */
@@ -2631,8 +3117,8 @@ interface SpecSummary {
2631
3117
  * console.log(`Undocumented: ${summary.undocumented.length}`);
2632
3118
  * ```
2633
3119
  */
2634
- declare function extractSpecSummary(openpkg: OpenPkg8, doccov: DocCovSpec4): SpecSummary;
2635
- import { OpenPkg as OpenPkg_wzfhdbnjnm } from "@openpkg-ts/spec";
3120
+ declare function extractSpecSummary(openpkg: OpenPkg10, doccov: DocCovSpec5): SpecSummary;
3121
+ import { OpenPkg as OpenPkg_xvdmlnuyqi } from "@openpkg-ts/spec";
2636
3122
  /**
2637
3123
  * Build Plan types for AI-powered repository scanning.
2638
3124
  */
@@ -2729,7 +3215,7 @@ interface BuildPlanExecutionResult {
2729
3215
  /** Whether all required steps succeeded */
2730
3216
  success: boolean;
2731
3217
  /** Generated OpenPkg spec (if successful) */
2732
- spec?: OpenPkg_wzfhdbnjnm;
3218
+ spec?: OpenPkg_xvdmlnuyqi;
2733
3219
  /** Results for each step */
2734
3220
  stepResults: BuildPlanStepResult[];
2735
3221
  /** Total execution time in milliseconds */
@@ -2761,4 +3247,4 @@ declare function findProjectRoot(startDir: string): string;
2761
3247
  * @returns Absolute path to the .doccov directory
2762
3248
  */
2763
3249
  declare function getDoccovDir(cwd: string): string;
2764
- export { validateSpecCache, validateExamples, typecheckExamples, typecheckExample, shouldValidate, serializeJSDoc, saveSpecCache, saveSnapshot, saveReport, safeParseJson, runExamplesWithPackage, runExamples, runExample, resolveTarget, resolveCompiledPath, renderSparkline, renderApiSurface, readPackageJson, pruneHistory, previewForgottenExportFixes, parseGitHubUrl2 as parseScanGitHubUrl, parseMarkdownFiles, parseMarkdownFile, parseListFlag, parseJSDocToPatch, parseGitHubUrl, parseExamplesFlag, parseAssertions, normalizeConfig, mergeFixes, mergeFilters, loadSpecCache, loadSnapshots, loadCachedReport, listWorkspacePackages, isStandardJSONSchema, isSchemaType, isFixableDrift, isExportFullyDocumented, isExecutableLang, installDependencies, hashString, hashFiles, hashFile, hasNonAssertionComments, hasDocsImpact, hasDocsForExport, groupFixesByFile, groupDriftsByCategory, getUndocumentedExports, getTrend, getSupportedLibraries, getSpecCachePath, getRunCommand, getReportPath, getRegisteredAdapters, getPrimaryBuildScript, getInstallCommand, getExtendedTrend, getExportScore, getExportMissing, getExportDrift, getExportAnalysis, getDriftSummary, getDocumentedExports, getDocsImpactSummary, getDoccovDir, getDiffReportPath, generateReportFromDocCov, generateReport, generateForgottenExportFixes, generateFixesForExport, generateFix, formatPackageList, formatDriftSummaryLine, formatDelta, findRemovedReferences, findProjectRoot, findPackageByName, findJSDocLocation, findExportReferences, findDeprecatedReferences, findAdapter, fetchSpecFromGitHub, fetchSpec, fetchGitHubContext, extractStandardSchemasFromProject, extractStandardSchemas, extractSpecSummary, extractSchemaType, extractSchemaOutputType, extractPackageSpec, extractImports, extractFunctionCalls, ensureSpecCoverage, docCovConfigSchema, diffSpecWithDocs, diffHashes, detectRuntimeSchemas, detectPackageManager, detectMonorepo, detectExampleRuntimeErrors, detectExampleAssertionFailures, detectEntryPoint, detectBuildInfo, defineConfig, createSourceFile, createNodeCommandRunner, computeSnapshot, computeHealth, computeExportDrift, computeDrift, clearSpecCache, categorizeDrifts, categorizeDrift, calculateAggregateCoverage, buildRawUrl, buildExportRegistry, buildDocCovSpec, buildDisplayUrl, buildCloneUrl, blockReferencesExport, applyPatchToJSDoc, applyForgottenExportFixes, applyEdits, analyzeProject2 as analyzeProject, analyzeFile, analyzeDocsImpact, analyze, WorkspacePackage, WorkspaceConfig, VALIDATION_INFO, TypecheckValidationResult, TypecheckResult, TypecheckOptions, SummaryDriftIssue, StandardSchemaExtractionResult, StandardSchemaExtractionOutput, StandardJSONSchemaV1, SpecSummary, SpecDocDrift, SpecDiffWithDocs, SpecCacheConfig, SpecCache, SchemaExtractionResult, SchemaExtractionMode, SchemaDetectionResult, SchemaDetectionContext, SchemaAdapter, SandboxFileSystem, SPEC_CACHE_FILE, RuntimeDrift, RunValidationResult, RunExamplesWithPackageResult, RunExamplesWithPackageOptions, RunExampleOptions, ResolvedTarget, ResolvedFilters, ResolveTargetOptions, ReleaseTag, REPORT_VERSION, REPORT_EXTENSIONS, ProjectInfo, PresenceResult, ParsedGitHubUrl, PackageManagerInfo, PackageManager, PackageJson, PackageExports, OpenPkgSpec, NodeFileSystem, MonorepoType, MonorepoInfo, MemberChange, MarkdownDocFile, MarkdownCodeBlock, LLMAssertion, JSDocTag, JSDocReturn, JSDocPatch, JSDocParam, JSDocEdit, InstallResult, InstallOptions, HealthInput, HISTORY_DIR, GitHubRepoMetadata, GitHubProjectContext, GenerateForgottenExportFixesOptions, ForgottenExportResult, ForgottenExportFix, FixType, FixSuggestion, FilterSource, FilterOptions, FileSystem, FetchGitHubContextOptions, ExtractStandardSchemasOptions, ExtendedTrendAnalysis, ExportReference, ExportDriftResult, ExportCoverageData, ExampleValidationTypeError, ExampleValidationResult, ExampleValidationOptions, ExampleValidationMode, ExampleValidation, ExampleTypeError, ExampleRunResult, EntryPointSource, EntryPointInfo, DriftType, DriftSummary, DriftResult, DriftReportSummary, DriftReport, DriftCategory, DocsImpactResult, DocsImpactReference, DocsImpact, DocsConfig, DocsChangeType, DocCovReport, DocCovOptions, DocCovConfigInput, DocCovConfig, DocCov, DiffWithDocsOptions, Diagnostic, DetectedSchemaEntry, DetectedPackageManager, DRIFT_CATEGORY_LABELS, DRIFT_CATEGORY_DESCRIPTIONS, DRIFT_CATEGORIES, DEFAULT_REPORT_PATH, DEFAULT_REPORT_DIR, CoverageTrend, CoverageSummary, CoverageSnapshot, CommandRunner, CommandResult, CheckConfig, CategorizedDrift, CacheValidationResult, CacheContext, CACHE_VERSION, BuildPlanTarget, BuildPlanStepResult, BuildPlanStep, BuildPlanExecutionResult, BuildPlanEnvironment, BuildPlan, BuildInfo, BuildHints, BuildDocCovOptions, ApplyForgottenExportResult, ApplyEditsResult, AnalyzeProjectOptions, AnalyzeOptions, AnalysisResult, ALL_VALIDATIONS };
3250
+ export { validateSpecCache, validateExamples, typecheckExamples, typecheckExample, symbolExistsInGraph, shouldValidate, serializeJSDoc, saveSpecCache, saveSnapshot, saveReport, safeParseJson, runExamplesWithPackage, runExamples, runExample, resolveTarget, resolveRequirements, resolveCompiledPath, renderSparkline, renderApiSurface, readPackageJson, pruneHistory, previewForgottenExportFixes, parseGitHubUrl2 as parseScanGitHubUrl, parseMarkdownFiles, parseMarkdownFile, parseListFlag, parseJSDocToPatch, parseGitHubUrl, parseExamplesFlag, parseAssertions, normalizeConfig, mergeFixes, mergeFilters, loadSpecCache, loadSnapshots, loadCachedReport, listWorkspacePackages, isStandardJSONSchema, isSchemaType, isPackageEntryPoint, isFixableDrift, isExportFullyDocumented, isExportDocumented, isExecutableLang, installDependencies, hashString, hashFiles, hashFile, hasNonAssertionComments, hasDocsImpact, hasDocsForExport, groupFixesByFile, groupDriftsByCategory, getUndocumentedExports, getTrend, getSupportedLibraries, getSpecCachePath, getRunCommand, getReportPath, getRegisteredAdapters, getPrimaryBuildScript, getInstallCommand, getExtendedTrend, getExportScore, getExportMissing, getExportDrift, getExportAnalysis, getDriftSummary, getDocumentedExports, getDocsImpactSummary, getDoccovDir, getDiffReportPath, generateReportFromDocCov, generateReport, generateForgottenExportFixes, generateFixesForExport, generateFix, formatPackageList, formatDriftSummaryLine, formatDelta, findSymbolModule, findRemovedReferences, findProjectRoot, findPackageByName, findOrphanedTempFiles, findJSDocLocation, findExportReferences, findEntryPointForFile, findDeprecatedReferences, findAdapter, fetchSpecFromGitHub, fetchSpec, fetchGitHubContext, extractStandardSchemasFromProject, extractStandardSchemas, extractSpecSummary, extractSchemaType, extractSchemaOutputType, extractPackageSpec, extractImports, extractFunctionCalls, ensureSpecCoverage, docCovConfigSchema, diffSpecWithDocs, diffHashes, detectRuntimeSchemas, detectPackageManager, detectMonorepo, detectExampleRuntimeErrors, detectExampleAssertionFailures, detectEntryPoint, detectBuildInfo, defineConfig, createSourceFile, createPackageResult, createNodeCommandRunner, computeSnapshot, computeHealth, computeExportDrift, computeDrift, clearSpecCache, cleanupOrphanedTempFiles, categorizeDrifts, categorizeDrift, calculateAggregateCoverage, buildRawUrl, buildModuleGraph, buildExportRegistry, buildDocCovSpec, buildDisplayUrl, buildCloneUrl, blockReferencesExport, applyPatchToJSDoc, applyForgottenExportFixes, applyEdits, analyzeProject2 as analyzeProject, analyzeFile, analyzeDocsImpact, analyze, aggregateResults, WorkspacePackage, WorkspaceConfig, VALIDATION_INFO, TypecheckValidationResult, TypecheckResult, TypecheckOptions, SummaryDriftIssue, StylePreset, StandardSchemaExtractionResult, StandardSchemaExtractionOutput, StandardJSONSchemaV1, SpecSummary, SpecDocDrift, SpecDiffWithDocs, SpecCacheConfig, SpecCache, SchemaExtractionResult, SchemaExtractionMode, SchemaDetectionResult, SchemaDetectionContext, SchemaAdapter, SandboxFileSystem, SPEC_CACHE_FILE, RuntimeDrift, RunValidationResult, RunExamplesWithPackageResult, RunExamplesWithPackageOptions, RunExampleOptions, ResolvedTarget, ResolvedFilters, DocRequirements2 as ResolvedDocRequirements, ResolveTargetOptions, ReleaseTag, REPORT_VERSION, REPORT_EXTENSIONS, ProjectInfo, PresenceResult, PartialAnalysisState, ParsedGitHubUrl, PackageResult, PackageManagerInfo, PackageManager, PackageJson, PackageExports, PRESETS, OpenPkgSpec, NodeFileSystem, MonorepoType, MonorepoInfo, ModuleInfo, ModuleGraph, MemberChange, MarkdownDocFile, MarkdownCodeBlock, LLMAssertion, JSDocTag, JSDocReturn, JSDocPatch, JSDocParam, JSDocEdit, InstallResult, InstallOptions, IncrementalExportResult, IncrementalAnalyzerOptions, IncrementalAnalyzer, HealthInput, HISTORY_DIR, GitHubRepoMetadata, GitHubProjectContext, GenerateForgottenExportFixesOptions, ForgottenExportResult, ForgottenExportFix, FixType, FixSuggestion, FilterSource, FilterOptions, FileSystem, FetchGitHubContextOptions, ExtractStandardSchemasOptions, ExtendedTrendAnalysis, ExportReference, ExportDriftResult, ExportCoverageData, ExampleValidationTypeError, ExampleValidationResult, ExampleValidationOptions, ExampleValidationMode, ExampleValidation, ExampleTypeError, ExampleRunResult, EntryPointSource, EntryPointInfo, DriftType, DriftSummary, DriftResult, DriftReportSummary, DriftReport, DriftCategory, DocsImpactResult, DocsImpactReference, DocsImpact, DocsConfig, DocsChangeType, DocRequirements, DocCovReport, DocCovOptions, DocCovConfigInput, DocCovConfig, DocCov, DiffWithDocsOptions, Diagnostic, DetectedSchemaEntry, DetectedPackageManager, DRIFT_CATEGORY_LABELS, DRIFT_CATEGORY_DESCRIPTIONS, DRIFT_CATEGORIES, DEFAULT_REQUIREMENTS, DEFAULT_REPORT_PATH, DEFAULT_REPORT_DIR, CoverageTrend, CoverageSummary, CoverageSnapshot, ComputeDriftOptions, CommandRunner, CommandResult, CheckConfig, CategorizedDrift, CacheValidationResult, CacheContext, CACHE_VERSION, BuildPlanTarget, BuildPlanStepResult, BuildPlanStep, BuildPlanExecutionResult, BuildPlanEnvironment, BuildPlan, BuildInfo, BuildHints, BuildDocCovOptions, BatchResult, ApplyForgottenExportResult, ApplyEditsResult, AnalyzeProjectOptions, AnalyzeOptions, AnalysisResult, ALL_VALIDATIONS };