@forge-ts/core 0.8.0 → 0.14.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,3 +1,253 @@
1
+ import { TSDocConfiguration } from '@microsoft/tsdoc';
2
+
3
+ /**
4
+ * Append-only audit trail for forge-ts configuration and governance events.
5
+ *
6
+ * Events are stored as JSON Lines in `.forge-audit.jsonl` at the project root.
7
+ * Each line is a single JSON object — the file is never truncated or overwritten.
8
+ *
9
+ * @packageDocumentation
10
+ * @public
11
+ */
12
+ /**
13
+ * Discriminated event types recorded in the audit trail.
14
+ *
15
+ * @public
16
+ */
17
+ type AuditEventType = "config.lock" | "config.unlock" | "config.drift" | "bypass.create" | "bypass.expire" | "rule.change";
18
+ /**
19
+ * A single audit event recorded in the forge-ts audit trail.
20
+ *
21
+ * @public
22
+ */
23
+ interface AuditEvent {
24
+ /** ISO 8601 timestamp of when the event occurred. */
25
+ timestamp: string;
26
+ /** Discriminated event type. */
27
+ event: AuditEventType;
28
+ /** OS username of the actor (falls back to "unknown"). */
29
+ user: string;
30
+ /** Mandatory for lock/unlock/bypass events; optional otherwise. */
31
+ reason?: string;
32
+ /** Event-specific payload. */
33
+ details: Record<string, unknown>;
34
+ }
35
+ /**
36
+ * Returns the current OS username, or "unknown" if unavailable.
37
+ *
38
+ * @returns The OS username string.
39
+ * @example
40
+ * ```typescript
41
+ * import { getCurrentUser } from "@forge-ts/core/audit";
42
+ * const user = getCurrentUser(); // e.g. "alice"
43
+ * ```
44
+ * @internal
45
+ */
46
+ declare function getCurrentUser(): string;
47
+ /**
48
+ * Appends a single audit event to the `.forge-audit.jsonl` file.
49
+ *
50
+ * Creates the file if it does not exist. The file is strictly append-only —
51
+ * existing content is never modified or truncated.
52
+ *
53
+ * @param rootDir - Absolute path to the project root directory.
54
+ * @param event - The audit event to record.
55
+ * @example
56
+ * ```typescript
57
+ * import { appendAuditEvent } from "@forge-ts/core";
58
+ * appendAuditEvent("/path/to/project", {
59
+ * timestamp: new Date().toISOString(),
60
+ * event: "config.lock",
61
+ * user: "alice",
62
+ * reason: "Stabilize v2 config",
63
+ * details: { hash: "abc123" },
64
+ * });
65
+ * ```
66
+ * @public
67
+ */
68
+ declare function appendAuditEvent(rootDir: string, event: AuditEvent): void;
69
+ /**
70
+ * Options for reading the audit log.
71
+ *
72
+ * @public
73
+ */
74
+ interface ReadAuditOptions {
75
+ /** Maximum number of events to return. */
76
+ limit?: number;
77
+ /** Filter to a single event type. */
78
+ eventType?: AuditEventType;
79
+ }
80
+ /**
81
+ * Reads the `.forge-audit.jsonl` file and returns parsed audit events.
82
+ *
83
+ * Returns newest events first. If the file does not exist, returns an empty
84
+ * array.
85
+ *
86
+ * @param rootDir - Absolute path to the project root directory.
87
+ * @param options - Optional limit and event type filter.
88
+ * @returns Array of audit events, newest first.
89
+ * @example
90
+ * ```typescript
91
+ * import { readAuditLog } from "@forge-ts/core";
92
+ * const events = readAuditLog("/path/to/project", { limit: 10 });
93
+ * console.log(events.length); // up to 10
94
+ * ```
95
+ * @public
96
+ */
97
+ declare function readAuditLog(rootDir: string, options?: ReadAuditOptions): AuditEvent[];
98
+ /**
99
+ * Formats a single audit event as a human-readable string.
100
+ *
101
+ * @param event - The audit event to format.
102
+ * @returns A single-line human-readable representation.
103
+ * @example
104
+ * ```typescript
105
+ * import { formatAuditEvent } from "@forge-ts/core";
106
+ * const line = formatAuditEvent({
107
+ * timestamp: "2026-03-21T12:00:00.000Z",
108
+ * event: "config.lock",
109
+ * user: "alice",
110
+ * reason: "Stabilize v2 config",
111
+ * details: { hash: "abc123" },
112
+ * });
113
+ * console.log(line);
114
+ * // "[2026-03-21T12:00:00.000Z] config.lock by alice — Stabilize v2 config {hash: abc123}"
115
+ * ```
116
+ * @public
117
+ */
118
+ declare function formatAuditEvent(event: AuditEvent): string;
119
+
120
+ /**
121
+ * Bypass budget system for forge-ts config governance.
122
+ *
123
+ * Allows agents to temporarily bypass locked rules with a limited daily budget.
124
+ * Each bypass requires a mandatory justification and expires after a configurable
125
+ * duration. All bypass events are recorded in the audit trail.
126
+ *
127
+ * Bypass records are stored in `.forge-bypass.json` at the project root as a
128
+ * JSON array of {@link BypassRecord} objects.
129
+ *
130
+ * @packageDocumentation
131
+ * @public
132
+ */
133
+ /**
134
+ * Configuration for the bypass budget system.
135
+ *
136
+ * @public
137
+ */
138
+ interface BypassConfig {
139
+ /** Maximum number of bypasses allowed per calendar day. Default: 3 */
140
+ dailyBudget: number;
141
+ /** Duration in hours before a bypass automatically expires. Default: 24 */
142
+ durationHours: number;
143
+ }
144
+ /**
145
+ * A single bypass record stored in `.forge-bypass.json`.
146
+ *
147
+ * @public
148
+ */
149
+ interface BypassRecord {
150
+ /** Unique identifier for this bypass. */
151
+ id: string;
152
+ /** ISO 8601 timestamp when the bypass was created. */
153
+ createdAt: string;
154
+ /** ISO 8601 timestamp when the bypass expires. */
155
+ expiresAt: string;
156
+ /** Mandatory justification for why the bypass was created. */
157
+ reason: string;
158
+ /** Specific rule code bypassed (e.g., "E009"), or "all" for a blanket bypass. */
159
+ rule: string;
160
+ /** OS username of the actor who created the bypass. */
161
+ user: string;
162
+ }
163
+ /**
164
+ * Creates a new bypass record, writes it to `.forge-bypass.json`, and appends
165
+ * an audit event.
166
+ *
167
+ * Throws an error if the daily budget is exhausted.
168
+ *
169
+ * @param rootDir - Absolute path to the project root directory.
170
+ * @param reason - Mandatory justification for the bypass.
171
+ * @param rule - Specific rule code to bypass (e.g., "E009"), or "all". Defaults to "all".
172
+ * @param config - Optional bypass budget configuration overrides.
173
+ * @returns The created bypass record.
174
+ * @throws Error when the daily bypass budget is exhausted.
175
+ * @example
176
+ * ```typescript
177
+ * import { createBypass } from "@forge-ts/core";
178
+ * const bypass = createBypass("/path/to/project", "hotfix for release", "E009");
179
+ * console.log(bypass.id); // unique bypass ID
180
+ * ```
181
+ * @public
182
+ */
183
+ declare function createBypass(rootDir: string, reason: string, rule?: string, config?: Partial<BypassConfig>): BypassRecord;
184
+ /**
185
+ * Returns all currently active (non-expired) bypass records.
186
+ *
187
+ * @param rootDir - Absolute path to the project root directory.
188
+ * @returns Array of active bypass records.
189
+ * @example
190
+ * ```typescript
191
+ * import { getActiveBypasses } from "@forge-ts/core";
192
+ * const active = getActiveBypasses("/path/to/project");
193
+ * console.log(`${active.length} active bypass(es)`);
194
+ * ```
195
+ * @public
196
+ */
197
+ declare function getActiveBypasses(rootDir: string): BypassRecord[];
198
+ /**
199
+ * Checks whether a specific rule has an active bypass.
200
+ *
201
+ * A rule is considered bypassed if there is an active bypass with the exact
202
+ * rule code or an "all" bypass.
203
+ *
204
+ * @param rootDir - Absolute path to the project root directory.
205
+ * @param ruleCode - The rule code to check (e.g., "E009", "E010").
206
+ * @returns `true` if the rule is currently bypassed.
207
+ * @example
208
+ * ```typescript
209
+ * import { isRuleBypassed } from "@forge-ts/core";
210
+ * if (isRuleBypassed("/path/to/project", "E009")) {
211
+ * console.log("E009 is currently bypassed");
212
+ * }
213
+ * ```
214
+ * @public
215
+ */
216
+ declare function isRuleBypassed(rootDir: string, ruleCode: string): boolean;
217
+ /**
218
+ * Returns the number of bypass budget slots remaining for today.
219
+ *
220
+ * Counts bypasses created today (UTC) against the configured daily budget.
221
+ *
222
+ * @param rootDir - Absolute path to the project root directory.
223
+ * @param config - Optional bypass budget configuration overrides.
224
+ * @returns Number of remaining bypass slots for today.
225
+ * @example
226
+ * ```typescript
227
+ * import { getRemainingBudget } from "@forge-ts/core";
228
+ * const remaining = getRemainingBudget("/path/to/project");
229
+ * console.log(`${remaining} bypass(es) remaining today`);
230
+ * ```
231
+ * @public
232
+ */
233
+ declare function getRemainingBudget(rootDir: string, config?: Partial<BypassConfig>): number;
234
+ /**
235
+ * Removes expired bypass records from `.forge-bypass.json`.
236
+ *
237
+ * Also appends a `bypass.expire` audit event for each expired record removed.
238
+ *
239
+ * @param rootDir - Absolute path to the project root directory.
240
+ * @returns The number of expired records removed.
241
+ * @example
242
+ * ```typescript
243
+ * import { expireOldBypasses } from "@forge-ts/core";
244
+ * const removed = expireOldBypasses("/path/to/project");
245
+ * console.log(`${removed} expired bypass(es) removed`);
246
+ * ```
247
+ * @public
248
+ */
249
+ declare function expireOldBypasses(rootDir: string): number;
250
+
1
251
  /**
2
252
  * Visibility levels for exported symbols.
3
253
  * Derived from TSDoc release tags (@public, @beta, @internal).
@@ -54,6 +304,12 @@ interface ForgeSymbol {
54
304
  target: string;
55
305
  line: number;
56
306
  }>;
307
+ /** TSDoc parser messages (syntax warnings/errors) from @microsoft/tsdoc. */
308
+ parseMessages?: Array<{
309
+ messageId: string;
310
+ text: string;
311
+ line: number;
312
+ }>;
57
313
  };
58
314
  /** Human-readable type signature of the symbol. */
59
315
  signature?: string;
@@ -90,6 +346,32 @@ interface EnforceRules {
90
346
  "require-class-member-doc": RuleSeverity;
91
347
  /** E007: Interface/type member missing documentation. */
92
348
  "require-interface-member-doc": RuleSeverity;
349
+ /** W006: TSDoc syntax parse error (invalid tag, malformed block, etc.). */
350
+ "require-tsdoc-syntax": RuleSeverity;
351
+ /** E013: Exported function/class is missing a @remarks block. */
352
+ "require-remarks": RuleSeverity;
353
+ /** E014: Optional property with default is missing @defaultValue. */
354
+ "require-default-value": RuleSeverity;
355
+ /** E015: Generic symbol is missing @typeParam for its type parameters. */
356
+ "require-type-param": RuleSeverity;
357
+ /** W005: Symbol references other symbols via {@link} but has no @see tags. */
358
+ "require-see": RuleSeverity;
359
+ /** E016: Exported symbol is missing a release tag (@public, @beta, @internal). */
360
+ "require-release-tag": RuleSeverity;
361
+ /** W007: Guide FORGE:AUTO section references a symbol that no longer exists or has changed. */
362
+ "require-fresh-guides": RuleSeverity;
363
+ /** W008: Exported public symbol is not mentioned in any guide page. */
364
+ "require-guide-coverage": RuleSeverity;
365
+ /** E017: @internal symbol re-exported through public barrel (index.ts). */
366
+ "require-internal-boundary": RuleSeverity;
367
+ /** E018: @route-tagged function missing @response tag. */
368
+ "require-route-response": RuleSeverity;
369
+ /** W009: {@inheritDoc} references a symbol that does not exist. */
370
+ "require-inheritdoc-source": RuleSeverity;
371
+ /** W010: @breaking without @migration path. */
372
+ "require-migration-path": RuleSeverity;
373
+ /** W011: New public export missing @since version tag. */
374
+ "require-since": RuleSeverity;
93
375
  }
94
376
  /**
95
377
  * Full configuration for a forge-ts run.
@@ -171,6 +453,71 @@ interface ForgeConfig {
171
453
  */
172
454
  extraGotchas?: string[];
173
455
  };
456
+ /** TSDoc ecosystem configuration. */
457
+ tsdoc: {
458
+ /** Write tsdoc.json to project root during init. Default: true */
459
+ writeConfig: boolean;
460
+ /** Custom tag definitions beyond the forge-ts preset. */
461
+ customTags: Array<{
462
+ tagName: string;
463
+ syntaxKind: "block" | "inline" | "modifier";
464
+ }>;
465
+ /** Enforcement level per standardization group. */
466
+ enforce: {
467
+ /** Core tags (e.g. @param, @returns, @remarks). Default: "error" */
468
+ core: "error" | "warn" | "off";
469
+ /** Extended tags (e.g. @example, @throws, @see). Default: "warn" */
470
+ extended: "error" | "warn" | "off";
471
+ /** Discretionary tags (@alpha, @beta, @public, @internal). Default: "off" */
472
+ discretionary: "error" | "warn" | "off";
473
+ };
474
+ };
475
+ /** Bypass budget configuration for temporary rule overrides. */
476
+ bypass: {
477
+ /** Maximum number of bypasses allowed per calendar day. Default: 3 */
478
+ dailyBudget: number;
479
+ /** Duration in hours before a bypass automatically expires. Default: 24 */
480
+ durationHours: number;
481
+ };
482
+ /** Guide generation configuration. */
483
+ guides: {
484
+ /** Enable intelligent guide generation. Default: true */
485
+ enabled: boolean;
486
+ /** Auto-discover guide topics from code analysis. Default: true */
487
+ autoDiscover: boolean;
488
+ /** Explicit guide definitions (supplement auto-discovered guides). */
489
+ custom: Array<{
490
+ /** URL slug for the guide (e.g., "authentication") */
491
+ slug: string;
492
+ /** Human-readable title */
493
+ title: string;
494
+ /** Glob patterns for source files to analyze */
495
+ sources: string[];
496
+ }>;
497
+ };
498
+ /** Downstream config drift guards. */
499
+ guards: {
500
+ /** tsconfig.json strictness validation. */
501
+ tsconfig: {
502
+ enabled: boolean;
503
+ /** Required strict-mode flags. Default: ["strict", "strictNullChecks", "noImplicitAny"] */
504
+ requiredFlags: string[];
505
+ };
506
+ /** Biome config drift detection. */
507
+ biome: {
508
+ enabled: boolean;
509
+ /** Biome rules that must stay at error level. Auto-detected on lock. */
510
+ lockedRules: string[];
511
+ };
512
+ /** package.json guards. */
513
+ packageJson: {
514
+ enabled: boolean;
515
+ /** Minimum Node.js version in engines field. */
516
+ minNodeVersion: string;
517
+ /** Required fields in package.json. */
518
+ requiredFields: string[];
519
+ };
520
+ };
174
521
  /**
175
522
  * Warnings generated during config loading (e.g., unknown keys).
176
523
  * Populated by loadConfig(). Agents should surface these in output.
@@ -289,6 +636,150 @@ declare function defaultConfig(rootDir: string): ForgeConfig;
289
636
  */
290
637
  declare function loadConfig(rootDir?: string): Promise<ForgeConfig>;
291
638
 
639
+ /**
640
+ * Config locking system for forge-ts.
641
+ *
642
+ * Prevents LLM agents from silently weakening project settings by snapshotting
643
+ * the current config state and validating it on every subsequent run.
644
+ *
645
+ * @packageDocumentation
646
+ * @public
647
+ */
648
+
649
+ /**
650
+ * Manifest stored in `.forge-lock.json`.
651
+ * Captures a point-in-time snapshot of the project's forge-ts configuration
652
+ * so that future runs can detect when settings have been weakened.
653
+ *
654
+ * @public
655
+ */
656
+ interface ForgeLockManifest {
657
+ /** Schema version of the lock manifest. */
658
+ version: string;
659
+ /** ISO-8601 timestamp when the lock was created. */
660
+ lockedAt: string;
661
+ /** Identifier of the user or agent that created the lock. */
662
+ lockedBy: string;
663
+ /** Snapshot of locked configuration values. */
664
+ config: {
665
+ /** Rule name to severity mapping from enforce.rules. */
666
+ rules: Record<string, string>;
667
+ /** tsconfig guard settings, if readable at lock time. */
668
+ tsconfig?: Record<string, unknown>;
669
+ /** Biome guard settings, if readable at lock time. */
670
+ biome?: Record<string, unknown>;
671
+ };
672
+ }
673
+ /**
674
+ * A single violation found when comparing current config against the lock.
675
+ *
676
+ * @public
677
+ */
678
+ interface LockViolation {
679
+ /** Dot-path of the config field that changed (e.g., "rules.require-summary"). */
680
+ field: string;
681
+ /** The value stored in the lock file. */
682
+ locked: string;
683
+ /** The current value in the live config. */
684
+ current: string;
685
+ /** Human-readable explanation of the violation. */
686
+ message: string;
687
+ }
688
+ /**
689
+ * Reads the `.forge-lock.json` file from the given project root.
690
+ *
691
+ * @param rootDir - Absolute path to the project root.
692
+ * @returns The parsed lock manifest, or `null` if no lock file exists or is invalid.
693
+ * @example
694
+ * ```typescript
695
+ * import { readLockFile } from "@forge-ts/core";
696
+ * const lock = readLockFile("/path/to/project");
697
+ * if (lock) {
698
+ * console.log(`Locked at ${lock.lockedAt} by ${lock.lockedBy}`);
699
+ * }
700
+ * ```
701
+ * @public
702
+ */
703
+ declare function readLockFile(rootDir: string): ForgeLockManifest | null;
704
+ /**
705
+ * Writes a {@link ForgeLockManifest} to `.forge-lock.json` in the project root.
706
+ *
707
+ * @param rootDir - Absolute path to the project root.
708
+ * @param manifest - The lock manifest to write.
709
+ * @example
710
+ * ```typescript
711
+ * import { writeLockFile, createLockManifest, loadConfig } from "@forge-ts/core";
712
+ * const config = await loadConfig("/path/to/project");
713
+ * const manifest = createLockManifest(config);
714
+ * writeLockFile("/path/to/project", manifest);
715
+ * ```
716
+ * @public
717
+ */
718
+ declare function writeLockFile(rootDir: string, manifest: ForgeLockManifest): void;
719
+ /**
720
+ * Removes the `.forge-lock.json` file from the project root.
721
+ *
722
+ * @param rootDir - Absolute path to the project root.
723
+ * @returns `true` if the file existed and was removed, `false` otherwise.
724
+ * @example
725
+ * ```typescript
726
+ * import { removeLockFile } from "@forge-ts/core";
727
+ * const removed = removeLockFile("/path/to/project");
728
+ * console.log(removed ? "Lock removed" : "No lock file found");
729
+ * ```
730
+ * @public
731
+ */
732
+ declare function removeLockFile(rootDir: string): boolean;
733
+ /**
734
+ * Creates a {@link ForgeLockManifest} from the current project config.
735
+ *
736
+ * Snapshots the enforce rule severities and guard settings so they can
737
+ * be compared on future runs to detect weakening.
738
+ *
739
+ * @param config - The fully-resolved {@link ForgeConfig} to snapshot.
740
+ * @param lockedBy - Identifier of the user or agent creating the lock. Defaults to `"forge-ts lock"`.
741
+ * @returns A new lock manifest ready to be written with {@link writeLockFile}.
742
+ * @example
743
+ * ```typescript
744
+ * import { createLockManifest, loadConfig } from "@forge-ts/core";
745
+ * const config = await loadConfig();
746
+ * const manifest = createLockManifest(config);
747
+ * console.log(manifest.config.rules); // { "require-summary": "error", ... }
748
+ * ```
749
+ * @public
750
+ */
751
+ declare function createLockManifest(config: ForgeConfig, lockedBy?: string): ForgeLockManifest;
752
+ /**
753
+ * Validates the current config against a locked manifest.
754
+ *
755
+ * Returns an array of violations where the current config has weakened
756
+ * settings relative to the locked state. Weakening means:
757
+ * - A rule severity changed from `"error"` to `"warn"` or `"off"`
758
+ * - A rule severity changed from `"warn"` to `"off"`
759
+ * - A tsconfig guard was disabled
760
+ * - A required tsconfig flag was removed
761
+ * - A biome guard was disabled
762
+ * - A locked biome rule was removed
763
+ *
764
+ * @param config - The current fully-resolved {@link ForgeConfig}.
765
+ * @param lock - The lock manifest to validate against.
766
+ * @returns An array of {@link LockViolation} entries. Empty means no weakening detected.
767
+ * @example
768
+ * ```typescript
769
+ * import { validateAgainstLock, readLockFile, loadConfig } from "@forge-ts/core";
770
+ * const config = await loadConfig();
771
+ * const lock = readLockFile(config.rootDir);
772
+ * if (lock) {
773
+ * const violations = validateAgainstLock(config, lock);
774
+ * for (const v of violations) {
775
+ * console.error(`LOCK VIOLATION: ${v.message}`);
776
+ * }
777
+ * }
778
+ * ```
779
+ * @public
780
+ */
781
+ declare function validateAgainstLock(config: ForgeConfig, lock: ForgeLockManifest): LockViolation[];
782
+
292
783
  /**
293
784
  * OpenAPI 3.2 type contracts shared across the forge-ts toolchain.
294
785
  *
@@ -544,6 +1035,25 @@ declare function meetsVisibility(candidate: Visibility, minVisibility: Visibilit
544
1035
  */
545
1036
  declare function filterByVisibility(symbols: ForgeSymbol[], minVisibility: Visibility): ForgeSymbol[];
546
1037
 
1038
+ /** Clears the TSDoc configuration cache. Intended for use in tests only. @internal */
1039
+ declare function clearTSDocConfigCache(): void;
1040
+ /**
1041
+ * Resolve the TSDoc configuration to use when parsing comments in
1042
+ * files under `folderPath`.
1043
+ *
1044
+ * If a `tsdoc.json` file exists in or above the folder and can be loaded
1045
+ * without errors, its settings are applied to a fresh `TSDocConfiguration`
1046
+ * via `TSDocConfigFile.configureParser()`. Otherwise the default
1047
+ * `TSDocConfiguration` is returned (backward-compatible behaviour).
1048
+ *
1049
+ * Results are cached per folder path so the file system is only consulted
1050
+ * once per unique directory.
1051
+ *
1052
+ * @param folderPath - Absolute directory path of the source file being parsed.
1053
+ * @returns A configured `TSDocConfiguration` instance.
1054
+ * @internal
1055
+ */
1056
+ declare function loadTSDocConfiguration(folderPath: string): TSDocConfiguration;
547
1057
  /**
548
1058
  * The return type of {@link createWalker}.
549
1059
  * @public
@@ -577,4 +1087,4 @@ interface ASTWalker {
577
1087
  */
578
1088
  declare function createWalker(config: ForgeConfig): ASTWalker;
579
1089
 
580
- export { type ASTWalker, type EnforceRules, type ForgeConfig, type ForgeError, type ForgeResult, type ForgeSymbol, type ForgeWarning, type OpenAPIDocument, type OpenAPIEncodingObject, type OpenAPIInfoObject, type OpenAPIMediaTypeObject, type OpenAPIOperationObject, type OpenAPIParameterObject, type OpenAPIPathItemObject, type OpenAPIResponseObject, type OpenAPISchemaObject, type OpenAPITagObject, type RuleSeverity, Visibility, createWalker, defaultConfig, filterByVisibility, loadConfig, meetsVisibility, resolveVisibility };
1090
+ export { type ASTWalker, type AuditEvent, type AuditEventType, type BypassConfig, type BypassRecord, type EnforceRules, type ForgeConfig, type ForgeError, type ForgeLockManifest, type ForgeResult, type ForgeSymbol, type ForgeWarning, type LockViolation, type OpenAPIDocument, type OpenAPIEncodingObject, type OpenAPIInfoObject, type OpenAPIMediaTypeObject, type OpenAPIOperationObject, type OpenAPIParameterObject, type OpenAPIPathItemObject, type OpenAPIResponseObject, type OpenAPISchemaObject, type OpenAPITagObject, type ReadAuditOptions, type RuleSeverity, Visibility, appendAuditEvent, clearTSDocConfigCache, createBypass, createLockManifest, createWalker, defaultConfig, expireOldBypasses, filterByVisibility, formatAuditEvent, getActiveBypasses, getCurrentUser, getRemainingBudget, isRuleBypassed, loadConfig, loadTSDocConfiguration, meetsVisibility, readAuditLog, readLockFile, removeLockFile, resolveVisibility, validateAgainstLock, writeLockFile };