@doccov/sdk 0.30.7 → 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
  /**
@@ -171,6 +384,93 @@ declare function getDriftSummary(drifts: SpecDocDrift[]): DriftSummary;
171
384
  */
172
385
  declare function formatDriftSummaryLine(summary: DriftSummary): string;
173
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
+ }
174
474
  /**
175
475
  * Build a registry of all export/type names for cross-reference validation.
176
476
  */
@@ -179,16 +479,18 @@ declare function buildExportRegistry(spec: OpenPkgSpec): ExportRegistry;
179
479
  * Compute drift for all exports in a spec.
180
480
  *
181
481
  * @param spec - The OpenPkg spec to analyze
482
+ * @param options - Optional config including moduleGraph for cross-module validation
182
483
  * @returns Drift results per */
183
- declare function computeDrift(spec: OpenPkgSpec): DriftResult;
484
+ declare function computeDrift(spec: OpenPkgSpec, options?: ComputeDriftOptions): DriftResult;
184
485
  /**
185
486
  * Compute drift for a single export.
186
487
  *
187
488
  * @param entry - The to analyze
188
489
  * @param registry - Registry of known exports and types for validation
490
+ * @param options - Optional config including moduleGraph for cross-module validation
189
491
  * @returns Array of drift issues detected
190
492
  */
191
- declare function computeExportDrift(entry: SpecExport, registry?: ExportRegistry): SpecDocDrift[];
493
+ declare function computeExportDrift(entry: SpecExport, registry?: ExportRegistry, options?: ComputeDriftOptions): SpecDocDrift[];
192
494
  /**
193
495
  * Calculate aggregate coverage score from a spec's exports.
194
496
  *
@@ -307,6 +609,15 @@ declare function hasNonAssertionComments(code: string): boolean;
307
609
  */
308
610
  declare function detectExampleAssertionFailures(entry: SpecExport2, runtimeResults: Map<number, ExampleRunResult>): SpecDocDrift[];
309
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;
310
621
  /**
311
622
  * Input data for computing documentation health score.
312
623
  */
@@ -342,8 +653,8 @@ interface HealthInput {
342
653
  * Score thresholds: green 80+, yellow 60-79, red <60
343
654
  */
344
655
  declare function computeHealth(input: HealthInput): DocumentationHealth;
345
- import { DocCovDrift, DocCovSpec as DocCovSpec2, ExportAnalysis, MissingDocRule as MissingDocRule2 } from "@doccov/spec";
346
- 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";
347
658
  /**
348
659
  * Get the full analysis data for an export.
349
660
  *
@@ -351,7 +662,7 @@ import { SpecExport as SpecExport7 } from "@openpkg-ts/spec";
351
662
  * @param doccov - The DocCov spec containing analysis data
352
663
  * @returns Export analysis or undefined if not found
353
664
  */
354
- declare function getExportAnalysis(exp: SpecExport7, doccov: DocCovSpec2): ExportAnalysis | undefined;
665
+ declare function getExportAnalysis(exp: SpecExport8, doccov: DocCovSpec2): ExportAnalysis2 | undefined;
355
666
  /**
356
667
  * Get the coverage score for an export.
357
668
  *
@@ -359,7 +670,7 @@ declare function getExportAnalysis(exp: SpecExport7, doccov: DocCovSpec2): Expor
359
670
  * @param doccov - The DocCov spec containing analysis data
360
671
  * @returns Coverage score (0-100) or 100 if not found
361
672
  */
362
- declare function getExportScore(exp: SpecExport7, doccov: DocCovSpec2): number;
673
+ declare function getExportScore(exp: SpecExport8, doccov: DocCovSpec2): number;
363
674
  /**
364
675
  * Get drift issues for an export.
365
676
  *
@@ -367,7 +678,7 @@ declare function getExportScore(exp: SpecExport7, doccov: DocCovSpec2): number;
367
678
  * @param doccov - The DocCov spec containing analysis data
368
679
  * @returns Array of drift issues or empty array if none
369
680
  */
370
- declare function getExportDrift(exp: SpecExport7, doccov: DocCovSpec2): DocCovDrift[];
681
+ declare function getExportDrift(exp: SpecExport8, doccov: DocCovSpec2): DocCovDrift[];
371
682
  /**
372
683
  * Get missing documentation rules for an export.
373
684
  *
@@ -375,7 +686,7 @@ declare function getExportDrift(exp: SpecExport7, doccov: DocCovSpec2): DocCovDr
375
686
  * @param doccov - The DocCov spec containing analysis data
376
687
  * @returns Array of missing rule IDs or empty array if none
377
688
  */
378
- declare function getExportMissing(exp: SpecExport7, doccov: DocCovSpec2): MissingDocRule2[];
689
+ declare function getExportMissing(exp: SpecExport8, doccov: DocCovSpec2): MissingDocRule2[];
379
690
  /**
380
691
  * Check if an has complete documentation.
381
692
  *
@@ -383,9 +694,9 @@ declare function getExportMissing(exp: SpecExport7, doccov: DocCovSpec2): Missin
383
694
  * @param doccov - The DocCov spec containing analysis data
384
695
  * @returns True if has 100% coverage and no drift
385
696
  */
386
- declare function isExportFullyDocumented(exp: SpecExport7, doccov: DocCovSpec2): boolean;
697
+ declare function isExportFullyDocumented(exp: SpecExport8, doccov: DocCovSpec2): boolean;
387
698
  import { DocCovSpec as DocCovSpec3 } from "@doccov/spec";
388
- import { OpenPkg as OpenPkg2 } from "@openpkg-ts/spec";
699
+ import { OpenPkg as OpenPkg3 } from "@openpkg-ts/spec";
389
700
  import { ApiSurfaceResult, DocumentationHealth as DocumentationHealth2 } from "@doccov/spec";
390
701
  /**
391
702
  * DocCov report schema version.
@@ -527,6 +838,10 @@ interface ExportCoverageData {
527
838
  * Drift issues for this export.
528
839
  */
529
840
  drift?: SpecDocDrift[];
841
+ /**
842
+ * Number of overloads if > 1 (for overloaded functions).
843
+ */
844
+ overloadCount?: number;
530
845
  }
531
846
  /**
532
847
  * DocCov report - a persistable coverage analysis result.
@@ -589,7 +904,7 @@ interface DocCovReport {
589
904
  * console.log(`Coverage: ${report.coverage.score}%`);
590
905
  * ```
591
906
  */
592
- declare function generateReport(spec: OpenPkg2, openpkgPath?: string): DocCovReport;
907
+ declare function generateReport(spec: OpenPkg3, openpkgPath?: string): Promise<DocCovReport>;
593
908
  /**
594
909
  * Generate a DocCov report from OpenPkg spec + DocCov spec composition.
595
910
  *
@@ -600,7 +915,7 @@ declare function generateReport(spec: OpenPkg2, openpkgPath?: string): DocCovRep
600
915
  * @param doccov - The DocCov spec with analysis data
601
916
  * @returns A DocCov report with coverage analysis
602
917
  */
603
- declare function generateReportFromDocCov(openpkg: OpenPkg2, doccov: DocCovSpec3): DocCovReport;
918
+ declare function generateReportFromDocCov(openpkg: OpenPkg3, doccov: DocCovSpec3): DocCovReport;
604
919
  /**
605
920
  * Load a cached DocCov report from disk.
606
921
  *
@@ -635,7 +950,247 @@ declare function saveReport(report: DocCovReport, reportPath?: string): void;
635
950
  * fs.writeFileSync('api-surface.md', apiSurface);
636
951
  * ```
637
952
  */
638
- 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;
639
1194
  /**
640
1195
  * Compute a hash of file contents.
641
1196
  * Uses truncated SHA-256 for balance of speed and collision resistance.
@@ -667,7 +1222,7 @@ declare function hashFiles(filePaths: string[], cwd: string): Record<string, str
667
1222
  * @returns Array of file paths that changed, were added, or were removed
668
1223
  */
669
1224
  declare function diffHashes(cached: Record<string, string>, current: Record<string, string>): string[];
670
- import { OpenPkg as OpenPkg3 } from "@openpkg-ts/spec";
1225
+ import { OpenPkg as OpenPkg5 } from "@openpkg-ts/spec";
671
1226
  /** Current cache format version - bump when spec extraction logic changes */
672
1227
  declare const CACHE_VERSION = "1.3.0";
673
1228
  /** Default cache file path */
@@ -731,7 +1286,7 @@ interface SpecCache {
731
1286
  /** Analysis configuration that affects output */
732
1287
  config: SpecCacheConfig;
733
1288
  /** The cached OpenPkg spec */
734
- spec: OpenPkg3;
1289
+ spec: OpenPkg5;
735
1290
  /** Cached spec-level diagnostics (info/warning messages from extraction) */
736
1291
  specDiagnostics?: CachedDiagnostic[];
737
1292
  /** Cached forgotten exports */
@@ -786,7 +1341,7 @@ declare function loadSpecCache(cwd: string): SpecCache | null;
786
1341
  * @param spec - OpenPkg spec to cache
787
1342
  * @param context - Cache context with file paths and config
788
1343
  */
789
- declare function saveSpecCache(spec: OpenPkg3, context: CacheContext): void;
1344
+ declare function saveSpecCache(spec: OpenPkg5, context: CacheContext): void;
790
1345
  /**
791
1346
  * Validate if cached spec is still valid.
792
1347
  *
@@ -835,112 +1390,6 @@ interface FilterOptions {
835
1390
  visibility?: ReleaseTag[];
836
1391
  }
837
1392
  import { z } from "zod";
838
- /**
839
- * Configuration types for DocCov.
840
- * These types are shared between CLI and API.
841
- */
842
- /**
843
- * Documentation configuration options.
844
- */
845
- interface DocsConfig {
846
- /** Glob patterns for markdown docs to include */
847
- include?: string[];
848
- /** Glob patterns for markdown docs to exclude */
849
- exclude?: string[];
850
- }
851
- /**
852
- * Example validation modes.
853
- */
854
- type ExampleValidationMode = "presence" | "typecheck" | "run";
855
- /**
856
- * Schema extraction modes for validation libraries (Zod, Valibot, TypeBox, ArkType).
857
- *
858
- * - 'static': TypeScript Compiler API only (no runtime, always safe)
859
- * - 'runtime': Standard Schema runtime extraction (requires built package)
860
- * - 'hybrid': Try runtime first, fall back to static
861
- */
862
- type SchemaExtractionMode = "static" | "runtime" | "hybrid";
863
- /**
864
- * API surface configuration options.
865
- */
866
- interface ApiSurfaceConfig {
867
- /** Minimum completeness percentage to pass (0-100) */
868
- minCompleteness?: number;
869
- /** Warning threshold - warn when below this (0-100) */
870
- warnBelow?: number;
871
- /** Type names to ignore (won't be flagged as forgotten exports) */
872
- ignore?: string[];
873
- }
874
- /**
875
- * Check command configuration options.
876
- */
877
- interface CheckConfig {
878
- /**
879
- * Example validation modes to run.
880
- * Can be a single mode, array of modes, or comma-separated string.
881
- * - 'presence': Check that @example blocks exist on exports
882
- * - 'typecheck': Compile examples with TypeScript
883
- * - 'run': Execute examples and validate assertions
884
- */
885
- examples?: ExampleValidationMode | ExampleValidationMode[] | string;
886
- /** Minimum health score required (0-100). Unified metric combining coverage + accuracy. */
887
- minHealth?: number;
888
- /** @deprecated Use minHealth instead */
889
- minCoverage?: number;
890
- /** @deprecated Use minHealth instead */
891
- maxDrift?: number;
892
- /** API surface configuration */
893
- apiSurface?: ApiSurfaceConfig;
894
- }
895
- /**
896
- * Normalized DocCov configuration.
897
- * This is the parsed/normalized form used by commands.
898
- */
899
- interface DocCovConfig {
900
- /** Export include patterns */
901
- include?: string[];
902
- /** Export exclude patterns */
903
- exclude?: string[];
904
- /** Plugins (future) */
905
- plugins?: unknown[];
906
- /** Documentation configuration */
907
- docs?: DocsConfig;
908
- /** Check command configuration */
909
- check?: CheckConfig;
910
- /**
911
- * Schema extraction mode for validation libraries.
912
- *
913
- * - 'static' (default): Safe, uses TypeScript Compiler API
914
- * - 'runtime': Uses Standard Schema (requires built package)
915
- * - 'hybrid': Tries runtime first, falls back to static
916
- *
917
- * Runtime extraction provides richer JSON Schema output (formats, patterns)
918
- * but requires the package to be built first.
919
- */
920
- schemaExtraction?: SchemaExtractionMode;
921
- }
922
- /**
923
- * Define a DocCov configuration.
924
- * Helper function for type-safe configuration in doccov.config.ts.
925
- *
926
- * @param config - Configuration object
927
- * @returns The configuration object (for type inference)
928
- *
929
- * @example
930
- * ```typescript
931
- * // doccov.config.ts
932
- * import { defineConfig } from '@doccov/sdk';
933
- *
934
- * defineConfig({
935
- * include: ['MyClass', 'myFunction'],
936
- * exclude: ['internal*'],
937
- * check: {
938
- * minHealth: 80,
939
- * },
940
- * });
941
- * ```
942
- */
943
- declare function defineConfig(config: DocCovConfig): DocCovConfig;
944
1393
  declare const stringList: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
945
1394
  /**
946
1395
  * Docs configuration schema
@@ -961,6 +1410,16 @@ declare const apiSurfaceConfigSchema: z.ZodObject<{
961
1410
  warnBelow: z.ZodOptional<z.ZodNumber>;
962
1411
  ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
963
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
+ }>;
964
1423
  /**
965
1424
  * Check command configuration schema.
966
1425
  */
@@ -970,6 +1429,8 @@ declare const checkConfigSchema: z.ZodObject<{
970
1429
  minCoverage: z.ZodOptional<z.ZodNumber>;
971
1430
  maxDrift: z.ZodOptional<z.ZodNumber>;
972
1431
  apiSurface: z.ZodOptional<typeof apiSurfaceConfigSchema>;
1432
+ style: z.ZodOptional<typeof stylePresetSchema>;
1433
+ require: z.ZodOptional<typeof docRequirementsSchema>;
973
1434
  }>;
974
1435
  declare const docCovConfigSchema: z.ZodObject<{
975
1436
  include: z.ZodOptional<typeof stringList>;
@@ -1212,6 +1673,26 @@ declare function getPrimaryBuildScript(buildInfo: BuildInfo): string | null;
1212
1673
  * @throws Error if no entry point can be found
1213
1674
  */
1214
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>;
1215
1696
  import { Sandbox } from "@vercel/sandbox";
1216
1697
  /**
1217
1698
  * Node.js filesystem implementation for CLI usage.
@@ -1429,7 +1910,7 @@ declare function parseExamplesFlag(value: boolean | string | undefined): Example
1429
1910
  * Check if a specific validation is enabled.
1430
1911
  */
1431
1912
  declare function shouldValidate(validations: ExampleValidation[], check: ExampleValidation): boolean;
1432
- import { SpecExport as SpecExport8 } from "@openpkg-ts/spec";
1913
+ import { SpecExport as SpecExport9 } from "@openpkg-ts/spec";
1433
1914
  interface ExampleTypeError {
1434
1915
  /** Index of the example in the examples array */
1435
1916
  exampleIndex: number;
@@ -1552,8 +2033,8 @@ interface ExampleValidationResult {
1552
2033
  * - `typecheck`: type-checks examples (doesn't require presence or run)
1553
2034
  * - `run`: executes examples (doesn't require presence or typecheck)
1554
2035
  */
1555
- declare function validateExamples(exports: SpecExport8[], options: ExampleValidationOptions): Promise<ExampleValidationResult>;
1556
- 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";
1557
2038
  import * as TS from "typescript";
1558
2039
  /**
1559
2040
  * Represents a single parameter in a JSDoc patch
@@ -1680,7 +2161,7 @@ declare function isFixableDrift(drift: SpecDocDrift): boolean;
1680
2161
  /**
1681
2162
  * Generate a fix for a single drift issue
1682
2163
  */
1683
- declare function generateFix(drift: SpecDocDrift, exportEntry: SpecExport9, existingPatch?: JSDocPatch): FixSuggestion | null;
2164
+ declare function generateFix(drift: SpecDocDrift, exportEntry: SpecExport10, existingPatch?: JSDocPatch): FixSuggestion | null;
1684
2165
  /**
1685
2166
  * Generate all fixes for an export's drift issues.
1686
2167
  *
@@ -1688,7 +2169,7 @@ declare function generateFix(drift: SpecDocDrift, exportEntry: SpecExport9, exis
1688
2169
  * @param existingPatch - Optional existing JSDoc patch to merge with
1689
2170
  * @param driftList - Optional drift list from DocCovSpec (if not provided, reads from exportEntry.docs?.drift for backward compat)
1690
2171
  */
1691
- declare function generateFixesForExport(exportEntry: SpecExport9, existingPatch?: JSDocPatch, driftList?: SpecDocDrift[]): FixSuggestion[];
2172
+ declare function generateFixesForExport(exportEntry: SpecExport10, existingPatch?: JSDocPatch, driftList?: SpecDocDrift[]): FixSuggestion[];
1692
2173
  /**
1693
2174
  * Merge multiple fix patches into a single patch
1694
2175
  */
@@ -1918,7 +2399,7 @@ declare function extractImports(code: string): Array<{
1918
2399
  * @deprecated Use extractCallsAST for more detailed info.
1919
2400
  */
1920
2401
  declare function extractFunctionCalls(code: string): string[];
1921
- 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";
1922
2403
  /**
1923
2404
  * Extended spec diff result with docs impact
1924
2405
  */
@@ -1980,7 +2461,7 @@ interface DiffWithDocsOptions {
1980
2461
  * }
1981
2462
  * ```
1982
2463
  */
1983
- declare function diffSpecWithDocs(oldSpec: OpenPkg5, newSpec: OpenPkg5, options?: DiffWithDocsOptions): SpecDiffWithDocs;
2464
+ declare function diffSpecWithDocs(oldSpec: OpenPkg7, newSpec: OpenPkg7, options?: DiffWithDocsOptions): SpecDiffWithDocs;
1984
2465
  /**
1985
2466
  * Check if a diff has any docs impact
1986
2467
  */
@@ -2038,7 +2519,7 @@ interface DetectedSchemaEntry {
2038
2519
  schema: Record<string, unknown>;
2039
2520
  vendor: string;
2040
2521
  }
2041
- import { OpenPkg as OpenPkg6 } from "@openpkg-ts/spec";
2522
+ import { OpenPkg as OpenPkg8 } from "@openpkg-ts/spec";
2042
2523
  /** Directory for storing history snapshots (relative to .doccov) */
2043
2524
  declare const HISTORY_DIR = ".doccov/history";
2044
2525
  /**
@@ -2125,7 +2606,7 @@ interface ExtendedTrendAnalysis {
2125
2606
  /**
2126
2607
  * Compute a coverage snapshot from an OpenPkg spec.
2127
2608
  */
2128
- declare function computeSnapshot(spec: OpenPkg6, options?: {
2609
+ declare function computeSnapshot(spec: OpenPkg8, options?: {
2129
2610
  commit?: string;
2130
2611
  branch?: string;
2131
2612
  }): CoverageSnapshot;
@@ -2155,7 +2636,7 @@ declare function loadSnapshots(cwd: string): CoverageSnapshot[];
2155
2636
  * @param options - Optional git metadata
2156
2637
  * @returns Trend data with history and delta
2157
2638
  */
2158
- declare function getTrend(spec: OpenPkg6, cwd: string, options?: {
2639
+ declare function getTrend(spec: OpenPkg8, cwd: string, options?: {
2159
2640
  commit?: string;
2160
2641
  branch?: string;
2161
2642
  }): CoverageTrend;
@@ -2191,7 +2672,7 @@ declare function pruneHistory(cwd: string, keepCount?: number): number;
2191
2672
  * @param options - Optional git metadata
2192
2673
  * @returns Extended trend analysis
2193
2674
  */
2194
- declare function getExtendedTrend(spec: OpenPkg6, cwd: string, options?: {
2675
+ declare function getExtendedTrend(spec: OpenPkg8, cwd: string, options?: {
2195
2676
  commit?: string;
2196
2677
  branch?: string;
2197
2678
  }): ExtendedTrendAnalysis;
@@ -2281,7 +2762,7 @@ declare function parseListFlag(value?: string | string[]): string[] | undefined;
2281
2762
  * ```
2282
2763
  */
2283
2764
  declare function mergeFilters(config: DocCovConfig | null, overrides: FilterOptions): ResolvedFilters;
2284
- import { OpenPkg as OpenPkg7 } from "@openpkg-ts/spec";
2765
+ import { OpenPkg as OpenPkg9 } from "@openpkg-ts/spec";
2285
2766
  /**
2286
2767
  * Parsed components of a GitHub URL.
2287
2768
  */
@@ -2374,7 +2855,7 @@ declare function buildRawUrl(parsed: ParsedGitHubUrl, filePath: string): string;
2374
2855
  * }
2375
2856
  * ```
2376
2857
  */
2377
- declare function fetchSpecFromGitHub(parsed: ParsedGitHubUrl): Promise<OpenPkg7 | null>;
2858
+ declare function fetchSpecFromGitHub(parsed: ParsedGitHubUrl): Promise<OpenPkg9 | null>;
2378
2859
  /**
2379
2860
  * Options for fetching a spec from GitHub.
2380
2861
  */
@@ -2394,7 +2875,7 @@ interface FetchSpecOptions {
2394
2875
  * @param branchOrOptions - Branch name (default: 'main') or options object
2395
2876
  * @returns The OpenPkg spec, or null if not found
2396
2877
  */
2397
- 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>;
2398
2879
  /**
2399
2880
  * Progress event for installation status updates.
2400
2881
  */
@@ -2581,8 +3062,8 @@ declare function fetchGitHubContext(repoUrl: string, refOrOptions?: string | Fet
2581
3062
  * List packages in a monorepo workspace.
2582
3063
  */
2583
3064
  declare function listWorkspacePackages(owner: string, repo: string, ref: string, patterns: string[], authToken?: string): Promise<string[]>;
2584
- import { DocCovSpec as DocCovSpec4 } from "@doccov/spec";
2585
- 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";
2586
3067
  /**
2587
3068
  * A documentation drift issue in a spec summary.
2588
3069
  */
@@ -2636,8 +3117,8 @@ interface SpecSummary {
2636
3117
  * console.log(`Undocumented: ${summary.undocumented.length}`);
2637
3118
  * ```
2638
3119
  */
2639
- declare function extractSpecSummary(openpkg: OpenPkg8, doccov: DocCovSpec4): SpecSummary;
2640
- import { OpenPkg as OpenPkg_lwtdjapvef } from "@openpkg-ts/spec";
3120
+ declare function extractSpecSummary(openpkg: OpenPkg10, doccov: DocCovSpec5): SpecSummary;
3121
+ import { OpenPkg as OpenPkg_xvdmlnuyqi } from "@openpkg-ts/spec";
2641
3122
  /**
2642
3123
  * Build Plan types for AI-powered repository scanning.
2643
3124
  */
@@ -2734,7 +3215,7 @@ interface BuildPlanExecutionResult {
2734
3215
  /** Whether all required steps succeeded */
2735
3216
  success: boolean;
2736
3217
  /** Generated OpenPkg spec (if successful) */
2737
- spec?: OpenPkg_lwtdjapvef;
3218
+ spec?: OpenPkg_xvdmlnuyqi;
2738
3219
  /** Results for each step */
2739
3220
  stepResults: BuildPlanStepResult[];
2740
3221
  /** Total execution time in milliseconds */
@@ -2766,4 +3247,4 @@ declare function findProjectRoot(startDir: string): string;
2766
3247
  * @returns Absolute path to the .doccov directory
2767
3248
  */
2768
3249
  declare function getDoccovDir(cwd: string): string;
2769
- 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 };