@doccov/sdk 0.15.0 → 0.18.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.
Files changed (4) hide show
  1. package/LICENSE +1 -1
  2. package/dist/index.d.ts +754 -96
  3. package/dist/index.js +6145 -4845
  4. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -1,3 +1,191 @@
1
+ interface DocCovOptions {
2
+ includePrivate?: boolean;
3
+ followImports?: boolean;
4
+ maxDepth?: number;
5
+ resolveExternalTypes?: boolean;
6
+ /** Enable spec caching (default: true) */
7
+ useCache?: boolean;
8
+ /** Working directory for cache operations (default: process.cwd()) */
9
+ cwd?: string;
10
+ }
11
+ /**
12
+ * Pre-detected Standard Schema for a variable export.
13
+ */
14
+ interface DetectedSchemaEntry {
15
+ schema: Record<string, unknown>;
16
+ vendor: string;
17
+ }
18
+ /**
19
+ * Standard JSON Schema Integration
20
+ *
21
+ * Provides runtime detection and extraction of Standard JSON Schema v1 compliant libraries.
22
+ * This enables support for Zod v4.2+, ArkType, Valibot, and other Standard Schema compliant libraries.
23
+ *
24
+ * @see https://github.com/standard-schema/standard-schema
25
+ */
26
+ /**
27
+ * Standard JSON Schema V1 interface (minimal subset for detection).
28
+ * Full spec: https://github.com/standard-schema/standard-schema
29
+ */
30
+ interface StandardJSONSchemaV1 {
31
+ readonly "~standard": {
32
+ readonly version: 1;
33
+ readonly vendor: string;
34
+ readonly jsonSchema: {
35
+ readonly output: (options?: StandardSchemaOutputOptions) => Record<string, unknown>;
36
+ };
37
+ };
38
+ }
39
+ /**
40
+ * Options for Standard Schema JSON output.
41
+ */
42
+ interface StandardSchemaOutputOptions {
43
+ /**
44
+ * Target JSON Schema dialect.
45
+ * - 'draft-07': JSON Schema Draft 07 (widest compatibility)
46
+ * - 'draft-2020-12': Latest JSON Schema (best features)
47
+ * - 'openapi-3.0': OpenAPI 3.0 compatible schema
48
+ */
49
+ target?: "draft-07" | "draft-2020-12" | "openapi-3.0";
50
+ }
51
+ /**
52
+ * Result of Standard Schema extraction.
53
+ */
54
+ interface StandardSchemaResult {
55
+ /** The extracted JSON Schema */
56
+ schema: Record<string, unknown>;
57
+ /** The vendor library (e.g., 'zod', 'arktype', 'valibot') */
58
+ vendor: string;
59
+ /** Standard Schema version */
60
+ version: number;
61
+ }
62
+ /**
63
+ * Check if a value implements the Standard JSON Schema v1 interface.
64
+ *
65
+ * This enables runtime detection of schema libraries that implement the standard,
66
+ * including Zod v4.2+, ArkType, Valibot, and others.
67
+ *
68
+ * @param value - Value to check
69
+ * @returns True if the value implements StandardJSONSchemaV1
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * import { isStandardJSONSchema, extractViaStandardSchema } from '@doccov/sdk';
74
+ * import { z } from 'zod';
75
+ *
76
+ * const UserSchema = z.object({
77
+ * name: z.string(),
78
+ * age: z.number().min(0),
79
+ * });
80
+ *
81
+ * if (isStandardJSONSchema(UserSchema)) {
82
+ * const jsonSchema = extractViaStandardSchema(UserSchema);
83
+ * console.log(jsonSchema);
84
+ * // { type: 'object', properties: { name: { type: 'string' }, age: { type: 'number', minimum: 0 } } }
85
+ * }
86
+ * ```
87
+ */
88
+ declare function isStandardJSONSchema(value: unknown): value is StandardJSONSchemaV1;
89
+ /**
90
+ * Extract JSON Schema from a Standard Schema v1 compliant value.
91
+ *
92
+ * @param schema - A value implementing StandardJSONSchemaV1
93
+ * @param options - Extraction options
94
+ * @returns Extracted JSON Schema result with vendor info
95
+ * @throws Error if the value doesn't implement Standard Schema
96
+ *
97
+ * @example
98
+ * ```typescript
99
+ * import { extractViaStandardSchema } from '@doccov/sdk';
100
+ *
101
+ * // Works with any Standard Schema v1 compliant library
102
+ * const result = extractViaStandardSchema(mySchema, { target: 'draft-2020-12' });
103
+ * console.log(result.vendor); // 'zod', 'arktype', 'valibot', etc.
104
+ * console.log(result.schema); // The extracted JSON Schema
105
+ * ```
106
+ */
107
+ declare function extractViaStandardSchema(schema: StandardJSONSchemaV1, options?: StandardSchemaOutputOptions): StandardSchemaResult;
108
+ /**
109
+ * Try to extract JSON Schema from a value that may or may not implement Standard Schema.
110
+ *
111
+ * @param value - Any value that might be a Standard Schema
112
+ * @param options - Extraction options
113
+ * @returns Extraction result, or null if value doesn't implement Standard Schema
114
+ *
115
+ * @example
116
+ * ```typescript
117
+ * import { tryExtractStandardSchema } from '@doccov/sdk';
118
+ *
119
+ * const result = tryExtractStandardSchema(unknownSchema);
120
+ * if (result) {
121
+ * console.log(`Extracted ${result.vendor} schema:`, result.schema);
122
+ * }
123
+ * ```
124
+ */
125
+ declare function tryExtractStandardSchema(value: unknown, options?: StandardSchemaOutputOptions): StandardSchemaResult | null;
126
+ /**
127
+ * Supported Standard Schema vendors and their minimum versions.
128
+ */
129
+ declare const KNOWN_VENDORS: {
130
+ readonly zod: {
131
+ readonly minVersion: "4.2.0";
132
+ readonly homepage: "https://zod.dev";
133
+ };
134
+ readonly arktype: {
135
+ readonly minVersion: "2.0.0";
136
+ readonly homepage: "https://arktype.io";
137
+ };
138
+ readonly valibot: {
139
+ readonly minVersion: "1.0.0";
140
+ readonly homepage: "https://valibot.dev";
141
+ };
142
+ };
143
+ type KnownVendor = keyof typeof KNOWN_VENDORS;
144
+ /**
145
+ * Context for schema detection.
146
+ */
147
+ interface SchemaDetectionContext {
148
+ /** Base directory for resolving modules */
149
+ baseDir: string;
150
+ /** Entry file being analyzed */
151
+ entryFile: string;
152
+ }
153
+ /**
154
+ * Result of runtime schema detection for a module.
155
+ */
156
+ interface SchemaDetectionResult {
157
+ /** Map of name to detected Standard Schema */
158
+ schemas: Map<string, StandardSchemaResult>;
159
+ /** Errors encountered during detection (non-fatal) */
160
+ errors: string[];
161
+ }
162
+ /**
163
+ * Detect Standard Schema exports from a compiled module.
164
+ *
165
+ * This function attempts to load the compiled/transpiled version of the entry file
166
+ * and checks each for Standard Schema compliance.
167
+ *
168
+ * @param context - Detection context with paths
169
+ * @returns Detection result with found schemas and any errors
170
+ *
171
+ * @example
172
+ * ```typescript
173
+ * const result = await detectRuntimeSchemas({
174
+ * baseDir: '/path/to/project',
175
+ * entryFile: '/path/to/project/dist/index.js',
176
+ * });
177
+ *
178
+ * for (const [name, schema] of result.schemas) {
179
+ * console.log(`Found ${schema.vendor} schema: ${name}`);
180
+ * }
181
+ * ```
182
+ */
183
+ declare function detectRuntimeSchemas(context: SchemaDetectionContext): Promise<SchemaDetectionResult>;
184
+ /**
185
+ * Clear the module cache.
186
+ * Useful for testing or when modules may have changed.
187
+ */
188
+ declare function clearSchemaCache(): void;
1
189
  import { DriftCategory, SpecDocDrift, SpecExport } from "@openpkg-ts/spec";
2
190
  interface ExampleRunResult {
3
191
  success: boolean;
@@ -334,6 +522,11 @@ type QualitySeverity = "error" | "warn" | "off";
334
522
  interface RuleContext {
335
523
  export: SpecExport2;
336
524
  rawJSDoc?: string;
525
+ /**
526
+ * Registry of all exported names/IDs for spec-level rules.
527
+ * Used by rules like no-forgotten-to check if referenced types are exported.
528
+ */
529
+ exportRegistry?: Set<string>;
337
530
  }
338
531
  /**
339
532
  * A violation reported by a quality rule.
@@ -725,6 +918,210 @@ declare function saveReport(report: DocCovReport, reportPath?: string): void;
725
918
  */
726
919
  declare function isCachedReportValid(reportPath?: string, sourceFiles?: string[]): boolean;
727
920
  /**
921
+ * Generate a git-trackable API surface markdown file from an OpenPkg spec.
922
+ *
923
+ * This produces a deterministic, sorted output suitable for version control.
924
+ * Changes to the API will show up as diffs in this file.
925
+ *
926
+ * @param spec - The OpenPkg spec to render
927
+ * @returns Markdown string representing the API surface
928
+ *
929
+ * @example
930
+ * ```ts
931
+ * import { DocCov, renderApiSurface } from '@doccov/sdk';
932
+ *
933
+ * const doccov = new DocCov();
934
+ * const { spec } = await doccov.analyzeFileWithDiagnostics('src/index.ts');
935
+ * const apiSurface = renderApiSurface(spec);
936
+ *
937
+ * fs.writeFileSync('api-surface.md', apiSurface);
938
+ * ```
939
+ */
940
+ declare function renderApiSurface(spec: OpenPkg4): string;
941
+ import { OpenPkg as OpenPkg5 } from "@openpkg-ts/spec";
942
+ /** Directory for storing history snapshots */
943
+ declare const HISTORY_DIR = ".doccov/history";
944
+ /**
945
+ * A historical coverage snapshot.
946
+ */
947
+ interface CoverageSnapshot {
948
+ /** ISO 8601 timestamp */
949
+ timestamp: string;
950
+ /** Package name */
951
+ package: string;
952
+ /** Package version (if available) */
953
+ version?: string;
954
+ /** Coverage score (0-100) */
955
+ coverageScore: number;
956
+ /** Total number of exports */
957
+ totalExports: number;
958
+ /** Number of documented exports */
959
+ documentedExports: number;
960
+ /** Number of drift issues */
961
+ driftCount: number;
962
+ /** Git commit hash (if available) */
963
+ commit?: string;
964
+ /** Git branch (if available) */
965
+ branch?: string;
966
+ }
967
+ /**
968
+ * Coverage trend data.
969
+ */
970
+ interface CoverageTrend {
971
+ /** Current snapshot */
972
+ current: CoverageSnapshot;
973
+ /** Previous snapshots (most recent first) */
974
+ history: CoverageSnapshot[];
975
+ /** Score delta from previous */
976
+ delta?: number;
977
+ /** Sparkline data (last N scores) */
978
+ sparkline: number[];
979
+ }
980
+ /**
981
+ * Tier-based retention settings.
982
+ */
983
+ type RetentionTier = "free" | "team" | "pro";
984
+ /**
985
+ * Retention days per tier.
986
+ */
987
+ declare const RETENTION_DAYS: Record<RetentionTier, number>;
988
+ /**
989
+ * Weekly summary of coverage data.
990
+ */
991
+ interface WeeklySummary {
992
+ /** Week start date (ISO string) */
993
+ weekStart: string;
994
+ /** Week end date (ISO string) */
995
+ weekEnd: string;
996
+ /** Average coverage for the week */
997
+ avgCoverage: number;
998
+ /** Coverage at start of week */
999
+ startCoverage: number;
1000
+ /** Coverage at end of week */
1001
+ endCoverage: number;
1002
+ /** Change during the week */
1003
+ delta: number;
1004
+ /** Number of snapshots in the week */
1005
+ snapshotCount: number;
1006
+ }
1007
+ /**
1008
+ * Extended trend analysis result.
1009
+ */
1010
+ interface ExtendedTrendAnalysis {
1011
+ /** Current trend data */
1012
+ trend: CoverageTrend;
1013
+ /** Weekly summaries (most recent first) */
1014
+ weeklySummaries: WeeklySummary[];
1015
+ /** 7-day velocity (average daily change) */
1016
+ velocity7d: number;
1017
+ /** 30-day velocity */
1018
+ velocity30d: number;
1019
+ /** 90-day velocity (Pro only) */
1020
+ velocity90d?: number;
1021
+ /** Projected coverage in 30 days (based on velocity) */
1022
+ projected30d: number;
1023
+ /** Best coverage ever recorded */
1024
+ allTimeHigh: number;
1025
+ /** Worst coverage ever recorded */
1026
+ allTimeLow: number;
1027
+ /** Date range of available data */
1028
+ dataRange: {
1029
+ start: string;
1030
+ end: string;
1031
+ } | null;
1032
+ }
1033
+ /**
1034
+ * Compute a coverage snapshot from an OpenPkg spec.
1035
+ */
1036
+ declare function computeSnapshot(spec: OpenPkg5, options?: {
1037
+ commit?: string;
1038
+ branch?: string;
1039
+ }): CoverageSnapshot;
1040
+ /**
1041
+ * Save a coverage snapshot to history.
1042
+ *
1043
+ * @param snapshot - The snapshot to save
1044
+ * @param cwd - Working directory
1045
+ */
1046
+ declare function saveSnapshot(snapshot: CoverageSnapshot, cwd: string): void;
1047
+ /**
1048
+ * Load all historical snapshots.
1049
+ *
1050
+ * @param cwd - Working directory
1051
+ * @returns Array of snapshots sorted by timestamp (most recent first)
1052
+ */
1053
+ declare function loadSnapshots(cwd: string): CoverageSnapshot[];
1054
+ /**
1055
+ * Get coverage trend data.
1056
+ *
1057
+ * @param spec - Current OpenPkg spec
1058
+ * @param cwd - Working directory
1059
+ * @param options - Optional git metadata
1060
+ * @returns Trend data with history and delta
1061
+ */
1062
+ declare function getTrend(spec: OpenPkg5, cwd: string, options?: {
1063
+ commit?: string;
1064
+ branch?: string;
1065
+ }): CoverageTrend;
1066
+ /**
1067
+ * Generate a sparkline character representation.
1068
+ *
1069
+ * @param values - Array of values (0-100 for coverage)
1070
+ * @returns Sparkline string using unicode characters
1071
+ */
1072
+ declare function renderSparkline(values: number[]): string;
1073
+ /**
1074
+ * Format a delta value with arrow and color indicator.
1075
+ *
1076
+ * @param delta - Coverage delta (positive = improvement)
1077
+ * @returns Formatted delta string
1078
+ */
1079
+ declare function formatDelta(delta: number): string;
1080
+ /**
1081
+ * Prune old snapshots to keep history manageable.
1082
+ *
1083
+ * @param cwd - Working directory
1084
+ * @param keepCount - Number of snapshots to keep (default: 100)
1085
+ * @returns Number of snapshots deleted
1086
+ */
1087
+ declare function pruneHistory(cwd: string, keepCount?: number): number;
1088
+ /**
1089
+ * Prune snapshots based on tier retention policy.
1090
+ *
1091
+ * @param cwd - Working directory
1092
+ * @param tier - Retention tier (free: 7d, team: 30d, pro: 90d)
1093
+ * @returns Number of snapshots deleted
1094
+ */
1095
+ declare function pruneByTier(cwd: string, tier: RetentionTier): number;
1096
+ /**
1097
+ * Load snapshots within a date range.
1098
+ *
1099
+ * @param cwd - Working directory
1100
+ * @param days - Number of days to include
1101
+ * @returns Filtered snapshots
1102
+ */
1103
+ declare function loadSnapshotsForDays(cwd: string, days: number): CoverageSnapshot[];
1104
+ /**
1105
+ * Generate weekly summaries from snapshots.
1106
+ *
1107
+ * @param snapshots - Snapshots to summarize (most recent first)
1108
+ * @returns Weekly summaries (most recent first)
1109
+ */
1110
+ declare function generateWeeklySummaries(snapshots: CoverageSnapshot[]): WeeklySummary[];
1111
+ /**
1112
+ * Get extended trend analysis with velocity and projections.
1113
+ *
1114
+ * @param spec - Current OpenPkg spec
1115
+ * @param cwd - Working directory
1116
+ * @param options - Analysis options
1117
+ * @returns Extended trend analysis
1118
+ */
1119
+ declare function getExtendedTrend(spec: OpenPkg5, cwd: string, options?: {
1120
+ commit?: string;
1121
+ branch?: string;
1122
+ tier?: RetentionTier;
1123
+ }): ExtendedTrendAnalysis;
1124
+ /**
728
1125
  * Compute a hash of file contents.
729
1126
  * Uses truncated SHA-256 for balance of speed and collision resistance.
730
1127
  *
@@ -755,7 +1152,7 @@ declare function hashFiles(filePaths: string[], cwd: string): Record<string, str
755
1152
  * @returns Array of file paths that changed, were added, or were removed
756
1153
  */
757
1154
  declare function diffHashes(cached: Record<string, string>, current: Record<string, string>): string[];
758
- import { OpenPkg as OpenPkg5 } from "@openpkg-ts/spec";
1155
+ import { OpenPkg as OpenPkg6 } from "@openpkg-ts/spec";
759
1156
  /** Current cache format version */
760
1157
  declare const CACHE_VERSION = "1.0.0";
761
1158
  /** Default cache file path */
@@ -790,7 +1187,7 @@ interface SpecCache {
790
1187
  /** Analysis configuration that affects output */
791
1188
  config: SpecCacheConfig;
792
1189
  /** The cached OpenPkg spec */
793
- spec: OpenPkg5;
1190
+ spec: OpenPkg6;
794
1191
  }
795
1192
  /**
796
1193
  * Result of cache validation.
@@ -833,7 +1230,7 @@ declare function loadSpecCache(cwd: string): SpecCache | null;
833
1230
  * @param spec - OpenPkg spec to cache
834
1231
  * @param context - Cache context with file paths and config
835
1232
  */
836
- declare function saveSpecCache(spec: OpenPkg5, context: CacheContext): void;
1233
+ declare function saveSpecCache(spec: OpenPkg6, context: CacheContext): void;
837
1234
  /**
838
1235
  * Validate if cached spec is still valid.
839
1236
  *
@@ -865,6 +1262,160 @@ declare function clearSpecCache(cwd: string): boolean;
865
1262
  */
866
1263
  declare function getSpecCachePath(cwd: string): string;
867
1264
  /**
1265
+ * A single CODEOWNERS rule.
1266
+ */
1267
+ interface CodeOwnerRule {
1268
+ /** Line number in the CODEOWNERS file (1-indexed) */
1269
+ line: number;
1270
+ /** The glob pattern for matching files */
1271
+ pattern: string;
1272
+ /** List of owners (e.g., @user, @org/team, email) */
1273
+ owners: string[];
1274
+ }
1275
+ /**
1276
+ * Parsed CODEOWNERS file.
1277
+ */
1278
+ interface CodeOwnersFile {
1279
+ /** Path to the CODEOWNERS file */
1280
+ filePath: string;
1281
+ /** All parsed rules (in order, later rules take precedence) */
1282
+ rules: CodeOwnerRule[];
1283
+ }
1284
+ /**
1285
+ * Coverage stats for a single owner.
1286
+ */
1287
+ interface OwnerCoverageStats {
1288
+ /** The owner identifier */
1289
+ owner: string;
1290
+ /** Total exports owned */
1291
+ totalExports: number;
1292
+ /** Documented exports (has description) */
1293
+ documentedExports: number;
1294
+ /** Coverage percentage */
1295
+ coverageScore: number;
1296
+ /** Exports with drift issues */
1297
+ exportsWithDrift: number;
1298
+ /** Drift percentage */
1299
+ driftScore: number;
1300
+ /** Exports missing @example */
1301
+ missingExamples: number;
1302
+ /** List of undocumented names */
1303
+ undocumentedExports: string[];
1304
+ }
1305
+ /**
1306
+ * Result of ownership analysis.
1307
+ */
1308
+ interface OwnershipAnalysisResult {
1309
+ /** Path to the CODEOWNERS file used */
1310
+ codeownersPath: string;
1311
+ /** Stats per owner */
1312
+ byOwner: Map<string, OwnerCoverageStats>;
1313
+ /** Exports with no matching owner */
1314
+ unowned: EnrichedExport[];
1315
+ /** Total exports analyzed */
1316
+ totalExports: number;
1317
+ }
1318
+ /**
1319
+ * Parse a CODEOWNERS file content into rules.
1320
+ */
1321
+ declare function parseCodeOwners(content: string): CodeOwnerRule[];
1322
+ /**
1323
+ * Find and load CODEOWNERS file from a directory.
1324
+ */
1325
+ declare function loadCodeOwners(baseDir: string): CodeOwnersFile | null;
1326
+ /**
1327
+ * Find owners for a file path based on CODEOWNERS rules.
1328
+ * Returns the owners from the last matching rule (CODEOWNERS precedence).
1329
+ */
1330
+ declare function findOwners(filePath: string, rules: CodeOwnerRule[]): string[];
1331
+ /**
1332
+ * Attribute owners to exports based on their source file paths.
1333
+ */
1334
+ declare function attributeOwners(exports: EnrichedExport[], rules: CodeOwnerRule[], baseDir: string): Map<EnrichedExport, string[]>;
1335
+ /**
1336
+ * Analyze ownership and coverage breakdown by owner.
1337
+ */
1338
+ declare function analyzeOwnership(spec: EnrichedOpenPkg, codeowners: CodeOwnersFile, baseDir: string): OwnershipAnalysisResult;
1339
+ /**
1340
+ * Options for ownership analysis.
1341
+ */
1342
+ interface AnalyzeOwnershipOptions {
1343
+ /** Base directory for the project */
1344
+ baseDir: string;
1345
+ }
1346
+ /**
1347
+ * Load CODEOWNERS and analyze ownership for a spec.
1348
+ * Returns null if no CODEOWNERS file is found.
1349
+ */
1350
+ declare function analyzeSpecOwnership(spec: EnrichedOpenPkg, options: AnalyzeOwnershipOptions): OwnershipAnalysisResult | null;
1351
+ /**
1352
+ * Git blame info for a single line.
1353
+ */
1354
+ interface BlameInfo {
1355
+ /** Commit hash */
1356
+ commit: string;
1357
+ /** Author name */
1358
+ author: string;
1359
+ /** Author email */
1360
+ email: string;
1361
+ /** Line number (1-indexed) */
1362
+ line: number;
1363
+ /** Timestamp */
1364
+ timestamp: number;
1365
+ }
1366
+ /**
1367
+ * Stats for a single contributor.
1368
+ */
1369
+ interface ContributorStats {
1370
+ /** Contributor name */
1371
+ name: string;
1372
+ /** Contributor email */
1373
+ email: string;
1374
+ /** Number of exports this contributor documented */
1375
+ documentedExports: number;
1376
+ /** Names of exports documented by this contributor */
1377
+ exports: string[];
1378
+ /** Number of JSDoc lines authored */
1379
+ linesAuthored: number;
1380
+ /** Most recent documentation contribution */
1381
+ lastContribution: Date | null;
1382
+ }
1383
+ /**
1384
+ * Result of contributor analysis.
1385
+ */
1386
+ interface ContributorAnalysisResult {
1387
+ /** Stats per contributor */
1388
+ byContributor: Map<string, ContributorStats>;
1389
+ /** Total documented exports analyzed */
1390
+ totalDocumented: number;
1391
+ /** Exports that couldn't be attributed (no git history) */
1392
+ unattributed: string[];
1393
+ }
1394
+ /**
1395
+ * Get git blame for a file.
1396
+ */
1397
+ declare function getFileBlame(filePath: string, cwd: string): BlameInfo[] | null;
1398
+ /**
1399
+ * Get blame info for specific line range.
1400
+ */
1401
+ declare function getBlameForLines(filePath: string, startLine: number, endLine: number, cwd: string): BlameInfo[] | null;
1402
+ /**
1403
+ * Analyze contributors for documented exports.
1404
+ */
1405
+ declare function analyzeContributors(spec: EnrichedOpenPkg, baseDir: string): ContributorAnalysisResult;
1406
+ /**
1407
+ * Options for contributor analysis.
1408
+ */
1409
+ interface AnalyzeContributorsOptions {
1410
+ /** Base directory for the project (must be a git repo) */
1411
+ baseDir: string;
1412
+ }
1413
+ /**
1414
+ * Analyze spec contributors.
1415
+ * Returns null if not in a git repository.
1416
+ */
1417
+ declare function analyzeSpecContributors(spec: EnrichedOpenPkg, options: AnalyzeContributorsOptions): ContributorAnalysisResult | null;
1418
+ /**
868
1419
  * Configuration types for DocCov.
869
1420
  * These types are shared between CLI and API.
870
1421
  */
@@ -910,6 +1461,20 @@ interface QualityRulesConfig {
910
1461
  rules?: Record<string, QualitySeverity2>;
911
1462
  }
912
1463
  /**
1464
+ * Per-path policy configuration.
1465
+ * Allows setting different coverage requirements for different parts of the codebase.
1466
+ */
1467
+ interface PolicyConfig {
1468
+ /** Glob pattern to match file paths (e.g., "packages/public-api/**") */
1469
+ path: string;
1470
+ /** Minimum coverage percentage required for matched paths (0-100) */
1471
+ minCoverage?: number;
1472
+ /** Maximum drift percentage allowed for matched paths (0-100) */
1473
+ maxDrift?: number;
1474
+ /** Require @example blocks on all matched exports */
1475
+ requireExamples?: boolean;
1476
+ }
1477
+ /**
913
1478
  * Normalized DocCov configuration.
914
1479
  * This is the parsed/normalized form used by commands.
915
1480
  */
@@ -926,6 +1491,8 @@ interface DocCovConfig {
926
1491
  check?: CheckConfig;
927
1492
  /** Quality rules configuration */
928
1493
  quality?: QualityRulesConfig;
1494
+ /** Per-path coverage policies (Pro tier) */
1495
+ policies?: PolicyConfig[];
929
1496
  }
930
1497
  /**
931
1498
  * Define a DocCov configuration.
@@ -1368,20 +1935,19 @@ interface ExampleValidationResult {
1368
1935
  * - `run`: executes examples (doesn't require presence or typecheck)
1369
1936
  */
1370
1937
  declare function validateExamples(exports: SpecExport4[], options: ExampleValidationOptions): Promise<ExampleValidationResult>;
1371
- interface DocCovOptions {
1372
- includePrivate?: boolean;
1373
- followImports?: boolean;
1374
- maxDepth?: number;
1375
- resolveExternalTypes?: boolean;
1376
- /** Enable spec caching (default: true) */
1377
- useCache?: boolean;
1378
- /** Working directory for cache operations (default: process.cwd()) */
1379
- cwd?: string;
1380
- }
1381
1938
  declare function extractPackageSpec(entryFile: string, packageDir?: string, content?: string, options?: DocCovOptions): Promise<OpenPkgSpec>;
1939
+ /**
1940
+ * Release stage/visibility tags that can be used for filtering.
1941
+ * Based on TSDoc release tags.
1942
+ */
1943
+ type ReleaseTag = "public" | "beta" | "alpha" | "internal";
1382
1944
  interface FilterOptions {
1945
+ /** Include exports matching these patterns */
1383
1946
  include?: string[];
1947
+ /** Exclude exports matching these patterns */
1384
1948
  exclude?: string[];
1949
+ /** Filter by visibility/release stage (e.g., ['public', 'beta']) */
1950
+ visibility?: ReleaseTag[];
1385
1951
  }
1386
1952
  /**
1387
1953
  * Source of filter options.
@@ -1475,7 +2041,7 @@ declare function categorizeDrifts(drifts: SpecDocDrift4[]): {
1475
2041
  fixable: SpecDocDrift4[];
1476
2042
  nonFixable: SpecDocDrift4[];
1477
2043
  };
1478
- import { OpenPkg as OpenPkg6 } from "@openpkg-ts/spec";
2044
+ import { OpenPkg as OpenPkg7 } from "@openpkg-ts/spec";
1479
2045
  /**
1480
2046
  * Parsed components of a GitHub URL.
1481
2047
  */
@@ -1568,7 +2134,16 @@ declare function buildRawUrl(parsed: ParsedGitHubUrl, filePath: string): string;
1568
2134
  * }
1569
2135
  * ```
1570
2136
  */
1571
- declare function fetchSpecFromGitHub(parsed: ParsedGitHubUrl): Promise<OpenPkg6 | null>;
2137
+ declare function fetchSpecFromGitHub(parsed: ParsedGitHubUrl): Promise<OpenPkg7 | null>;
2138
+ /**
2139
+ * Options for fetching a spec from GitHub.
2140
+ */
2141
+ interface FetchSpecOptions {
2142
+ /** Git ref (branch or tag). Default: 'main' */
2143
+ ref?: string;
2144
+ /** Path to openpkg.json (for monorepos). Default: 'openpkg.json' */
2145
+ path?: string;
2146
+ }
1572
2147
  /**
1573
2148
  * Fetch an OpenPkg spec from a GitHub repository by owner/repo/branch.
1574
2149
  *
@@ -1576,10 +2151,10 @@ declare function fetchSpecFromGitHub(parsed: ParsedGitHubUrl): Promise<OpenPkg6
1576
2151
  *
1577
2152
  * @param owner - Repository owner
1578
2153
  * @param repo - Repository name
1579
- * @param branch - Branch name (default: 'main')
2154
+ * @param branchOrOptions - Branch name (default: 'main') or options object
1580
2155
  * @returns The OpenPkg spec, or null if not found
1581
2156
  */
1582
- declare function fetchSpec(owner: string, repo: string, branch?: string): Promise<OpenPkg6 | null>;
2157
+ declare function fetchSpec(owner: string, repo: string, branchOrOptions?: string | FetchSpecOptions): Promise<OpenPkg7 | null>;
1583
2158
  /**
1584
2159
  * Progress event for installation status updates.
1585
2160
  */
@@ -1838,7 +2413,7 @@ declare function getDocumentedExports(markdownFiles: MarkdownDocFile[], exportNa
1838
2413
  * Get all exports that lack documentation
1839
2414
  */
1840
2415
  declare function getUndocumentedExports(markdownFiles: MarkdownDocFile[], exportNames: string[]): string[];
1841
- import { CategorizedBreaking, OpenPkg as OpenPkg8, SpecDiff as SpecDiff2 } from "@openpkg-ts/spec";
2416
+ import { CategorizedBreaking, OpenPkg as OpenPkg9, SpecDiff as SpecDiff2 } from "@openpkg-ts/spec";
1842
2417
  /**
1843
2418
  * Extended spec diff result with docs impact
1844
2419
  */
@@ -1884,7 +2459,7 @@ interface DiffWithDocsOptions {
1884
2459
  * }
1885
2460
  * ```
1886
2461
  */
1887
- declare function diffSpecWithDocs(oldSpec: OpenPkg8, newSpec: OpenPkg8, options?: DiffWithDocsOptions): SpecDiffWithDocs;
2462
+ declare function diffSpecWithDocs(oldSpec: OpenPkg9, newSpec: OpenPkg9, options?: DiffWithDocsOptions): SpecDiffWithDocs;
1888
2463
  /**
1889
2464
  * Check if a diff has any docs impact
1890
2465
  */
@@ -2009,6 +2584,11 @@ declare class DocCov {
2009
2584
  */
2010
2585
  private tryLoadFromCache;
2011
2586
  /**
2587
+ * Get current source files from a fresh TypeScript program.
2588
+ * Used for cache validation to detect new files.
2589
+ */
2590
+ private getCurrentSourceFiles;
2591
+ /**
2012
2592
  * Save analysis result to cache.
2013
2593
  */
2014
2594
  private saveToCache;
@@ -2020,6 +2600,11 @@ declare class DocCov {
2020
2600
  * Find package.json starting from a directory.
2021
2601
  */
2022
2602
  private findPackageJson;
2603
+ /**
2604
+ * Opportunistically detect Standard Schema exports from compiled modules.
2605
+ * Returns undefined if detection fails or no schemas found (fallback to AST).
2606
+ */
2607
+ private detectSchemas;
2023
2608
  private normalizeDiagnostic;
2024
2609
  private mapSeverity;
2025
2610
  private normalizeMetadata;
@@ -2027,6 +2612,64 @@ declare class DocCov {
2027
2612
  }
2028
2613
  declare function analyze(code: string, options?: AnalyzeOptions): Promise<OpenPkgSpec>;
2029
2614
  declare function analyzeFile(filePath: string, options?: AnalyzeOptions): Promise<OpenPkgSpec>;
2615
+ /**
2616
+ * Result of evaluating a single policy.
2617
+ */
2618
+ interface PolicyResult {
2619
+ /** The policy that was evaluated */
2620
+ policy: PolicyConfig;
2621
+ /** Exports that matched this policy's path pattern */
2622
+ matchedExports: EnrichedExport[];
2623
+ /** Coverage score for matched exports (0-100) */
2624
+ coverageScore: number;
2625
+ /** Drift score for matched exports (0-100, percentage of exports with drift) */
2626
+ driftScore: number;
2627
+ /** Number of matched exports missing @example */
2628
+ missingExamples: number;
2629
+ /** Whether the policy passed all configured thresholds */
2630
+ passed: boolean;
2631
+ /** Specific failures for this policy */
2632
+ failures: PolicyFailure[];
2633
+ }
2634
+ /**
2635
+ * A specific policy failure.
2636
+ */
2637
+ interface PolicyFailure {
2638
+ type: "coverage" | "drift" | "examples";
2639
+ message: string;
2640
+ actual: number;
2641
+ threshold: number;
2642
+ }
2643
+ /**
2644
+ * Result of evaluating all policies.
2645
+ */
2646
+ interface PolicyEvaluationResult {
2647
+ /** Results for each policy */
2648
+ results: PolicyResult[];
2649
+ /** Whether all policies passed */
2650
+ allPassed: boolean;
2651
+ /** Total number of policies */
2652
+ totalPolicies: number;
2653
+ /** Number of policies that passed */
2654
+ passedCount: number;
2655
+ /** Number of policies that failed */
2656
+ failedCount: number;
2657
+ }
2658
+ /**
2659
+ * Evaluate a single policy against a set of exports.
2660
+ */
2661
+ declare function evaluatePolicy(policy: PolicyConfig, allExports: EnrichedExport[], baseDir?: string): PolicyResult;
2662
+ /**
2663
+ * Options for evaluating policies.
2664
+ */
2665
+ interface EvaluatePoliciesOptions {
2666
+ /** Base directory for resolving relative paths in policies */
2667
+ baseDir?: string;
2668
+ }
2669
+ /**
2670
+ * Evaluate all policies against a spec's exports.
2671
+ */
2672
+ declare function evaluatePolicies(policies: PolicyConfig[], spec: EnrichedOpenPkg, options?: EvaluatePoliciesOptions): PolicyEvaluationResult;
2030
2673
  import { SpecExport as SpecExport6 } from "@openpkg-ts/spec";
2031
2674
  import { SpecExportKind as SpecExportKind2 } from "@openpkg-ts/spec";
2032
2675
  /**
@@ -2034,6 +2677,11 @@ import { SpecExportKind as SpecExportKind2 } from "@openpkg-ts/spec";
2034
2677
  */
2035
2678
  declare const CORE_RULES: QualityRule[];
2036
2679
  /**
2680
+ * TSDoc Strictness rules - match API Extractor's TSDoc compliance.
2681
+ * These help maintain consistent, high-quality documentation.
2682
+ */
2683
+ declare const TSDOC_RULES: QualityRule[];
2684
+ /**
2037
2685
  * Style rules - these don't affect coverage, only lint.
2038
2686
  */
2039
2687
  declare const STYLE_RULES: QualityRule[];
@@ -2063,9 +2711,10 @@ declare function getDefaultConfig(): Record<string, QualitySeverity>;
2063
2711
  * @param exp - The to evaluate
2064
2712
  * @param rawJSDoc - Optional raw JSDoc text for regex-based checks
2065
2713
  * @param config - Quality configuration with rule severities
2714
+ * @param exportRegistry - Optional registry of all exported names for spec-level rules
2066
2715
  * @returns Quality result with coverage score and violations
2067
2716
  */
2068
- declare function evaluateExportQuality(exp: SpecExport6, rawJSDoc?: string, config?: QualityConfig): QualityResult;
2717
+ declare function evaluateExportQuality(exp: SpecExport6, rawJSDoc?: string, config?: QualityConfig, exportRegistry?: Set<string>): QualityResult;
2069
2718
  /**
2070
2719
  * Evaluate quality for multiple exports.
2071
2720
  *
@@ -2138,6 +2787,90 @@ interface ResolvedTarget {
2138
2787
  */
2139
2788
  declare function resolveTarget(fs: FileSystem, options: ResolveTargetOptions): Promise<ResolvedTarget>;
2140
2789
  /**
2790
+ * Repository metadata from GitHub API.
2791
+ */
2792
+ interface GitHubRepoMetadata {
2793
+ owner: string;
2794
+ repo: string;
2795
+ defaultBranch: string;
2796
+ description: string | null;
2797
+ language: string | null;
2798
+ topics: string[];
2799
+ isPrivate: boolean;
2800
+ }
2801
+ /**
2802
+ * Detected package manager from lockfile.
2803
+ */
2804
+ type DetectedPackageManager = "npm" | "yarn" | "pnpm" | "bun" | "unknown";
2805
+ /**
2806
+ * Workspace/monorepo configuration.
2807
+ */
2808
+ interface WorkspaceConfig {
2809
+ isMonorepo: boolean;
2810
+ tool?: "npm" | "yarn" | "pnpm" | "lerna" | "turborepo" | "nx";
2811
+ packages?: string[];
2812
+ }
2813
+ /**
2814
+ * Build hints detected from project files.
2815
+ */
2816
+ interface BuildHints {
2817
+ hasTypeScript: boolean;
2818
+ hasWasm: boolean;
2819
+ hasNativeModules: boolean;
2820
+ hasBuildScript: boolean;
2821
+ buildScript?: string;
2822
+ frameworks: string[];
2823
+ }
2824
+ /**
2825
+ * Complete project context for build plan generation.
2826
+ */
2827
+ interface GitHubProjectContext {
2828
+ /** Repository metadata */
2829
+ metadata: GitHubRepoMetadata;
2830
+ /** Git ref being analyzed */
2831
+ ref: string;
2832
+ /** Detected package manager */
2833
+ packageManager: DetectedPackageManager;
2834
+ /** Workspace/monorepo configuration */
2835
+ workspace: WorkspaceConfig;
2836
+ /** Build hints from project files */
2837
+ buildHints: BuildHints;
2838
+ /** Raw file contents for AI analysis */
2839
+ files: {
2840
+ packageJson?: string;
2841
+ tsconfigJson?: string;
2842
+ lockfile?: {
2843
+ name: string;
2844
+ content: string;
2845
+ };
2846
+ };
2847
+ }
2848
+ /**
2849
+ * Parse GitHub URL into owner and repo.
2850
+ * Uses the richer parseGitHubUrl from github/index.ts, returning null on error.
2851
+ */
2852
+ declare function parseGitHubUrl2(url: string): {
2853
+ owner: string;
2854
+ repo: string;
2855
+ } | null;
2856
+ /**
2857
+ * Options for fetching GitHub project context.
2858
+ */
2859
+ interface FetchGitHubContextOptions {
2860
+ /** Git ref (branch, tag, or SHA). Defaults to default branch. */
2861
+ ref?: string;
2862
+ /** Auth token for private repos (GitHub App installation token or PAT). */
2863
+ authToken?: string;
2864
+ }
2865
+ /**
2866
+ * Fetch complete project context from GitHub.
2867
+ */
2868
+ declare function fetchGitHubContext(repoUrl: string, refOrOptions?: string | FetchGitHubContextOptions): Promise<GitHubProjectContext>;
2869
+ /**
2870
+ * List packages in a monorepo workspace.
2871
+ */
2872
+ declare function listWorkspacePackages(owner: string, repo: string, ref: string, patterns: string[], authToken?: string): Promise<string[]>;
2873
+ /**
2141
2874
  * A documentation drift issue in a spec summary.
2142
2875
  */
2143
2876
  interface SummaryDriftIssue {
@@ -2295,81 +3028,6 @@ interface BuildPlanExecutionResult {
2295
3028
  error?: string;
2296
3029
  }
2297
3030
  /**
2298
- * Repository metadata from GitHub API.
2299
- */
2300
- interface GitHubRepoMetadata {
2301
- owner: string;
2302
- repo: string;
2303
- defaultBranch: string;
2304
- description: string | null;
2305
- language: string | null;
2306
- topics: string[];
2307
- isPrivate: boolean;
2308
- }
2309
- /**
2310
- * Detected package manager from lockfile.
2311
- */
2312
- type DetectedPackageManager = "npm" | "yarn" | "pnpm" | "bun" | "unknown";
2313
- /**
2314
- * Workspace/monorepo configuration.
2315
- */
2316
- interface WorkspaceConfig {
2317
- isMonorepo: boolean;
2318
- tool?: "npm" | "yarn" | "pnpm" | "lerna" | "turborepo" | "nx";
2319
- packages?: string[];
2320
- }
2321
- /**
2322
- * Build hints detected from project files.
2323
- */
2324
- interface BuildHints {
2325
- hasTypeScript: boolean;
2326
- hasWasm: boolean;
2327
- hasNativeModules: boolean;
2328
- hasBuildScript: boolean;
2329
- buildScript?: string;
2330
- frameworks: string[];
2331
- }
2332
- /**
2333
- * Complete project context for build plan generation.
2334
- */
2335
- interface GitHubProjectContext {
2336
- /** Repository metadata */
2337
- metadata: GitHubRepoMetadata;
2338
- /** Git ref being analyzed */
2339
- ref: string;
2340
- /** Detected package manager */
2341
- packageManager: DetectedPackageManager;
2342
- /** Workspace/monorepo configuration */
2343
- workspace: WorkspaceConfig;
2344
- /** Build hints from project files */
2345
- buildHints: BuildHints;
2346
- /** Raw file contents for AI analysis */
2347
- files: {
2348
- packageJson?: string;
2349
- tsconfigJson?: string;
2350
- lockfile?: {
2351
- name: string;
2352
- content: string;
2353
- };
2354
- };
2355
- }
2356
- /**
2357
- * Parse GitHub URL into owner and repo.
2358
- * Uses the richer parseGitHubUrl from github/index.ts, returning null on error.
2359
- */
2360
- declare function parseGitHubUrl2(url: string): {
2361
- owner: string;
2362
- repo: string;
2363
- } | null;
2364
- /**
2365
- * Fetch complete project context from GitHub.
2366
- */
2367
- declare function fetchGitHubContext(repoUrl: string, ref?: string): Promise<GitHubProjectContext>;
2368
- /**
2369
- * List packages in a monorepo workspace.
2370
- */
2371
- declare function listWorkspacePackages(owner: string, repo: string, ref: string, patterns: string[]): Promise<string[]>;
2372
- /**
2373
3031
  * Type-check a single example
2374
3032
  */
2375
3033
  declare function typecheckExample(example: string, packagePath: string, options?: TypecheckOptions): ExampleTypeError[];
@@ -2377,4 +3035,4 @@ declare function typecheckExample(example: string, packagePath: string, options?
2377
3035
  * Type-check multiple examples
2378
3036
  */
2379
3037
  declare function typecheckExamples(examples: string[], packagePath: string, options?: TypecheckOptions): TypecheckResult;
2380
- export { validateSpecCache, validateExamples, typecheckExamples, typecheckExample, shouldValidate, serializeJSDoc, saveSpecCache, saveReport, safeParseJson, runExamplesWithPackage, runExamples, runExample, resolveTarget, readPackageJson, parseGitHubUrl2 as parseScanGitHubUrl, parseMarkdownFiles, parseMarkdownFile, parseListFlag, parseJSDocToPatch, parseGitHubUrl, parseExamplesFlag, parseAssertions, mergeFixes, mergeFilters, mergeConfig, loadSpecCache, loadCachedReport, listWorkspacePackages, isFixableDrift, isExecutableLang, isCachedReportValid, installDependencies, hashString, hashFiles, hashFile, hasNonAssertionComments, hasDocsImpact, hasDocsForExport, groupDriftsByCategory, getUndocumentedExports, getSpecCachePath, getRunCommand, getRulesForKind, getRule, getReportPath, getPrimaryBuildScript, getInstallCommand, getDriftSummary, getDocumentedExports, getDocsImpactSummary, getDiffReportPath, getDefaultConfig, getCoverageRules, generateReportFromEnriched, generateReport, generateFixesForExport, generateFix, formatPackageList, formatDriftSummaryLine, findRemovedReferences, findPackageByName, findJSDocLocation, findExportReferences, findDeprecatedReferences, fetchSpecFromGitHub, fetchSpec, fetchGitHubContext, extractSpecSummary, extractPackageSpec, extractImports, extractFunctionCalls, evaluateQuality, evaluateExportQuality, ensureSpecCoverage, enrichSpec, diffSpecWithDocs, diffHashes, detectPackageManager, detectMonorepo, detectExampleRuntimeErrors, detectExampleAssertionFailures, detectEntryPoint, detectBuildInfo, defineConfig, createSourceFile, createNodeCommandRunner, computeExportDrift, computeDrift, clearSpecCache, categorizeDrifts, categorizeDrift, calculateAggregateCoverage, buildRawUrl, buildExportRegistry, buildDisplayUrl, buildCloneUrl, blockReferencesExport, applyPatchToJSDoc, applyEdits, analyzeProject2 as analyzeProject, analyzeFile, analyzeDocsImpact, analyze, WorkspacePackage, WorkspaceConfig, VALIDATION_INFO, TypecheckValidationResult, TypecheckResult, TypecheckOptions, SummaryDriftIssue, SpecSummary, SpecDiffWithDocs, SpecCacheConfig, SpecCache, SandboxFileSystem, STYLE_RULES, SPEC_CACHE_FILE, RuntimeDrift, RunValidationResult, RunExamplesWithPackageResult, RunExamplesWithPackageOptions, RunExampleOptions, RuleContext, ResolvedTarget, ResolvedFilters, ResolveTargetOptions, REPORT_VERSION, REPORT_EXTENSIONS, QualityViolation, QualitySeverity2 as QualitySeverity, QualityRulesConfig, QualityRule, QualityResult, QualityConfig, ProjectInfo, PresenceResult, ParsedGitHubUrl, PackageManagerInfo, PackageManager, PackageJson, PackageExports, OpenPkgSpec, NodeFileSystem, MonorepoType, MonorepoInfo, MemberChange, MarkdownDocFile, MarkdownCodeBlock, LLMAssertion, JSDocTag, JSDocReturn, JSDocPatch, JSDocParam, JSDocEdit, InstallResult, InstallOptions, GitHubRepoMetadata, GitHubProjectContext, FixType, FixSuggestion, FilterSource, FilterOptions, FileSystem, ExportReference, ExportDriftResult, ExportCoverageData, ExampleValidationTypeError, ExampleValidationResult, ExampleValidationOptions, ExampleValidationMode, ExampleValidation, ExampleTypeError, ExampleRunResult, EntryPointSource, EntryPointInfo, EnrichedOpenPkg, EnrichedExport, EnrichedDocsMetadata, EnrichOptions, DriftSummary, DriftResult, DriftReportSummary, DriftReport, DocsImpactResult, DocsImpactReference, DocsImpact, DocsConfig, DocsChangeType, DocCovReport, DocCovOptions, DocCovConfig, DocCov, DiffWithDocsOptions, Diagnostic2 as Diagnostic, DetectedPackageManager, DEFAULT_REPORT_PATH, DEFAULT_REPORT_DIR, CoverageSummary, CommandRunner, CommandResult, CheckConfig, CategorizedDrift, CacheValidationResult, CacheContext, CORE_RULES, CACHE_VERSION, BuildPlanTarget, BuildPlanStepResult, BuildPlanStep, BuildPlanExecutionResult, BuildPlanEnvironment, BuildPlan, BuildInfo, BuildHints, BUILTIN_RULES, ApplyEditsResult, AnalyzeProjectOptions, AnalyzeOptions, AnalysisResult, AggregateQualityResult, ALL_VALIDATIONS };
3038
+ export { validateSpecCache, validateExamples, typecheckExamples, typecheckExample, tryExtractStandardSchema, shouldValidate, serializeJSDoc, saveSpecCache, saveSnapshot, saveReport, safeParseJson, runExamplesWithPackage, runExamples, runExample, resolveTarget, renderSparkline, renderApiSurface, readPackageJson, pruneHistory, pruneByTier, parseGitHubUrl2 as parseScanGitHubUrl, parseMarkdownFiles, parseMarkdownFile, parseListFlag, parseJSDocToPatch, parseGitHubUrl, parseExamplesFlag, parseCodeOwners, parseAssertions, mergeFixes, mergeFilters, mergeConfig, loadSpecCache, loadSnapshotsForDays, loadSnapshots, loadCodeOwners, loadCachedReport, listWorkspacePackages, isStandardJSONSchema, isFixableDrift, isExecutableLang, isCachedReportValid, installDependencies, hashString, hashFiles, hashFile, hasNonAssertionComments, hasDocsImpact, hasDocsForExport, groupDriftsByCategory, getUndocumentedExports, getTrend, getSpecCachePath, getRunCommand, getRulesForKind, getRule, getReportPath, getPrimaryBuildScript, getInstallCommand, getFileBlame, getExtendedTrend, getDriftSummary, getDocumentedExports, getDocsImpactSummary, getDiffReportPath, getDefaultConfig, getCoverageRules, getBlameForLines, generateWeeklySummaries, generateReportFromEnriched, generateReport, generateFixesForExport, generateFix, formatPackageList, formatDriftSummaryLine, formatDelta, findRemovedReferences, findPackageByName, findOwners, findJSDocLocation, findExportReferences, findDeprecatedReferences, fetchSpecFromGitHub, fetchSpec, fetchGitHubContext, extractViaStandardSchema, extractSpecSummary, extractPackageSpec, extractImports, extractFunctionCalls, evaluateQuality, evaluatePolicy, evaluatePolicies, evaluateExportQuality, ensureSpecCoverage, enrichSpec, diffSpecWithDocs, diffHashes, detectRuntimeSchemas, detectPackageManager, detectMonorepo, detectExampleRuntimeErrors, detectExampleAssertionFailures, detectEntryPoint, detectBuildInfo, defineConfig, createSourceFile, createNodeCommandRunner, computeSnapshot, computeExportDrift, computeDrift, clearSpecCache, clearSchemaCache, categorizeDrifts, categorizeDrift, calculateAggregateCoverage, buildRawUrl, buildExportRegistry, buildDisplayUrl, buildCloneUrl, blockReferencesExport, attributeOwners, applyPatchToJSDoc, applyEdits, analyzeSpecOwnership, analyzeSpecContributors, analyzeProject2 as analyzeProject, analyzeOwnership, analyzeFile, analyzeDocsImpact, analyzeContributors, analyze, WorkspacePackage, WorkspaceConfig, WeeklySummary, VALIDATION_INFO, TypecheckValidationResult, TypecheckResult, TypecheckOptions, TSDOC_RULES, SummaryDriftIssue, StandardSchemaResult, StandardSchemaOutputOptions, StandardJSONSchemaV1, SpecSummary, SpecDiffWithDocs, SpecCacheConfig, SpecCache, SchemaDetectionResult, SchemaDetectionContext, SandboxFileSystem, STYLE_RULES, SPEC_CACHE_FILE, RuntimeDrift, RunValidationResult, RunExamplesWithPackageResult, RunExamplesWithPackageOptions, RunExampleOptions, RuleContext, RetentionTier, ResolvedTarget, ResolvedFilters, ResolveTargetOptions, ReleaseTag, RETENTION_DAYS, REPORT_VERSION, REPORT_EXTENSIONS, QualityViolation, QualitySeverity2 as QualitySeverity, QualityRulesConfig, QualityRule, QualityResult, QualityConfig, ProjectInfo, PresenceResult, PolicyResult, PolicyFailure, PolicyEvaluationResult, PolicyConfig, ParsedGitHubUrl, PackageManagerInfo, PackageManager, PackageJson, PackageExports, OwnershipAnalysisResult, OwnerCoverageStats, OpenPkgSpec, NodeFileSystem, MonorepoType, MonorepoInfo, MemberChange, MarkdownDocFile, MarkdownCodeBlock, LLMAssertion, KnownVendor, KNOWN_VENDORS, JSDocTag, JSDocReturn, JSDocPatch, JSDocParam, JSDocEdit, InstallResult, InstallOptions, HISTORY_DIR, GitHubRepoMetadata, GitHubProjectContext, FixType, FixSuggestion, FilterSource, FilterOptions, FileSystem, FetchGitHubContextOptions, ExtendedTrendAnalysis, ExportReference, ExportDriftResult, ExportCoverageData, ExampleValidationTypeError, ExampleValidationResult, ExampleValidationOptions, ExampleValidationMode, ExampleValidation, ExampleTypeError, ExampleRunResult, EvaluatePoliciesOptions, EntryPointSource, EntryPointInfo, EnrichedOpenPkg, EnrichedExport, EnrichedDocsMetadata, EnrichOptions, DriftSummary, DriftResult, DriftReportSummary, DriftReport, DocsImpactResult, DocsImpactReference, DocsImpact, DocsConfig, DocsChangeType, DocCovReport, DocCovOptions, DocCovConfig, DocCov, DiffWithDocsOptions, Diagnostic2 as Diagnostic, DetectedSchemaEntry, DetectedPackageManager, DEFAULT_REPORT_PATH, DEFAULT_REPORT_DIR, CoverageTrend, CoverageSummary, CoverageSnapshot, ContributorStats, ContributorAnalysisResult, CommandRunner, CommandResult, CodeOwnersFile, CodeOwnerRule, CheckConfig, CategorizedDrift, CacheValidationResult, CacheContext, CORE_RULES, CACHE_VERSION, BuildPlanTarget, BuildPlanStepResult, BuildPlanStep, BuildPlanExecutionResult, BuildPlanEnvironment, BuildPlan, BuildInfo, BuildHints, BlameInfo, BUILTIN_RULES, ApplyEditsResult, AnalyzeProjectOptions, AnalyzeOwnershipOptions, AnalyzeOptions, AnalyzeContributorsOptions, AnalysisResult, AggregateQualityResult, ALL_VALIDATIONS };