@archwall/core 0.2.1 → 1.0.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.
@@ -282,27 +282,6 @@ declare class GraphDraft implements GraphMutation {
282
282
  declare function irMajor(version: string): number;
283
283
  declare function assertIrCompatible(graphVersion: string): void;
284
284
  //#endregion
285
- //#region src/contracts/classifier.d.ts
286
- interface ClassifierContext {
287
- /**
288
- * Absolute source root from resolved config. Classifier patterns describe the shape of
289
- * the source tree, so they are relative to this and never to the repository root.
290
- */
291
- sourceRoot: string;
292
- /**
293
- * A file's path relative to {@link sourceRoot}, forward-slashed, or null when it lies
294
- * outside. Every path-based classifier needs exactly this, and none of them should be
295
- * re-deriving it — guards, slash normalisation and all — in user code.
296
- */
297
- relative(file: string): string | null;
298
- }
299
- type TagPatch = Record<string, string> | null | undefined | void;
300
- interface Classifier {
301
- name: string;
302
- classify(module: ModuleNode, ctx: ClassifierContext): TagPatch;
303
- }
304
- declare function defineClassifier(classifier: Classifier): Classifier;
305
- //#endregion
306
285
  //#region src/violations.d.ts
307
286
  /**
308
287
  * The ONE severity vocabulary, shared by violations and diagnostics.
@@ -435,6 +414,27 @@ declare function countBySeverity(violations: readonly {
435
414
  */
436
415
  declare function compareViolations(a: Violation, b: Violation): number;
437
416
  //#endregion
417
+ //#region src/contracts/classifier.d.ts
418
+ interface ClassifierContext {
419
+ /**
420
+ * Absolute source root from resolved config. Classifier patterns describe the shape of
421
+ * the source tree, so they are relative to this and never to the repository root.
422
+ */
423
+ sourceRoot: string;
424
+ /**
425
+ * A file's path relative to {@link sourceRoot}, forward-slashed, or null when it lies
426
+ * outside. Every path-based classifier needs exactly this, and none of them should be
427
+ * re-deriving it — guards, slash normalisation and all — in user code.
428
+ */
429
+ relative(file: string): string | null;
430
+ }
431
+ type TagPatch = Record<string, string> | null | undefined | void;
432
+ interface Classifier {
433
+ name: string;
434
+ classify(module: ModuleNode, ctx: ClassifierContext): TagPatch;
435
+ }
436
+ declare function defineClassifier(classifier: Classifier): Classifier;
437
+ //#endregion
438
438
  //#region src/contracts/diagnostic.d.ts
439
439
  /** Alias, for readability at use sites — it IS {@link Severity}. */
440
440
  type DiagnosticSeverity = Severity;
@@ -477,7 +477,18 @@ type WellKnownDiagnosticCode =
477
477
  * "debt we accepted" and becomes a permanent hole, and the stale entry will silently
478
478
  * re-suppress the finding if it ever comes back.
479
479
  */
480
- "baseline-stale";
480
+ "baseline-stale" |
481
+ /**
482
+ * A baseline is configured but could not be used: missing, unparseable, or written under a
483
+ * different fingerprint scheme.
484
+ *
485
+ * Gated with the other configuration errors, and therefore failing by default. The failure
486
+ * this prevents is specific: an unusable baseline suppresses nothing, so the run reports
487
+ * every accepted finding as new — and a team that reads that as "the baseline is broken"
488
+ * is the lucky case. Silence here would instead let a *scheme bump* look like a fresh
489
+ * regression, or let a deleted baseline look like a clean repo.
490
+ */
491
+ "baseline-invalid";
481
492
  type DiagnosticCode = WellKnownDiagnosticCode | (string & {});
482
493
  /**
483
494
  * Everything the run wants to say that is *not* a violation of the user's architecture: a
@@ -509,6 +520,20 @@ interface UnscannableFilesDetails {
509
520
  /** A bounded sample of repo-relative paths, for a message a human can follow. */
510
521
  sample: readonly string[];
511
522
  }
523
+ /** Payload shape for `code: "baseline-stale"`. */
524
+ interface BaselineStaleDetails {
525
+ /** How many accepted entries this run did not reproduce. */
526
+ count: number;
527
+ /** The fingerprints, so a tool can prune the file without re-running the analysis. */
528
+ fingerprints: readonly string[];
529
+ }
530
+ /** Payload shape for `code: "baseline-invalid"`. */
531
+ interface BaselineInvalidDetails {
532
+ /** Repo-relative path to the configured baseline. */
533
+ path: string;
534
+ /** Why it could not be used, as a sentence fragment. */
535
+ reason: string;
536
+ }
512
537
  /** Payload shape for `code: "empty-scope"`. */
513
538
  interface EmptyScopeDetails {
514
539
  /** The scope as configured, so the message can be acted on without reopening the config. */
@@ -759,5 +784,5 @@ interface GraphTransform {
759
784
  }
760
785
  declare function defineTransform(transform: GraphTransform): GraphTransform;
761
786
  //#endregion
762
- export { ProjectGraph as $, primaryEdge as A, EdgeAttributes as B, Violation as C, countBySeverity as D, compareViolations as E, ClassifierContext as F, GraphMutation as G, FIRST_PARTY_KINDS as H, TagPatch as I, MODULE_ID_SCHEMES as J, HostInfo as K, defineClassifier as L, primarySourceLocation as M, renderMessage as N, fingerprintOf as O, Classifier as P, ModuleNode as Q, Capability as R, SeverityCounts as S, ViolationLocation as T, GraphDelivery as U, EdgeKind as V, GraphDraft as W, ModuleIdScheme as X, ModuleId as Y, ModuleKind as Z, RuleSkippedDetails as _, defineGraphComputation as a, assertIrCompatible as at, FINGERPRINT_SCHEME as b, GraphQuery as c, isFirstParty as ct, ModuleSelection as d, ProjectGraphInit as et, filterKey as f, EmptyScopeDetails as g, DiagnosticSeverity as h, GraphComputation as i, WellKnownEdgeKind as it, primaryModule as j, locationsOf as k, GraphView as l, isThirdParty as lt, DiagnosticCode as m, TransformContext as n, THIRD_PARTY_KINDS as nt, EdgeFilter as o, displayModuleId as ot, Diagnostic as p, IR_VERSION as q, defineTransform as r, WellKnownCapability as rt, GraphIndex as s, irMajor as st, GraphTransform as t, SourceLocation as tt, ModuleFilter as u, parseModuleId as ut, UnscannableFilesDetails as v, ViolationInput as w, Severity as x, WellKnownDiagnosticCode as y, Edge as z };
763
- //# sourceMappingURL=transform-CzxyWbUC.d.cts.map
787
+ export { ModuleKind as $, ViolationInput as A, Capability as B, ClassifierContext as C, Severity as D, FINGERPRINT_SCHEME as E, locationsOf as F, GraphDelivery as G, EdgeAttributes as H, primaryEdge as I, HostInfo as J, GraphDraft as K, primaryModule as L, compareViolations as M, countBySeverity as N, SeverityCounts as O, fingerprintOf as P, ModuleIdScheme as Q, primarySourceLocation as R, Classifier as S, defineClassifier as T, EdgeKind as U, Edge as V, FIRST_PARTY_KINDS as W, MODULE_ID_SCHEMES as X, IR_VERSION as Y, ModuleId as Z, DiagnosticSeverity as _, defineGraphComputation as a, WellKnownCapability as at, UnscannableFilesDetails as b, GraphQuery as c, displayModuleId as ct, ModuleSelection as d, isThirdParty as dt, ModuleNode as et, filterKey as f, parseModuleId as ft, DiagnosticCode as g, Diagnostic as h, GraphComputation as i, THIRD_PARTY_KINDS as it, ViolationLocation as j, Violation as k, GraphView as l, irMajor as lt, BaselineStaleDetails as m, TransformContext as n, ProjectGraphInit as nt, EdgeFilter as o, WellKnownEdgeKind as ot, BaselineInvalidDetails as p, GraphMutation as q, defineTransform as r, SourceLocation as rt, GraphIndex as s, assertIrCompatible as st, GraphTransform as t, ProjectGraph as tt, ModuleFilter as u, isFirstParty as ut, EmptyScopeDetails as v, TagPatch as w, WellKnownDiagnosticCode as x, RuleSkippedDetails as y, renderMessage as z };
788
+ //# sourceMappingURL=transform-beNJIws-.d.mts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archwall/core",
3
- "version": "0.2.1",
3
+ "version": "1.0.0",
4
4
  "description": "Graph IR, analysis engine, and rule/preset/reporter contracts for ArchWall.",
5
5
  "license": "MIT",
6
6
  "repository": {