@callidescope/output 0.0.77 → 0.0.78

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 0.0.78 (2026-11-10)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **codometer:** ✨ gate JSDoc on every declaration kind and shorten long comments ([#2227](https://github.com/organizzolini/codebase/pull/2227), [#2226](https://github.com/organizzolini/codebase/issues/2226))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated callidescope-configuration to 0.0.79
10
+ - Updated callidescope-graph to 0.0.78
11
+ - Updated callidescope-core to 0.0.78
12
+
1
13
  ## 0.0.77 (2026-11-10)
2
14
 
3
15
  ### 🧱 Updated Dependencies
@@ -61,21 +61,15 @@ export declare class AddressReportService {
61
61
  /** Renders one callable's direct callers and callees. */
62
62
  renderBreadth(args: RenderBreadthArguments): string;
63
63
  /**
64
- * Renders several callables' direct calls as one document.
65
- *
66
- * JSON is **always** an array, whatever the address count, so a script can
67
- * `JSON.parse` a run's output without branching on how many addresses it
68
- * asked about. Markdown and mermaid concatenate the per-callable renders,
69
- * each of which already carries its own heading naming the address.
64
+ * Renders several callables' direct calls as one document. JSON is always an array,
65
+ * whatever the address count.
70
66
  */
71
67
  renderBreadthReports(args: RenderBreadthReportsArguments): string;
72
68
  /** Renders the paths traced above and below one callable. */
73
69
  renderDepth(args: RenderDepthArguments): string;
74
70
  /**
75
- * Renders several callables' traced paths as one document.
76
- *
77
- * JSON is **always** an array, for the same reason `renderBreadthReports`
78
- * does it: one run, one parseable document, regardless of address count.
71
+ * Renders several callables' traced paths as one document. JSON is always an array,
72
+ * whatever the address count.
79
73
  */
80
74
  renderDepthReports(args: RenderDepthReportsArguments): string;
81
75
  }
@@ -134,24 +128,11 @@ export declare interface FindOwnedFindingsArguments {
134
128
  readonly reports: readonly ProjectReport[];
135
129
  }
136
130
 
137
- /**
138
- * The start marker of any anchored block this convention recognizes, not
139
- * just the one a given destination owns.
140
- *
141
- * Used to find where a corrupted block — a start marker with no matching
142
- * end — has to stop being replaced: at another block's own territory,
143
- * never past it.
144
- */
131
+ /** Start marker of any anchored block this convention recognizes. Where a corrupted block must stop being replaced: at another block's territory. */
145
132
  export declare const FOREIGN_ANCHOR_PATTERN: RegExp;
146
133
 
147
134
  /**
148
- * Anything holding a frame list, whether or not it is a full `CallStack`.
149
- *
150
- * `ReportService.renderStackTree` and `MermaidReportService.renderStacks`
151
- * only ever read `frames`, so this is what they accept: a full `CallStack`
152
- * satisfies it, and so does a path with no depth or entry-point kind of its
153
- * own, such as one traced from an arbitrary address rather than a recognized
154
- * entry point.
135
+ * Anything holding a frame list, such as a full `CallStack` or a path with no depth of its own.
155
136
  */
156
137
  export declare interface FramedStack {
157
138
  readonly frames: readonly StackFrame[];
@@ -166,13 +147,7 @@ export declare const HEADROOM_BUCKET_FOUR_PLUS = "4+";
166
147
  /** Bucket holding the projects one frame from their own limit. */
167
148
  export declare const HEADROOM_BUCKET_ONE = "1";
168
149
 
169
- /**
170
- * The order the scoreboard prints its buckets in, tightest first.
171
- *
172
- * A fixed list rather than the keys a run happened to produce, so a bucket
173
- * nothing fell into is still printed as a zero. "Nothing is over its limit" is
174
- * the row a reader came for, and an absent row cannot say it.
175
- */
150
+ /** The order the scoreboard prints buckets, tightest first. Fixed, so an empty bucket still prints as zero. */
176
151
  export declare const HEADROOM_BUCKET_ORDER: readonly ["over limit", "0 — at limit", "1", "2–3", "4+", "no stacks"];
177
152
 
178
153
  /** Bucket holding the projects whose deepest stack broke their own limit. */
@@ -181,25 +156,12 @@ export declare const HEADROOM_BUCKET_OVER_LIMIT = "over limit";
181
156
  /** Bucket holding the projects two or three frames from their own limit. */
182
157
  export declare const HEADROOM_BUCKET_TWO_TO_THREE = "2\u20133";
183
158
 
184
- /**
185
- * Bucket holding the projects that measured no stack at all.
186
- *
187
- * Named rather than folded into the widest headroom bucket: a project whose
188
- * deepest stack is zero is not a project with room to spare, it is a project
189
- * whose limit gates nothing, and those are opposite findings.
190
- */
159
+ /** Bucket for projects measuring no stack. Not the widest headroom bucket: such a limit gates nothing, the opposite finding. */
191
160
  export declare const HEADROOM_BUCKET_UNMEASURED = "no stacks";
192
161
 
193
162
  /**
194
- * Structured values that belong beside a log line rather than inside it.
195
- *
196
- * Counts, percentages, and durations are the values that change on every
197
- * occurrence, so they are carried as fields: the message stays constant and
198
- * groupable in telemetry, and the numbers stay queryable instead of having to
199
- * be parsed back out of prose.
200
- *
201
- * The named members are the recurring ones; the index signature keeps the
202
- * argument open for whatever a given call site needs to attach.
163
+ * Values beside a log line rather than inside it: counts and durations change
164
+ * per occurrence, so they stay queryable fields.
203
165
  */
204
166
  declare interface LogData {
205
167
  [key: string]: unknown;
@@ -214,20 +176,11 @@ declare interface LogData {
214
176
  }
215
177
 
216
178
  /**
217
- * Transient-scoped logger so each injecting class gets its own instance.
218
- * Each consumer calls `setContext(ClassName.name)` to tag every log line
219
- * with the originating class. Backed by pino for structured JSON output in
220
- * production and human-readable pretty-print in development.
221
- *
222
- * Messages follow one grammar: an emoji naming the subject, a verb in present
223
- * progressive or past tense, then the object. Values that vary per call —
224
- * counts, percentages, durations — go in the `data` argument rather than the
225
- * message, so the message stays constant enough for telemetry to group on.
226
- *
227
- * ```ts
228
- * this.logger.info("📥 Downloading CSEL sources", undefined, { total: 428 });
229
- * this.logger.info("📥 Downloaded CSEL sources", undefined, { count: 412 });
230
- * ```
179
+ * Transient logger, so each injecting class gets its own instance. Each
180
+ * consumer calls `setContext(ClassName.name)`. Backed by pino: JSON in
181
+ * production, pretty-printed in development. Messages start with an emoji
182
+ * naming the subject, then a verb in present progressive or past tense.
183
+ * Varying values such as counts go in `data`, so messages stay groupable.
231
184
  */
232
185
  declare @Injectable({ scope: Scope.TRANSIENT })
233
186
  class LoggerService
@@ -245,12 +198,7 @@ implements LoggerServiceContract
245
198
  private static readonly isProduction =
246
199
  process.env["NODE_ENV"] === "production";
247
200
 
248
- /**
249
- * Built on first use, not when this file is evaluated.
250
- *
251
- * A destination fixed at import time could only ever be chosen by this
252
- * package, since every consumer's own code runs after its imports.
253
- */
201
+ /** Built on first use, so `logToStandardError` can still choose the destination after import. */
254
202
  private static rootLogger: pino.Logger | undefined;
255
203
 
256
204
  /** Whether lines go to standard error instead of standard output. */
@@ -293,18 +241,8 @@ implements LoggerServiceContract
293
241
  }
294
242
 
295
243
  /**
296
- * Sends every subsequent line to standard error instead of standard output.
297
- *
298
- * For a command-line application whose standard output *is* its result. A log
299
- * line sharing that stream is not a diagnostic beside the data, it is a
300
- * corruption of it. Call it before anything logs — the first statement of the
301
- * application's bootstrap.
302
- *
303
- * A call after the first line warns and changes nothing: the destination is
304
- * fixed when the pino instance is built, and tearing down a transport
305
- * somebody is writing through would be worse than refusing. The warning is
306
- * the point — silently leaving the lines on standard output is how a caller
307
- * would ship a corrupted pipe without ever being told.
244
+ * Sends later lines to standard error, for a command whose stdout is its
245
+ * result. Call it first; later calls warn and change nothing.
308
246
  */
309
247
  static logToStandardError(): void {
310
248
  if (LoggerService.rootLogger !== undefined) {
@@ -318,10 +256,8 @@ implements LoggerServiceContract
318
256
  }
319
257
 
320
258
  /**
321
- * Fails a malformed message in development, and never in production.
322
- *
323
- * A logger that throws in production turns an observability call into an
324
- * outage, so the check runs only where a developer is present to fix it.
259
+ * Fails a malformed message in development only, since a throw in production
260
+ * would turn logging into an outage.
325
261
  */
326
262
  private assertConventionalMessage(args: {
327
263
  context: string | undefined;
@@ -381,11 +317,8 @@ implements LoggerServiceContract
381
317
  }
382
318
 
383
319
  /**
384
- * Whether a word is a verb in one of the two tenses the convention allows.
385
- *
386
- * Present progressive means the operation is under way; past means it
387
- * finished. Regular morphology covers both, so a new verb needs no
388
- * registration anywhere — only irregular pasts are enumerated.
320
+ * Whether a word is a present-progressive or past-tense verb. Only irregular
321
+ * pasts need listing; regular morphology covers the rest.
389
322
  */
390
323
  private isConventionalVerb(word: string): boolean {
391
324
  const lowercased = word.toLowerCase();
@@ -461,11 +394,8 @@ implements LoggerServiceContract
461
394
  }
462
395
 
463
396
  /**
464
- * Logs an error message at the `error` level, optionally including a stack trace.
465
- *
466
- * `ConsoleLogger.error` spends a third slot on a context string that the
467
- * other levels do not have, so this one accepts either: a string keeps
468
- * NestJS's meaning, an object is structured data like everywhere else.
397
+ * Logs at the `error` level. The second argument is a stack, the third a
398
+ * context string or structured data.
469
399
  */
470
400
  override error(
471
401
  message: unknown,
@@ -496,12 +426,8 @@ implements LoggerServiceContract
496
426
  }
497
427
 
498
428
  /**
499
- * Logs an informational message at the `info` level.
500
- *
501
- * NestJS and `nest-commander` call this method directly as part of the
502
- * framework's own `LoggerService` contract, so it must keep working
503
- * exactly as before. Application code should call `info` instead — the
504
- * same behavior under a name that says what level it logs at.
429
+ * Logs at the `info` level, as NestJS and `nest-commander` call it.
430
+ * Application code should call `info` instead.
505
431
  */
506
432
  override log(message: unknown, context?: string, data?: LogData): void {
507
433
  this.info(message, context, data);
@@ -547,23 +473,10 @@ declare interface LoggerServiceContract extends ConsoleLogger {
547
473
  info(message: unknown, context?: string, data?: LogData): void;
548
474
  }
549
475
 
550
- /**
551
- * Heading over the call stacks that ran deeper than their project allows.
552
- *
553
- * A constant rather than a literal because two renderings write it — the
554
- * whole-run report, and the findings-only rendering a gate prints — and a
555
- * reader who greps a failed pipeline for one of them must find the other.
556
- */
476
+ /** Heading over stacks deeper than their project allows. A constant, so a reader grepping a failed run finds the same text in both renderings. */
557
477
  export declare const MARKDOWN_DEEP_STACKS_HEADING = "Call stacks over the depth limit";
558
478
 
559
- /**
560
- * How each anchored destination draws the stacks it carries.
561
- *
562
- * One list rather than the pair written out at each of the two places a run
563
- * writes anchored blocks — its own and every project's — because the pairing is
564
- * the same fact both times, and two copies of it are two places for `mermaid`
565
- * to start printing trees.
566
- */
479
+ /** How each anchored destination draws its stacks. One list, so `mermaid` can never start printing trees by accident. */
567
480
  export declare const MARKDOWN_DESTINATION_RENDERINGS: readonly [readonly ["markdown", "tree"], readonly ["mermaid", "diagram"]];
568
481
 
569
482
  /** Header of the depth-headroom scoreboard. */
@@ -594,40 +507,18 @@ export declare class MarkdownReportService {
594
507
  private readonly workspaceReportService;
595
508
  constructor(mermaidReportService: MermaidReportService, reportService: ReportService, workspaceReportService: WorkspaceReportService);
596
509
  /**
597
- * Renders each callable's breadth, the first few openly and the rest
598
- * behind a disclosure — the same treatment `renderStacks` gives stacks.
599
- *
600
- * Shared by both scopes: a project section passes every callable with a
601
- * direct callee, unfiltered by any limit, the same way its stacks are;
602
- * a whole-run section passes only the `WideCallableFinding`s that broke
603
- * the configured limit. `WideCallableFinding` is a `CallableBreadthReport`
604
- * with a `limit` added, so one renderer covers both without caring which
605
- * it was handed. Unfiltered, a project's breadth table is one row per
606
- * non-leaf callable — every bit as unbounded as its stacks — so it earns
607
- * the same truncation rather than a bare table.
510
+ * Renders each callable's breadth, the first few openly and the rest behind a disclosure, shared
511
+ * by project and run sections.
608
512
  */
609
513
  private renderCallableBreadths;
610
514
  /**
611
- * Renders one limit's value cell.
612
- *
613
- * A limit the project does not declare prints `none` rather than a number,
614
- * which is breadth's usual case: it has no default at any level, so a
615
- * project writing `maximumBreadth: undefined` is gated on breadth by nothing
616
- * at all, and printing some number there would say the opposite.
515
+ * Renders one limit's value cell, printing `none` for an undeclared limit rather than a number
516
+ * that implies a gate.
617
517
  */
618
518
  private renderLimitCell;
619
519
  /**
620
- * Renders the two limits one project is judged against.
621
- *
622
- * A project's block already carried its deepest stack and its widest
623
- * callable; what it could not say is what either number is measured against.
624
- * That was inferable while one workspace number gated everything and is not
625
- * inferable now — the limit is a fact about this project, and fifty projects
626
- * hold fifty answers.
627
- *
628
- * There is no origin column, because there is no second origin left: every
629
- * traced project's configuration is complete, so both numbers are written in
630
- * the file beside this readme or the run refused to start.
520
+ * Renders the two limits one project is judged against, since a limit is a fact about that
521
+ * project alone.
631
522
  */
632
523
  private renderProjectLimits;
633
524
  /** Renders one stack: a labelled heading line and its tree in a fence. */
@@ -639,86 +530,46 @@ export declare class MarkdownReportService {
639
530
  /** Renders a table, or says plainly that there was nothing to put in one. */
640
531
  private renderTable;
641
532
  /**
642
- * Names each callable that broke its breadth limit, a line each.
643
- *
644
- * A line rather than `renderCallableBreadths`' table, and deliberately not
645
- * that method reused: the table's columns say what a callable calls, and a
646
- * finding's product is the number it broke. `limit` is per project now, so a
647
- * reader cannot infer it from the run the way a single workspace-wide number
648
- * could be inferred — it has to be printed beside the breadth it failed.
533
+ * Names each callable that broke its breadth limit, one line each, printing the project's `limit`
534
+ * beside it.
649
535
  */
650
536
  private renderWideCallableLines;
651
537
  /**
652
- * The heading prefix one level below the block's own.
653
- *
654
- * Derived rather than fixed, so a block spliced under an `##` heading writes
655
- * `###` subsections and stays a well-formed subtree of the file it landed
656
- * in. A heading carrying no leading `#` at all yields `##`, which is the
657
- * level these sections had before the heading was configurable.
538
+ * The heading prefix one level below the block's own, so a spliced block stays a well-formed
539
+ * subtree.
658
540
  */
659
541
  private subsectionPrefix;
660
542
  /**
661
- * Renders the two findings a gate weighs, and nothing else.
662
- *
663
- * A gate prints why it decided rather than what it read: the full report is
664
- * what a trace is for, and burying two deep stacks in a listing of every
665
- * stack in the project is how a failed pipeline stops being read.
666
- *
667
- * Here rather than in the caller because rendering is this package's job,
668
- * and because the headings are `renderRun`'s headings — written once, so a
669
- * reader who greps a pipeline log for one rendering finds the other.
543
+ * Renders the two findings a gate weighs, and nothing else, so a failed pipeline shows why it
544
+ * decided.
670
545
  */
671
546
  renderFindings(args: RenderFindingsArguments): string;
672
547
  /** Renders one project's section, for splicing into its own README. */
673
548
  renderProjectSection(args: RenderProjectSectionArguments): string;
674
549
  /**
675
- * Renders a whole run, for a terminal or a report file.
676
- *
677
- * Opens with what the run adds up to rather than with its findings: the
678
- * summary, the per-project index, and the headroom each project has left.
679
- * A workspace holding fifty projects is not readable as a list of
680
- * callables, and every section below these three is one — so a reader
681
- * arriving at this block learns which project to look at before being
682
- * handed the stacks.
550
+ * Renders a whole run, for a terminal or a report file. Opens with the summary, the project index,
551
+ * and the headroom.
683
552
  */
684
553
  renderRun(args: RenderRunArguments): string;
685
554
  /**
686
- * Renders every stack, the first few openly and the rest behind a disclosure.
687
- *
688
- * A package with two hundred stacks is still worth publishing in full — an
689
- * agent reading the file can expand it, and a person scrolling past should
690
- * not have to.
555
+ * Renders every stack, the first few openly and the rest behind a disclosure, so a large package
556
+ * stays complete.
691
557
  */
692
558
  renderStacks(args: RenderStacksArguments): string;
693
559
  }
694
560
 
695
- /**
696
- * Callables a diagram draws before it stops accepting stacks.
697
- *
698
- * GitHub refuses a mermaid block past 50,000 characters, and at roughly fifty
699
- * characters per node and edge this leaves room to spare — the widest project
700
- * here draws 263. Whole stacks are dropped rather than trimmed, so the diagram
701
- * never shows an edge into a callable it does not draw.
702
- */
561
+ /** Callables a diagram draws before it stops accepting stacks. GitHub refuses mermaid blocks past 50,000 characters; whole stacks drop, never trimmed. */
703
562
  export declare const MAXIMUM_DIAGRAM_NODES = 300;
704
563
 
705
- /**
706
- * Opens every diagram.
707
- *
708
- * Left to right, because that is the direction a stack reads and the direction
709
- * a wide, shallow call graph fits a page.
710
- */
564
+ /** Opens every diagram, left to right: the direction a stack reads and a wide, shallow graph fits a page. */
711
565
  export declare const MERMAID_FLOWCHART_HEADER = "flowchart LR";
712
566
 
713
567
  /** What mermaid would read as syntax inside a node label. */
714
568
  export declare const MERMAID_LABEL_ESCAPES: ReadonlyMap<string, string>;
715
569
 
716
570
  /**
717
- * A diagram under construction.
718
- *
719
- * Mutable, and deliberately so: nodes and edges accumulate across every stack
720
- * drawn, and threading an immutable accumulator through that would say nothing
721
- * the name does not.
571
+ * A diagram under construction. Mutable on purpose, since nodes and edges accumulate across every
572
+ * stack drawn.
722
573
  */
723
574
  export declare interface MermaidDiagram {
724
575
  readonly edges: Set<string>;
@@ -729,15 +580,10 @@ export declare interface MermaidDiagram {
729
580
  /**
730
581
  * Draws a set of call stacks as one mermaid flowchart.
731
582
  *
732
- * One diagram for all of them rather than one apiece, because a single stack
733
- * is a straight line and a straight line is a list with extra steps. Drawn
734
- * together the shared tails converge — every resolver ending in the same
735
- * service, every command reaching the same repository — and that convergence
736
- * is the thing a picture shows and an indented tree cannot.
583
+ * One diagram for all stacks, because shared tails converge there and that convergence is what a
584
+ * picture shows and an indented tree cannot.
737
585
  *
738
- * Labels carry the callable's name and nothing else. What it takes, returns,
739
- * and documents belongs to the tree rendering, which has room for it; a
740
- * diagram trying to carry all of that is unreadable at any size.
586
+ * Labels carry only the callable's name. Signatures and docs belong to the tree rendering.
741
587
  */
742
588
  export declare class MermaidReportService {
743
589
  constructor();
@@ -760,13 +606,7 @@ export declare class MermaidReportService {
760
606
  }): string;
761
607
  }
762
608
 
763
- /**
764
- * Frames a stack needs before a report carries it.
765
- *
766
- * Two, because a single frame is a callable that calls nothing — accurate, but
767
- * not a call stack, and there are twice as many of those as there are real
768
- * ones.
769
- */
609
+ /** Frames a stack needs before a report carries it. A single frame is a callable that calls nothing, not a call stack. */
770
610
  export declare const MINIMUM_STACK_FRAMES = 2;
771
611
 
772
612
  /** Raised when the anchor helper is asked to write a file nothing named. */
@@ -796,19 +636,13 @@ export declare class OutputJsonService {
796
636
  /** Reads an existing report, returning an empty string if absent. */
797
637
  private readExisting;
798
638
  /**
799
- * Renders the JSON report for the traced findings.
800
- *
801
- * Ends with a newline so the file matches what a formatter would leave
802
- * behind, and so check mode does not fail over the one byte every other tool
803
- * in the repository adds.
639
+ * Renders the JSON report for the traced findings, ending with a newline so formatters and check
640
+ * mode agree.
804
641
  */
805
642
  buildReport(args: BuildReportArguments): string;
806
643
  /**
807
- * Syncs the configured JSON file with the current findings.
808
- *
809
- * In write mode the report is written, creating parent directories as
810
- * needed. In check mode nothing is written and the return value reports
811
- * whether the file already holds the current report.
644
+ * Syncs the configured JSON file with the findings: writes in write mode, and in check mode
645
+ * reports whether it is current.
812
646
  */
813
647
  sync(args: SyncJsonArguments): boolean;
814
648
  }
@@ -839,25 +673,13 @@ export declare class OutputMarkdownService {
839
673
  /** Reads a file, treating an absent one as empty. */
840
674
  private readExisting;
841
675
  /**
842
- * Cuts out a start marker's corrupted span and splices the fresh block in.
843
- *
844
- * Reached only when the start marker is present but the block's own end
845
- * marker cannot be found anywhere after it — the same file this
846
- * convention lets stack several anchored blocks back to back, so
847
- * everything is fair game to have drifted except one thing: another
848
- * block's own anchors. The span is cut at the next such anchor, or at the
849
- * end of the file when none follows, so the fresh block replaces exactly
850
- * what belonged to this one and nothing that belonged to another.
676
+ * Cuts a start marker's corrupted span, up to the next anchor or end of file, and splices the
677
+ * fresh block in.
851
678
  */
852
679
  private replaceOrphanedBlock;
853
680
  /**
854
- * Places the generated block into the file's current content.
855
- *
856
- * A pattern match replaces cleanly. No start marker at all falls back to
857
- * appending, the historical behavior for a file never written to before.
858
- * A start marker with no matching end can never satisfy the pattern —
859
- * silently leaving it in place is what let a run claim success while
860
- * changing nothing — so that span is cut out and replaced instead.
681
+ * Places the generated block: replaces a match, appends when no marker exists, and cuts a
682
+ * dangling start marker.
861
683
  */
862
684
  private spliceBlock;
863
685
  /** Builds the helpers a configured `writeBlock` function is handed. */
@@ -865,11 +687,8 @@ export declare class OutputMarkdownService {
865
687
  /** Syncs the configured markdown destination with the current findings. */
866
688
  sync(args: SyncMarkdownArguments): boolean;
867
689
  /**
868
- * Splices the anchored block into a file.
869
- *
870
- * Appends the block when the anchors are absent, creates the file when it
871
- * does not exist, and in check mode writes nothing and reports whether the
872
- * file already holds the current block.
690
+ * Splices the anchored block into a file, appending or creating it as needed, and in check mode
691
+ * only reports drift.
873
692
  */
874
693
  syncAnchoredBlock(args: SyncAnchoredBlockArguments): boolean;
875
694
  /** Wraps content in the configured anchors. */
@@ -927,75 +746,28 @@ export declare class ProjectReportsService {
927
746
  /** Reads the depth measured for one callable, or nothing if unmeasured. */
928
747
  private readDepth;
929
748
  /**
930
- * Reads the limits one project is judged against.
931
- *
932
- * A project the lookup does not name falls back to the workspace's, which is
933
- * what a project declaring nothing is given anyway — so a report arriving
934
- * from outside the resolved set is judged rather than silently exempted.
749
+ * Reads the limits one project is judged against, falling back to the workspace's for a project
750
+ * the lookup does not name.
935
751
  */
936
752
  private readProjectLimits;
937
753
  /** Builds one report per project, in the order the projects were traced. */
938
754
  build(args: BuildProjectReportsArguments): ProjectReport[];
939
755
  /**
940
- * Picks the stacks a run should fail on, deepest first.
941
- *
942
- * A filter over the stacks the reports already hold rather than a second
943
- * traversal: reconstructing the same paths twice would let the number the
944
- * gate fails on drift from the number the README publishes.
945
- *
946
- * Each project is judged against its own limit rather than one number for
947
- * the whole workspace, so a stack deeper than the project that roots it
948
- * allows is reported even when a noisier project elsewhere allows more.
949
- * The stack is judged by the project owning its entry point, which is the
950
- * project `build` already filed it under.
951
- *
952
- * `maximumDepth` is a positive integer, so a stack past it is at least two
953
- * deep and therefore survived the minimum-frame filter above.
756
+ * Picks the stacks a run should fail on, deepest first, each judged against its owning project's
757
+ * own limit.
954
758
  */
955
759
  findDeepStacks(args: {
956
760
  limits: ProjectLimitsLookup;
957
761
  reports: readonly ProjectReport[];
958
762
  }): DeepStackFinding[];
959
763
  /**
960
- * Picks the findings a named set of projects owns, and nothing else.
961
- *
962
- * For a run whose verdict covers fewer projects than its measurement did. A
963
- * finding's owner is already decided — `build` files a stack under the
964
- * project owning its entry point and a breadth report under the project
965
- * declaring the callable — so this selects among those reports rather than
966
- * deciding ownership a second way.
967
- *
968
- * A named project the reports do not hold contributes nothing rather than
969
- * being an error: a run may be pointed at a project whose files it then
970
- * found nothing in, and having read nothing is a fact for the caller's own
971
- * rules to judge.
764
+ * Picks the findings a named set of projects owns, and nothing else. A named project with no
765
+ * reports contributes nothing.
972
766
  */
973
767
  findOwnedFindings(args: FindOwnedFindingsArguments): OwnedFindings;
974
768
  /**
975
- * Picks the named projects a run opened no file of its own from.
976
- *
977
- * The companion to `findOwnedFindings`, and the reason it needs one: owning
978
- * no finding is what a clean project and an unread one look like from the
979
- * outside, and a caller judging only the findings cannot tell them apart.
980
- * The project's own `fileCount` is what separates them — `collect` counts a
981
- * file per project once the run's exclusions and the per-project ones have
982
- * had their say, so a project whose files were all filtered away reports
983
- * zero however much the rest of the run read.
984
- *
985
- * **Files rather than callables**, which is the weaker of the two questions
986
- * and the right one. A project can hold files that declare no callable at
987
- * all — one whose `tsconfig.json` names only its own configuration files and
988
- * its tests is the shape, and this repository has five — and those were
989
- * read, so a verdict on them is a verdict on something. Asking for a
990
- * callable would fail every one of them for containing no functions, which
991
- * is not a finding about anything. The cost is stated plainly: a project
992
- * whose sources are excluded while a configuration file of its own survives
993
- * counts as read.
994
- *
995
- * A named project with no report at all counts as unread rather than as an
996
- * error, the same way `findOwnedFindings` treats one: a run pointed at a
997
- * project the workspace configuration excludes never discovers it, and that
998
- * is exactly the case worth failing.
769
+ * Picks the named projects a run opened no file of its own from, judged by their file count
770
+ * rather than callables.
999
771
  */
1000
772
  findUnreadProjects(args: {
1001
773
  /** The projects entitled to fail on what they own. */
@@ -1003,17 +775,8 @@ export declare class ProjectReportsService {
1003
775
  reports: readonly ProjectReport[];
1004
776
  }): string[];
1005
777
  /**
1006
- * Picks the callables a run should fail on, widest first.
1007
- *
1008
- * A filter over the breadth reports the reports already hold, mirroring
1009
- * `findDeepStacks`, so the number the gate fails on cannot drift from the
1010
- * number the README publishes. A callable is judged by the project that
1011
- * declares it, which is the project `build` already filed it under.
1012
- *
1013
- * No default exists for `maximumBreadth`: until a configuration sets one,
1014
- * nothing can exceed it, so a project with no limit anywhere in its
1015
- * inheritance reports nothing rather than being judged against a number
1016
- * nobody chose.
778
+ * Picks the callables a run should fail on, widest first, each judged by its declaring project.
779
+ * No breadth limit means none fails.
1017
780
  */
1018
781
  findWideCallables(args: {
1019
782
  limits: ProjectLimitsLookup;
@@ -1044,15 +807,7 @@ declare interface RenderDepthReportsArguments {
1044
807
  }
1045
808
 
1046
809
  /**
1047
- * Arguments for rendering only the findings a gate weighs.
1048
- *
1049
- * No `rendering`, unlike `RenderRunArguments`: a gate's product is the list of
1050
- * things to go and fix, and a diagram of them is not that list.
1051
- *
1052
- * The findings themselves rather than the run that produced them, also unlike
1053
- * `RenderRunArguments`: a scoped gate judges fewer findings than its trace
1054
- * measured, and a renderer handed the whole run would print the ones it was
1055
- * not judged on.
810
+ * Arguments for rendering only the findings a gate weighs, not the whole run it measured.
1056
811
  */
1057
812
  export declare interface RenderFindingsArguments extends OwnedFindings {
1058
813
  readonly previewCount: number;
@@ -1067,13 +822,7 @@ export declare interface RenderProjectIndexArguments {
1067
822
  /** Arguments for rendering one project's section. */
1068
823
  export declare interface RenderProjectSectionArguments {
1069
824
  readonly heading: string;
1070
- /**
1071
- * The lookup the whole run resolved, rather than this project's two numbers.
1072
- *
1073
- * The renderer reads its own row out of it through the same `limitsFor` the
1074
- * index and the gate read, so a project's block and the workspace's view of
1075
- * that project cannot come to disagree about which limit applied.
1076
- */
825
+ /** The lookup the whole run resolved, so a project's block and the workspace's view of it cannot disagree on the limit. */
1077
826
  readonly limits: ProjectLimitsLookup;
1078
827
  readonly previewCount: number;
1079
828
  readonly rendering: StackRendering;
@@ -1127,45 +876,25 @@ export declare class ReportFindingsService {
1127
876
  private readonly logger;
1128
877
  constructor(logger: LoggerService);
1129
878
  /**
1130
- * Names the stacks that ran deeper than callidescope allows.
1131
- *
1132
- * Reported whether or not the run gates on them — a stack this long is worth
1133
- * saying out loud even in a run that only wrote a report — but only a run
1134
- * asked to fail on depth fails on it.
879
+ * Names the stacks that ran deeper than allowed. Reported whether or not the run gates on them;
880
+ * only a depth gate fails.
1135
881
  */
1136
882
  private reportDeepStacks;
1137
883
  /**
1138
- * Fails a run that traced nothing at all.
1139
- *
1140
- * Unconditional, and not something `--check` turns on. Every other finding
1141
- * is a verdict on code that was read; this one says no code was read, and a
1142
- * gate that passes because it never looked is worse than one that fails —
1143
- * it reports the workspace as clean and there is nothing in the output to
1144
- * say otherwise.
884
+ * Fails a run that traced nothing at all, unconditionally, since a gate that never looked must
885
+ * not pass.
1145
886
  */
1146
887
  private reportEmptyTrace;
1147
888
  /** Names the destinations that no longer hold what a fresh run would write. */
1148
889
  private reportStaleness;
1149
890
  /**
1150
- * Names the callables that called more things directly than callidescope
1151
- * allows.
1152
- *
1153
- * Reported whether or not the run gates on them, mirroring
1154
- * `reportDeepStacks` — but only a run asked to fail on breadth fails on it.
891
+ * Names the callables that call more things directly than allowed. Reported always; only a breadth
892
+ * gate fails on them.
1155
893
  */
1156
894
  private reportWideCallables;
1157
895
  /**
1158
- * Weighs every finding a run can produce, and fails on any of them.
1159
- *
1160
- * They are weighed separately and announced separately. A stack that is too
1161
- * deep is something the code does; a callable calling too many things is
1162
- * something else the code does; a stale report is something the checkout
1163
- * has not caught up with. Reading one as another sends the author to fix
1164
- * the wrong thing.
1165
- *
1166
- * A project that could not be read never reaches here: it ends the trace
1167
- * before anything is printed or written, and is reported by
1168
- * `CallidescopeCommand` itself.
896
+ * Weighs every finding a run can produce and fails on any of them, announcing each kind
897
+ * separately so its fix is clear.
1169
898
  */
1170
899
  reportFindings(args: ReportFindingsArguments): void;
1171
900
  }
@@ -1192,39 +921,17 @@ export declare class ReportService {
1192
921
  /** Renders what a frame warns about: that it recurses, that it is on its way out. */
1193
922
  private renderMarkers;
1194
923
  /**
1195
- * Renders a callable's signature, collapsing one that is too long.
1196
- *
1197
- * The return type survives the collapse. Which twelve services a constructor
1198
- * takes is noise at the point where someone is reading a stack; what it hands
1199
- * back is not.
924
+ * Renders a callable's signature, collapsing a long one while keeping the return type.
1200
925
  */
1201
926
  private renderSignature;
1202
927
  /**
1203
- * Shortens a summary to what fits under an indented frame.
1204
- *
1205
- * The opening sentence first, because a comment that runs long here is a
1206
- * short statement of what the callable does followed by paragraphs of why —
1207
- * and the first half is the half that orients someone reading a stack. It is
1208
- * printed whole and unmarked: it is a complete thought, not an elision, and
1209
- * the frame's `file:line` is already the pointer to the rest.
1210
- *
1211
- * Cutting at the character instead throws away a sentence boundary that was
1212
- * usually right there. Across this repository that happens to a fifth of
1213
- * printed summaries, whose opening sentences run about 64 characters at the
1214
- * median and 113 at the very longest.
1215
- *
1216
- * A single sentence longer than the limit has no boundary to find, so it is
1217
- * cut on a word — half a word reads as a typo rather than as an elision —
1218
- * and marked as cut short.
928
+ * Shortens a summary to fit an indented frame, keeping the opening sentence whole, or
929
+ * cutting on a word and marking it.
1219
930
  */
1220
931
  private shortenSummary;
1221
932
  /**
1222
- * Renders every frame of a stack, the entry point first.
1223
- *
1224
- * Takes anything holding a frame list rather than a full `CallStack`: a
1225
- * depth or entry-point kind is never read here, so a caller with a path
1226
- * that has neither — an address-centered lookup, for one — does not have to
1227
- * fabricate one to call this.
933
+ * Renders every frame of a stack, entry point first, from anything holding a frame list, not only
934
+ * a full `CallStack`.
1228
935
  */
1229
936
  renderStackTree(stack: {
1230
937
  frames: readonly StackFrame[];
@@ -1234,40 +941,16 @@ export declare class ReportService {
1234
941
  /** Stands in for the workspace root when it is itself a traced project. */
1235
942
  export declare const ROOT_PROJECT_LABEL = ".";
1236
943
 
1237
- /**
1238
- * Ends a sentence, when the next one starts.
1239
- *
1240
- * A capital after the space is what separates a sentence break from `e.g. the`
1241
- * or a dotted identifier, neither of which ends anything.
1242
- */
944
+ /** Ends a sentence when the next one starts. The capital after the space tells a break from `e.g.` or a dotted identifier. */
1243
945
  export declare const SENTENCE_END_PATTERN: RegExp;
1244
946
 
1245
- /**
1246
- * Characters of signature a frame prints before it collapses the parameters.
1247
- *
1248
- * Most signatures here are short — the median is under twenty characters — but
1249
- * a NestJS constructor taking a dozen injected services runs past four hundred,
1250
- * and one of those inside an indented stack destroys the shape that makes the
1251
- * stack readable at all.
1252
- */
947
+ /** Characters of signature a frame prints before collapsing the parameters. Long injected constructors would otherwise break the stack's shape. */
1253
948
  export declare const SIGNATURE_LIMIT = 80;
1254
949
 
1255
- /**
1256
- * How a report draws the stacks it found.
1257
- *
1258
- * Narrower than `CallidescopeOutputFormat` on purpose: `json` is a different
1259
- * report rather than a different drawing of this one, and a renderer that had
1260
- * to accept it would carry a case it can never answer.
1261
- */
950
+ /** How a report draws its stacks. Narrower than the output format: `json` is a different report, not a drawing of this one. */
1262
951
  export declare type StackRendering = "diagram" | "tree";
1263
952
 
1264
- /**
1265
- * Characters of documentation prose a printed frame keeps.
1266
- *
1267
- * A summary is meant to orient a reader mid-stack, not to replace opening the
1268
- * file, and a paragraph indented under ten frames is worse than a sentence.
1269
- * Only the tree is bound by this — the JSON report carries the whole comment.
1270
- */
953
+ /** Characters of documentation prose a printed frame keeps. The tree orients a reader; the JSON report keeps the whole comment. */
1271
954
  export declare const SUMMARY_LIMIT = 120;
1272
955
 
1273
956
  /** Introduces the documentation line printed under a frame. */
@@ -1288,19 +971,9 @@ export declare interface SyncDestinationsArguments {
1288
971
  /** The depth and breadth limits each traced project is judged against. */
1289
972
  readonly projectLimits: ProjectLimitsLookup;
1290
973
  readonly result: CallGraphResult;
1291
- /**
1292
- * Workspace-relative root of each project the run was scoped to, keyed by
1293
- * name. Only these projects have a section published, so a scoped run never
1294
- * writes into a dependency it merely measured.
1295
- */
974
+ /** Root of each scoped project, keyed by name. Only these get a published section, never a measured-only dependency. */
1296
975
  readonly startingProjectRoots: ReadonlyMap<string, string>;
1297
- /**
1298
- * The written destinations each project declared for itself, by name.
1299
- *
1300
- * Every traced project declares a complete configuration, so every one of
1301
- * them is named here — a project publishing nothing wrote `markdown:
1302
- * undefined` rather than being absent.
1303
- */
976
+ /** Destinations each project declared, by name. A project publishing nothing names `markdown: undefined`, never absence. */
1304
977
  readonly writeByProject: ReadonlyMap<string, ResolvedCallidescopeWriteConfiguration>;
1305
978
  }
1306
979
 
@@ -1310,10 +983,8 @@ export declare interface SyncJsonArguments extends BuildReportArguments {
1310
983
  }
1311
984
 
1312
985
  /**
1313
- * Arguments for syncing the configured markdown destination.
1314
- *
1315
- * The rendered markdown arrives already built: what a report says belongs to
1316
- * the report module, and this one only decides where it lands.
986
+ * Arguments for syncing the configured markdown destination. The markdown arrives already
987
+ * rendered; this only decides where it lands.
1317
988
  */
1318
989
  export declare interface SyncMarkdownArguments {
1319
990
  readonly check: boolean;
@@ -1339,44 +1010,23 @@ export declare interface SyncProjectSectionsArguments {
1339
1010
  export declare const TRUNCATION_SUFFIX = "\u2026";
1340
1011
 
1341
1012
  /**
1342
- * Renders what a whole run says about the projects in it, rather than about
1343
- * one callable or one stack.
1344
- *
1345
- * Its own service because it answers a question the rest of the report cannot.
1346
- * Every other section names callables — a stack, a spread, a wide callable —
1347
- * and a workspace holding fifty projects is not readable as a list of
1348
- * callables. These two sections are the index and the scoreboard: which
1349
- * project holds what, and how much room each has left before its own limit
1350
- * stops it.
1013
+ * Renders what a whole run says about the projects in it, rather than one callable or stack.
1351
1014
  *
1352
- * Both are keyed on a project's own resolved limit rather than one workspace
1353
- * number. A limit pinned by the single worst stack anywhere in a repository
1354
- * gates nothing for the projects nowhere near it, which is the whole reason
1355
- * limits resolve per project — so a report that showed one number would be
1356
- * describing a model the tool no longer has.
1015
+ * Its two sections are the index and the scoreboard: which project holds what, and how much room
1016
+ * each has before its own limit stops it. Both key on each project's resolved limit.
1357
1017
  */
1358
1018
  export declare class WorkspaceReportService {
1359
1019
  constructor();
1360
1020
  /**
1361
- * Sorts a project's headroom into the bucket the scoreboard counts it under.
1362
- *
1363
- * A project measuring nothing is its own bucket rather than a large
1364
- * headroom, and that distinction is the point of having the scoreboard at
1365
- * all: a project whose deepest stack is zero has every frame of its limit
1366
- * unused, which reads as the safest row in the table while actually being
1367
- * the one row where the limit gates nothing. Bucketing it by `limit - 0`
1368
- * would file the least-gated projects among the healthiest.
1021
+ * Sorts a project's headroom into its scoreboard bucket. A project measuring nothing gets its own
1022
+ * bucket, not a large headroom.
1369
1023
  */
1370
1024
  private bucketFor;
1371
1025
  /** The widest single callable a project declares, or zero when it has none. */
1372
1026
  private widestBreadth;
1373
1027
  /**
1374
- * Reads each project's report and its resolved limits into one row.
1375
- *
1376
- * Public so both sections render from the same rows rather than each
1377
- * deriving them: the scoreboard counts exactly the rows the index lists, and
1378
- * two derivations of "headroom" that could disagree would be worse than one
1379
- * that is merely wrong.
1028
+ * Reads each project's report and resolved limits into one row, so both sections render from the
1029
+ * same rows.
1380
1030
  */
1381
1031
  buildRows(args: RenderProjectIndexArguments): ProjectIndexRow[];
1382
1032
  /** The limits one project resolved to, or the workspace's when unlisted. */
@@ -1385,21 +1035,13 @@ export declare class WorkspaceReportService {
1385
1035
  projectName: string;
1386
1036
  }): ProjectLimits;
1387
1037
  /**
1388
- * Counts how many projects sit in each headroom bucket.
1389
- *
1390
- * The index says what every project holds; this says what the set of them
1391
- * adds up to, which is the number a ratchet is actually lowered against. A
1392
- * bucket nothing falls into is still printed, because "nothing is over its
1393
- * limit" is the row a reader is looking for and an absent row cannot say it.
1038
+ * Counts how many projects sit in each headroom bucket. Empty buckets are still printed, since
1039
+ * 'nothing over its limit' must show.
1394
1040
  */
1395
1041
  renderHeadroom(rows: readonly ProjectIndexRow[]): string;
1396
1042
  /**
1397
- * Renders one row per project: what it measured, and what it is held to.
1398
- *
1399
- * `Limit` is a bare number now. It used to carry `declared` or `inherited`
1400
- * beside it, and with every traced project's configuration complete only one
1401
- * of those two is reachable — a column with one value in every row is worse
1402
- * than no column.
1043
+ * Renders one row per project: what it measured, and its limit as a bare number, since only one
1044
+ * origin is reachable.
1403
1045
  */
1404
1046
  renderProjectIndex(args: RenderProjectIndexArguments): string;
1405
1047
  }
@@ -1419,11 +1061,8 @@ export declare class WriteDestinationsModule {
1419
1061
  /**
1420
1062
  * Writes a finished run to every destination it was configured with.
1421
1063
  *
1422
- * Its own service rather than more of the command, because the two answer
1423
- * different questions: the command decides whether a run may write at all, and
1424
- * this decides where what it found lands. There are two answers to that second
1425
- * question — the workspace's own declarations and each project's — and keeping
1426
- * them side by side is what stops one writing over the other.
1064
+ * Kept apart from the command: the command decides whether a run may write, and this decides where
1065
+ * the findings land, for both the workspace and each project.
1427
1066
  */
1428
1067
  export declare class WriteDestinationsService {
1429
1068
  private readonly markdownReportService;
@@ -1431,16 +1070,8 @@ export declare class WriteDestinationsService {
1431
1070
  private readonly outputMarkdownService;
1432
1071
  constructor(markdownReportService: MarkdownReportService, outputJsonService: OutputJsonService, outputMarkdownService: OutputMarkdownService);
1433
1072
  /**
1434
- * Writes the destinations each project declared for itself, returning the
1435
- * stale ones.
1436
- *
1437
- * A path is read relative to that project's own root, which is what keeps a
1438
- * project's declaration about its own documents rather than about the
1439
- * repository's — a project cannot write into a sibling by declaring one.
1440
- *
1441
- * Only the projects a run was scoped to are published: a dependency measured
1442
- * through the closure has its own run to publish it, and this one was never
1443
- * pointed at it.
1073
+ * Writes the destinations each project declared for itself, returning the stale ones.
1074
+ * Paths are relative to each project's own root.
1444
1075
  */
1445
1076
  private syncProjectDestinations;
1446
1077
  /** Writes one project's declared destinations, returning the stale ones. */
package/package.json CHANGED
@@ -4,9 +4,9 @@
4
4
  "url": "https://github.com/organizzolini/codebase/issues"
5
5
  },
6
6
  "dependencies": {
7
- "@callidescope/configuration": "0.0.78",
8
- "@callidescope/core": "0.0.77",
9
- "@callidescope/graph": "0.0.77",
7
+ "@callidescope/configuration": "0.0.79",
8
+ "@callidescope/core": "0.0.78",
9
+ "@callidescope/graph": "0.0.78",
10
10
  "@nestjs/common": "^11.1.21 || ^12.0.1",
11
11
  "pino": "^10.3.1",
12
12
  "pino-pretty": "^13.1.3",
@@ -63,5 +63,5 @@
63
63
  "strict": true
64
64
  },
65
65
  "types": "./dist/src/index.d.ts",
66
- "version": "0.0.77"
66
+ "version": "0.0.78"
67
67
  }