@callidescope/nx 0.0.78 → 0.0.80

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,27 @@
1
+ ## 0.0.80 (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-output to 0.0.78
11
+ - Updated callidescope-graph to 0.0.78
12
+ - Updated callidescope-core to 0.0.78
13
+ - Updated callidescope-cli to 0.0.79
14
+
15
+ ## 0.0.79 (2026-11-10)
16
+
17
+ ### 🧱 Updated Dependencies
18
+
19
+ - Updated callidescope-configuration to 0.0.78
20
+ - Updated callidescope-output to 0.0.77
21
+ - Updated callidescope-graph to 0.0.77
22
+ - Updated callidescope-core to 0.0.77
23
+ - Updated callidescope-cli to 0.0.78
24
+
1
25
  ## 0.0.78 (2026-11-10)
2
26
 
3
27
  ### 🧱 Updated Dependencies
@@ -2,12 +2,7 @@ import { ExecutorContext } from '@nx/devkit';
2
2
 
3
3
  /** Options the `depth` and `breadth` executors accept. */
4
4
  declare interface AddressExecutorOptions {
5
- /**
6
- * The callables to look up, each `<file>#<qualified-name>`.
7
- *
8
- * Plural to match the `--addresses` the command line takes, so one target
9
- * run answers about a whole rename rather than one callable at a time.
10
- */
5
+ /** The callables to look up, each `<file>#<qualified-name>`. Plural, so one run answers about a whole rename. */
11
6
  readonly addresses?: string[] | undefined;
12
7
  readonly configuration: string;
13
8
  readonly format?: string | undefined;
@@ -20,11 +15,7 @@ declare interface AddressExecutorOptions {
20
15
  }
21
16
 
22
17
  /**
23
- * Prints each named callable's direct callers and callees side by side — the two questions a rename or a refactor needs answered together.
24
- *
25
- * The addresses are resolved against the target's own project and its Nx
26
- * dependencies rather than the whole workspace, which is both faster than the
27
- * `callidescope breadth` command and the set the addresses actually belong to.
18
+ * Prints each named callable's direct callers and callees, resolved within the target's Nx scope.
28
19
  */
29
20
  declare function breadthExecutor(options: AddressExecutorOptions, context: ExecutorContext): Promise<{
30
21
  success: boolean;
@@ -2,12 +2,7 @@ import { ExecutorContext } from '@nx/devkit';
2
2
 
3
3
  /** Options the `depth` and `breadth` executors accept. */
4
4
  declare interface AddressExecutorOptions {
5
- /**
6
- * The callables to look up, each `<file>#<qualified-name>`.
7
- *
8
- * Plural to match the `--addresses` the command line takes, so one target
9
- * run answers about a whole rename rather than one callable at a time.
10
- */
5
+ /** The callables to look up, each `<file>#<qualified-name>`. Plural, so one run answers about a whole rename. */
11
6
  readonly addresses?: string[] | undefined;
12
7
  readonly configuration: string;
13
8
  readonly format?: string | undefined;
@@ -20,11 +15,7 @@ declare interface AddressExecutorOptions {
20
15
  }
21
16
 
22
17
  /**
23
- * Prints every call stack above and below each named callable — every caller chain up to a root, every callee chain down to a leaf.
24
- *
25
- * The addresses are resolved against the target's own project and its Nx
26
- * dependencies rather than the whole workspace, which is both faster than the
27
- * `callidescope depth` command and the set the addresses actually belong to.
18
+ * Prints every call stack above and below each named callable, resolved within the target's Nx scope.
28
19
  */
29
20
  declare function depthExecutor(options: AddressExecutorOptions, context: ExecutorContext): Promise<{
30
21
  success: boolean;
@@ -2,25 +2,13 @@ import { ExecutorContext } from '@nx/devkit';
2
2
  import { TaskGraph } from '@nx/devkit';
3
3
 
4
4
  /**
5
- * Gates every task Nx batched for this executor from one trace.
6
- *
7
- * One `gate` task per project used to trace the whole workspace on its own, so
8
- * the cold run of a workspace of ~60 projects traced it ~60 times. A batch
9
- * traces the combined scope once and judges each task by its own project's
10
- * findings, so each still passes or fails alone and is still cached alone —
11
- * Nx hashes and replays batched tasks one by one. Tasks that name different
12
- * configuration files cannot share a trace, so they are batched per file.
5
+ * Gates every task Nx batched from one shared trace, judging each task by its own
6
+ * project's findings.
13
7
  */
14
8
  declare function gateBatchExecutor(...[taskGraph, options, overrides, context]: GateBatchExecutorArguments): Promise<Record<string, GateBatchTaskResult>>;
15
9
  export default gateBatchExecutor;
16
10
 
17
- /**
18
- * The four arguments Nx calls a batch executor with, in the order it passes them.
19
- *
20
- * A tuple rather than four parameters because Nx fixes that signature and the
21
- * workspace holds a function to three: the task graph, each task's resolved
22
- * options by task id, the overrides of the whole run, and the context.
23
- */
11
+ /** Arguments Nx passes a batch executor, in order: task graph, per-task options, run overrides, and context. */
24
12
  declare type GateBatchExecutorArguments = [
25
13
  taskGraph: TaskGraph,
26
14
  options: Record<string, GateExecutorOptions>,
@@ -29,11 +17,7 @@ context: ExecutorContext
29
17
  ];
30
18
 
31
19
  /**
32
- * What one task of a gate batch settled on.
33
- *
34
- * Nx's own type for a batch executor's result is not exported through
35
- * `@nx/devkit`, so this states the shape Nx reads back: whether the task
36
- * passed, and the output to show and to store with it in the cache.
20
+ * What one task of a gate batch settled on: pass or fail, and the output Nx caches.
37
21
  */
38
22
  declare interface GateBatchTaskResult {
39
23
  readonly success: boolean;
@@ -1,22 +1,7 @@
1
1
  import { ExecutorContext } from '@nx/devkit';
2
2
 
3
3
  /**
4
- * Fails one project's task when its call stacks broke the limits it is held to.
5
- *
6
- * The gate rather than the trace: `trace` prints every stack in a project for
7
- * somebody reading it, and this prints only the stacks and callables that
8
- * decided the exit code, which is what a failed pipeline is asked to explain.
9
- *
10
- * Inferred onto every project holding a `tsconfig.json` that the workspace
11
- * configuration does not exclude, so `nx affected -t gate` gates a branch by
12
- * the projects it changed — and a project whose stacks got deeper is named by
13
- * the task that failed, which one workspace-wide task never could.
14
- *
15
- * With neither `projects` nor `tags` given, the selection is the project this
16
- * target belongs to, widened along the Nx dependency graph: a stack truncated
17
- * at a package boundary measures the wrong thing. The widening decides what is
18
- * traced and not what is judged — a dependency's breach fails the dependency's
19
- * own gate, which is the task named after the project that owns it.
4
+ * Fails one project's task when its call stacks break their limits. Prints only the deciding stacks.
20
5
  */
21
6
  declare function gateExecutor(options: GateExecutorOptions, context: ExecutorContext): Promise<{
22
7
  success: boolean;
@@ -1,17 +1,7 @@
1
1
  import { ExecutorContext } from '@nx/devkit';
2
2
 
3
3
  /**
4
- * Traces one selection of Nx projects with callidescope.
5
- *
6
- * Inferred onto every project holding a `tsconfig.json`, so
7
- * `nx run-many -t callidescope-trace` covers the workspace,
8
- * `nx run-many -t callidescope-trace --projects=tag:type:package` covers a
9
- * category, and `nx affected -t callidescope-trace` covers only what changed
10
- * — none of which the workspace-wide command can do, and none of which needs
11
- * a flag of its own: selecting projects is what the task runner is for.
12
- *
13
- * With neither `projects` nor `tags` given, the selection is the project this
14
- * target belongs to.
4
+ * Traces one selection of Nx projects, defaulting to the target's own project when none are named.
15
5
  */
16
6
  declare function traceExecutor(options: TraceExecutorOptions, context: ExecutorContext): Promise<{
17
7
  success: boolean;
@@ -20,14 +20,11 @@ export declare class AddressModule {
20
20
  }
21
21
 
22
22
  /**
23
- * Answers `depth` and `breadth` about the callables it is named, inside a
24
- * resolved selection of Nx projects.
23
+ * Answers `depth` and `breadth` about the callables it is named, inside a resolved
24
+ * selection of Nx projects.
25
25
  *
26
- * The lookup itself is callidescope's — this only decides what it is asked
27
- * about. What the plugin adds is the scope: the CLI resolves an address
28
- * against the whole workspace, while here it is resolved against one project
29
- * and its Nx dependencies, which is both faster and the set the address
30
- * actually belongs to.
26
+ * The lookup is callidescope's. This adds the scope: the address resolves against one
27
+ * project and its Nx dependencies, which is faster and the set it belongs to.
31
28
  */
32
29
  export declare class AddressService {
33
30
  private readonly addressLookupService;
@@ -36,20 +33,13 @@ export declare class AddressService {
36
33
  private readonly breadthService;
37
34
  constructor(addressLookupService: AddressLookupService, addressReportService: AddressReportService, addressDepthService: AddressDepthService, breadthService: BreadthService);
38
35
  /**
39
- * Matches one address against an already-traced selection, or explains why
40
- * it could not be.
41
- *
42
- * The explanation is returned rather than logged: an executor's product is
43
- * what it writes to stdout, and a reader looking at a failed task needs the
44
- * reason in the same place the report would have been.
36
+ * Matches one address against a traced selection, or returns why it could not. Returned,
37
+ * not logged, so a failed task shows it.
45
38
  */
46
39
  private identify;
47
40
  /**
48
- * Traces the selection, then matches every address against it.
49
- *
50
- * All or nothing, the way the command line is: a task that printed the
51
- * addresses it understood and skipped the rest would report a partial
52
- * answer under a `success` nobody asked it to qualify.
41
+ * Traces the selection, then matches every address against it. All or nothing,
42
+ * like the command line.
53
43
  */
54
44
  private locate;
55
45
  /** Prints each callable's direct callers and callees, side by side. */
@@ -87,25 +77,10 @@ export declare const DEFAULT_BREADTH_TARGET_NAME = "callidescope-breadth";
87
77
  /** Name of the inferred per-project depth-lookup target. */
88
78
  export declare const DEFAULT_DEPTH_TARGET_NAME = "callidescope-depth";
89
79
 
90
- /**
91
- * Name of the inferred per-project gate target.
92
- *
93
- * Named after what it decides rather than after what it measures. `trace`,
94
- * `depth`, and `breadth` all print something a reader asked for; this one is
95
- * the target here a pipeline is meant to read an exit code from, so it says
96
- * `gate`.
97
- */
80
+ /** Inferred per-project gate target. Named for the verdict it gives, since a pipeline reads its exit code. */
98
81
  export declare const DEFAULT_GATE_TARGET_NAME = "callidescope-restrict";
99
82
 
100
- /**
101
- * Names of the inferred per-project targets, when the registration names none.
102
- *
103
- * Prefixed defaults keep inferred tasks grouped and recognizable in Nx task
104
- * lists, and avoid collisions with generic names in workspaces carrying
105
- * several toolchains.
106
- *
107
- * Every one of them is overridable from the `nx.json` registration.
108
- */
83
+ /** Names of the inferred per-project targets when registration names none. Prefixed, so they group and avoid collisions. */
109
84
  export declare const DEFAULT_TRACE_TARGET_NAME = "callidescope-trace";
110
85
 
111
86
  /** A target this plugin infers onto a project. */
@@ -131,13 +106,7 @@ declare interface InferTargetsArguments {
131
106
  /** A loaded configuration, beside the path the loader settled on. */
132
107
  declare interface LoadedRunConfiguration {
133
108
  readonly configuration: ResolvedCallidescopeConfiguration;
134
- /**
135
- * Where the configuration was read from.
136
- *
137
- * The path the loader settled on rather than the one it was handed, since a
138
- * relative path is resolved before it is read — and a run resolves a
139
- * project's own configuration relative to it.
140
- */
109
+ /** Where the configuration was read from: the path the loader settled on, since a relative one is resolved before reading. */
141
110
  readonly path: string;
142
111
  }
143
112
 
@@ -180,14 +149,8 @@ export declare class MainModule {
180
149
  }
181
150
 
182
151
  /**
183
- * One Nx project, reduced to what a directory resolution needs of it.
184
- *
185
- * `codependix-nx-projects` declares a near-identical shape and reads it out of the
186
- * graph the same way. They are deliberately not shared: the two packages sit
187
- * in different toolchains, and `configuration/eslint.config.ts` lets this one
188
- * depend on nothing but `logging` precisely so `@nx/devkit` cannot spread. A
189
- * package extracted to hold both would have to be depended on by both, which
190
- * is the coupling that rule exists to prevent.
152
+ * One Nx project, reduced to what directory resolution needs. Deliberately not shared with
153
+ * `codependix-nx-projects`, which sits in another toolchain.
191
154
  */
192
155
  export declare interface NxProject {
193
156
  readonly name: string;
@@ -217,19 +180,13 @@ export declare class OptionsService {
217
180
  /** Reads a string field from an untrusted record, or `undefined`. */
218
181
  private readString;
219
182
  /**
220
- * Reads the `configuration` option of an executor, refusing a missing one.
221
- *
222
- * Nx validates the option against `schema.json`, but a target written by hand
223
- * reaches an executor unchecked, so the same refusal the plugin option gets —
224
- * decided by the configuration layer — is applied here.
183
+ * Reads the `configuration` option of an executor, refusing a missing one, since
184
+ * hand-written targets skip `schema.json`.
225
185
  */
226
186
  readConfiguration(value: unknown): string;
227
187
  /**
228
- * Narrows an untrusted output format to one callidescope renders.
229
- *
230
- * A target written by hand in a `project.json` bypasses the executor's
231
- * `schema.json` enum, so an unrecognized value falls back to whatever the
232
- * configuration chose rather than reaching the renderer.
188
+ * Narrows an untrusted output format to one callidescope renders, since hand-written targets
189
+ * bypass the `schema.json` enum.
233
190
  */
234
191
  readFormat(value: unknown): CallidescopeOutputFormat | undefined;
235
192
  /**
@@ -244,21 +201,13 @@ export declare class OptionsService {
244
201
  format: CallidescopeOutputFormat | undefined;
245
202
  };
246
203
  /**
247
- * Reads a list of strings out of an executor's options.
248
- *
249
- * Nx validates an option against its `schema.json` before the executor sees
250
- * it, but a target written by hand in a `project.json` reaches here
251
- * unchecked, so a non-array or a list holding non-strings is narrowed rather
252
- * than trusted. Entries are trimmed and the blanks dropped, so a trailing
253
- * comma in `--projects a,b,` names two projects rather than three.
204
+ * Reads a list of strings from executor options, trimming entries and dropping blanks, so
205
+ * `a,b,` names two projects.
254
206
  */
255
207
  readStringList(value: unknown): string[];
256
208
  /**
257
- * Resolves the effective plugin options from an untrusted value.
258
- *
259
- * Every field has a default except `configurationPath`: the workspace
260
- * configuration is never searched for, so a registration that does not name
261
- * it is refused rather than guessed at.
209
+ * Resolves the effective plugin options from an untrusted value. Only `configurationPath`
210
+ * has no default, and it is never searched for.
262
211
  */
263
212
  resolvePluginOptions(options: unknown): CallidescopePluginOptions;
264
213
  }
@@ -285,133 +234,54 @@ export declare class PluginService {
285
234
  private readonly verdictService;
286
235
  constructor(callidescopeService: CallidescopeService, configurationService: ConfigurationService, fileFilterService: FileFilterService, markdownReportService: MarkdownReportService, optionsService: OptionsService, projectsService: ProjectsService, runConfigurationService: RunConfigurationService, verdictService: VerdictService);
287
236
  /**
288
- * Builds the predicate deciding which projects the workspace configuration
289
- * keeps out of every trace.
290
- *
291
- * The run's own filter, built from the same two fields
292
- * `WorkspaceService.discoverProjects` builds it from and asked the same
293
- * question it asks — is this project's `tsconfig.json` excluded — so
294
- * inference and discovery can never disagree about which projects a run
295
- * covers.
296
- *
297
- * A configuration that cannot be loaded excludes nothing. This runs while Nx
298
- * is building the project graph, where a thrown error stops every command in
299
- * the workspace rather than one task; the executor loads the same file again
300
- * and refuses there, where a refusal is about the run that asked for it.
237
+ * Builds the predicate for projects the workspace configuration excludes from every trace.
238
+ * A configuration that cannot load excludes nothing.
301
239
  */
302
240
  private buildExclusionFilter;
303
241
  /**
304
- * Builds one project's targets, gate included unless it is excluded.
305
- *
306
- * An excluded project gets the three that print something and not the one
307
- * that decides an exit code. Its own code is never traced — discovery drops
308
- * it before its `tsconfig.json` is opened — so a gate there would own no
309
- * finding at all and report green for a project it never read.
310
- * `projects/ic-suite/callidescope/callidescope-examples` is the case: its fixtures exist to breach
311
- * the limits, which is why `.callidescopeignore` names it.
312
- *
313
- * That sentence is what `runTrace`'s exemption from the unread rule keeps
314
- * true: such a project reads nothing of its own by definition, so a trace
315
- * failing on that would hand it a permanently red target.
242
+ * Builds one project's targets, with the gate only when the project is not excluded. An
243
+ * excluded gate would pass without reading anything.
316
244
  */
317
245
  private buildInferredTargets;
318
246
  /** Whether a project's directory holds a TypeScript program to trace. */
319
247
  private holdsProgram;
320
248
  /**
321
- * Whether the workspace configuration excludes this project outright.
322
- *
323
- * The project's own `tsconfig.json` is the path asked about, because that is
324
- * the path `WorkspaceService.discoverProjects` asks about — a project is
325
- * excluded when the file that makes it a project is.
326
- *
327
- * Joined with `path.posix` rather than `path.join`, unlike `holdsProgram`
328
- * beside it: a filter matches the workspace-relative POSIX paths git and the
329
- * exclusion globs are written in, where `holdsProgram` hands `existsSync` a
330
- * native absolute path.
249
+ * Whether the workspace configuration excludes this project, judged by its `tsconfig.json`
250
+ * path in POSIX form.
331
251
  */
332
252
  private isExcludedProject;
333
253
  /**
334
- * Turns one traced outcome into the gate's result for the projects it judges.
335
- *
336
- * What to print comes from the verdict: the findings it judged, or, for a
337
- * run that read nothing and so has none to show, the reason it failed. The
338
- * one thing added to that verdict is the exit code for an unread judged
339
- * project, which is the gate's alone — see `VerdictService.judge`.
254
+ * Turns one traced outcome into the gate's result, printing the verdict's findings or its
255
+ * reason. A gate alone fails unread projects.
340
256
  */
341
257
  private renderGateVerdict;
342
258
  /**
343
- * States what a selection asked for that the workspace does not have.
344
- *
345
- * Both kinds of mistake are named at once, each beside the vocabulary it
346
- * was drawn from, so a command line with two typos in it is two typos to
347
- * fix rather than two runs.
259
+ * States what a selection asked for that the workspace does not have, naming every typo at once.
348
260
  */
349
261
  describeRefusedScope(scope: ResolvedTraceScope): string;
350
262
  /**
351
- * Infers this plugin's targets onto every project holding a `tsconfig.json`.
352
- *
353
- * A project with no program of its own is skipped rather than given a target
354
- * that would trace nothing — `callidescope` warns and moves on, so an
355
- * inferred target there would be a permanently empty report. The
356
- * workspace-root project is skipped for the opposite reason: it contains
357
- * every other project, so its target would trace the whole workspace under
358
- * one uncacheable task.
359
- *
360
- * Asynchronous because the gate is only inferred onto a project the
361
- * workspace configuration does not exclude, and only that file can say which
362
- * projects those are — see `buildExclusionFilter`, which is read once here
363
- * rather than once per project for the same reason the plugin options are.
263
+ * Infers this plugin's targets onto every project holding a `tsconfig.json`, skipping the
264
+ * workspace root and projects without a program.
364
265
  */
365
266
  inferTargets(args: InferTargetsArguments): Promise<Map<string, InferredTargets>>;
366
267
  /**
367
- * Resolves an executor's `projects`/`tags` selection into directories.
368
- *
369
- * The selection is widened along the Nx dependency graph unless asked not to
370
- * be — see `ProjectsService.resolveDependencyClosure` for why a trace that
371
- * stops at a project's own boundary measures the wrong thing. Two sets of
372
- * directories come back for that reason: what the widened selection reads,
373
- * and what the selection itself is answerable for.
268
+ * Resolves an executor's `projects`/`tags` selection into directories, widened along the Nx
269
+ * graph unless told not to.
374
270
  */
375
271
  resolveTraceScope(args: ResolveTraceScopeArguments): Promise<ResolvedTraceScope>;
376
272
  /**
377
- * Traces the resolved directories and judges what it found against the
378
- * limits every project in scope declared.
379
- *
380
- * The verdict is `judge`'s, which is where the rules are written; this
381
- * chooses what to print for it — the findings it judged, or, for a run that
382
- * read nothing and so has none to show, the reason it failed instead.
383
- *
384
- * The one thing it adds to that verdict is the exit code for an unread
385
- * judged project, which is the gate's alone — see `judge`.
273
+ * Traces the resolved directories and judges the findings against each in-scope project's
274
+ * declared limits.
386
275
  */
387
276
  runGate(args: RunGateArguments): Promise<RunTraceResult>;
388
277
  /**
389
- * Gates every task of a batch from one trace of their combined scope.
390
- *
391
- * Each gate used to trace the whole workspace on its own, so a run of ~60
392
- * projects traced it ~60 times. The trace reads the union of the tasks'
393
- * directories once, then every task is judged by `judge` on the projects it
394
- * alone answers for, exactly as `runGate` judges one — a breach the shared
395
- * trace found fails only the task whose project owns it, which is what keeps
396
- * a batch's verdicts the same as the separate runs' would have been.
278
+ * Gates every task of a batch from one trace of their combined scope, judging each task by
279
+ * the projects it owns.
397
280
  */
398
281
  runGateBatch(args: RunGateBatchArguments): Promise<Record<string, RunTraceResult>>;
399
282
  /**
400
- * Traces the resolved directories and renders the report.
401
- *
402
- * This is the whole of the "logic on top of core callidescope": the
403
- * selection above is Nx's to resolve, and everything below this line is
404
- * callidescope's own, reached through the same services the `callidescope`
405
- * command uses rather than through a subprocess.
406
- *
407
- * Judged by the same predicate the gate is, so the two targets cannot come
408
- * to disagree about what a passing run is. A run that read nothing keeps its
409
- * report and gains the reason underneath it: a summary table of zeroes is
410
- * what happened, not why it failed.
411
- *
412
- * The one rule the two act on differently: a judged project none of whose
413
- * own files were read is **printed here and not failed on**, where a gate
414
- * fails — see `judge` for why that is the one exemption.
283
+ * Traces the resolved directories and renders the report, judged by the gate's predicate.
284
+ * Unread projects print but do not fail.
415
285
  */
416
286
  runTrace(args: RunTraceArguments): Promise<RunTraceResult>;
417
287
  }
@@ -423,79 +293,38 @@ export declare class ProjectsModule {
423
293
  /**
424
294
  * Resolves Nx project names to the directories a callidescope run traces.
425
295
  *
426
- * This is the whole of callidescope's Nx awareness. `callidescope-cli` and
427
- * `callidescope-graph` know nothing about Nx and never read a project graph;
428
- * they take directories. What an Nx workspace has that plain paths do not is
429
- * a stable name for each of those directories, and turning one into the other
430
- * is the only thing this package is for.
296
+ * This is the only part of callidescope that knows about Nx. The CLI and graph
297
+ * packages take plain directories, so this turns a stable project name into one.
431
298
  *
432
- * The project graph is passed in rather than read here, so every resolution
433
- * rule below is testable without a workspace to build a graph from —
434
- * `readProjectGraph` is the one method that touches Nx at run time.
299
+ * The project graph is passed in, so resolution rules are testable without a workspace.
435
300
  */
436
301
  export declare class ProjectsService {
437
302
  constructor();
438
303
  /** Every tag any project carries, sorted and deduplicated. */
439
304
  private readTags;
440
305
  /**
441
- * Collects the names of every project carrying any of the given tags, and
442
- * the tags nothing carries.
443
- *
444
- * Any of them rather than all of them. Nx tags come in families whose
445
- * members are mutually exclusive on one project — nothing is both
446
- * `type:application` and `type:package` — so requiring every tag would make
447
- * the common selection resolve to nothing. Any is also the reading that
448
- * composes: each tag widens the set, the way naming another project does.
306
+ * Collects projects carrying any of the given tags, and the tags nothing carries. Any, not all,
307
+ * since tag families exclude each other.
449
308
  */
450
309
  private resolveTaggedNames;
451
310
  /** Reads the workspace's Nx project graph. */
452
311
  readProjectGraph(): Promise<ProjectGraph>;
453
312
  /**
454
- * Lists every project the graph knows, sorted by name.
455
- *
456
- * A project rooted at the workspace root is kept rather than filtered out.
457
- * It resolves to `.`, which `--directories` accepts, and naming it is a
458
- * caller saying they mean the root program — a different thing from
459
- * omitting `--directories`, which walks the workspace for every
460
- * `tsconfig.json` there is.
313
+ * Lists every project the graph knows, sorted by name, keeping the root project,
314
+ * which resolves to `.`.
461
315
  */
462
316
  readProjects(graph: ProjectGraph): NxProject[];
463
317
  /**
464
- * Widens a set of project names to include everything they depend on.
465
- *
466
- * Dependencies, never dependents. A call stack runs downward — a command
467
- * calls into the service it was injected with, which lives in a package it
468
- * depends on — and those packages are what a trace of one project has to
469
- * carry. Its dependents call *into* it and add no frames below it.
470
- *
471
- * This widens what the run is *scoped to*, not how far a stack runs:
472
- * `WorkspaceService.walkImportedProjectClosure` already builds the program
473
- * of every project the named directories transitively import. What the Nx
474
- * graph adds is edges the compiler never read — an implicit dependency, or
475
- * one that exists only at run time. Being scoped rather than merely reached
476
- * costs nothing in this plugin, which writes nothing anywhere; it is the
477
- * command-line host that acts on it, publishing a `README.md` section for a
478
- * scoped project on a `--write` run.
479
- *
480
- * External `npm:` targets are dropped: they have no workspace directory to
481
- * trace, and following them would mean tracing `node_modules`.
318
+ * Widens project names to their dependencies, not dependents, since stacks run downward.
319
+ * External `npm:` targets are dropped.
482
320
  */
483
321
  resolveDependencyClosure(args: {
484
322
  graph: ProjectGraph;
485
323
  projectNames: readonly string[];
486
324
  }): string[];
487
325
  /**
488
- * Resolves Nx project names and tags to their workspace-relative roots.
489
- *
490
- * The two selections are unioned, not intersected: naming a project and
491
- * naming a tag both widen what gets traced, and a project reached both ways
492
- * is still one directory. Intersecting them would make `--tags` a filter on
493
- * `--projects`, which would resolve to nothing whenever only one was given.
494
- *
495
- * Unknown names and unmatched tags are collected rather than dropped or
496
- * thrown on, so one resolution reports every typo at once instead of one
497
- * per run, and the caller decides whether a partial resolution is worth
498
- * tracing.
326
+ * Resolves project names and tags to workspace-relative roots, merging them and collecting
327
+ * unknown names rather than throwing.
499
328
  */
500
329
  resolveDirectories(args: {
501
330
  graph: ProjectGraph;
@@ -503,12 +332,8 @@ export declare class ProjectsService {
503
332
  tags?: readonly string[] | undefined;
504
333
  }): ResolvedProjectDirectories;
505
334
  /**
506
- * Resolves names and tags to the project names they stand for.
507
- *
508
- * Separate from `resolveDirectories` because a directory is the last step,
509
- * not the only one: widening a selection along the Nx dependency graph
510
- * happens between the two, and it happens in names, which is the only
511
- * vocabulary the project graph speaks.
335
+ * Resolves names and tags to project names, kept separate from directories because widening
336
+ * happens in names.
512
337
  */
513
338
  resolveProjectNames(args: {
514
339
  graph: ProjectGraph;
@@ -548,22 +373,9 @@ export declare interface ResolvedProjectSelection {
548
373
  readonly knownTags: string[];
549
374
  /** The projects the selection reached, sorted and deduplicated. */
550
375
  readonly projectNames: string[];
551
- /**
552
- * The names the project graph does not know, in the order they were given.
553
- *
554
- * Reported rather than dropped: a name nobody resolves is a trace that
555
- * silently covers less than it was asked to, which is the one failure a
556
- * report cannot show you.
557
- */
376
+ /** Names the project graph does not know, in the order given. Reported, since a silently dropped name covers less than asked. */
558
377
  readonly unknownNames: string[];
559
- /**
560
- * The tags no project in the workspace carries, in the order they were
561
- * given.
562
- *
563
- * Refused for the same reason an unknown name is: a tag matching nothing is
564
- * far more often a typo than an empty category, and either way the run it
565
- * would produce covers less than it was asked to without saying so.
566
- */
378
+ /** Tags no project carries, in the order given. Refused like an unknown name, since a tag matching nothing is usually a typo. */
567
379
  readonly unmatchedTags: string[];
568
380
  }
569
381
 
@@ -577,14 +389,7 @@ export declare interface ResolvedTraceScope {
577
389
  readonly knownTags: string[];
578
390
  /** Every project the selection reached, including pulled-in dependencies. */
579
391
  readonly projectNames: string[];
580
- /**
581
- * Directories of the projects the selection itself named, before the
582
- * dependency widening.
583
- *
584
- * What a verdict covers, where `directories` is what a trace reads: a
585
- * dependency pulled in to keep a stack from stopping at a package boundary
586
- * is measured by this run and judged by its own.
587
- */
392
+ /** Directories of the projects the selection named, before dependency widening. What a verdict covers, not what a trace reads. */
588
393
  readonly selectedDirectories: string[];
589
394
  /** Names the workspace does not have. */
590
395
  readonly unknownNames: string[];
@@ -614,31 +419,20 @@ declare interface ResolveTraceScopeArguments {
614
419
  /**
615
420
  * Reads the callidescope configuration one run is judged by.
616
421
  *
617
- * Its own service rather than more of `PluginService`, because every target
618
- * here starts by reading the same file — the one its `configurationPath` names
619
- * — and none of them can be written until it is read. Keeping
620
- * it apart also keeps the verdict and the inference in `PluginService` beside
621
- * each other, which is where the rules a reader comes looking for are.
422
+ * Kept apart from `PluginService` because every target reads this file first. Keeping it
423
+ * separate leaves the verdict and inference together in `PluginService`.
622
424
  */
623
425
  declare class RunConfigurationService {
624
426
  private readonly configurationService;
625
427
  constructor(configurationService: ConfigurationService);
626
428
  /**
627
- * Resolves and loads the configuration one run is judged by.
628
- *
629
- * The file-aware load rather than the plain one: a run resolves a
630
- * configuration beside every project it reaches, and skips whichever file is
631
- * already serving as this run's own.
429
+ * Resolves and loads the configuration one run is judged by, skipping whichever file is already
430
+ * this run's own.
632
431
  */
633
432
  load(args: LoadRunConfigurationArguments): Promise<LoadedRunConfiguration>;
634
433
  }
635
434
 
636
- /**
637
- * Arguments for gating one resolved selection against its limits.
638
- *
639
- * The trace's arguments without `format`: a gate's output is the findings that
640
- * decided its exit code, so there is no second rendering of it to ask for.
641
- */
435
+ /** The trace's arguments without `format`, since a gate's output is the findings that decided its exit code. */
642
436
  declare type RunGateArguments = Omit<RunTraceArguments, "format">;
643
437
 
644
438
  /** Arguments for gating several tasks from one trace. */
@@ -666,18 +460,7 @@ declare interface RunTraceArguments {
666
460
  readonly directories: readonly string[];
667
461
  /** What the run prints. Defaults to markdown when omitted. */
668
462
  readonly format?: CallidescopeOutputFormat | undefined;
669
- /**
670
- * The projects whose findings decide the verdict.
671
- *
672
- * A subset of `directories`, which is what gets traced: a run reaches into
673
- * the dependencies of what it was pointed at, and a finding there belongs
674
- * to the task named after the project that owns it.
675
- *
676
- * Workspace-relative roots, because that is what callidescope calls a
677
- * project name — `WorkspaceService.discoverProjects` names each project by
678
- * the directory holding its `tsconfig.json`, and a report's `projectName`
679
- * is that same string. An Nx project name would match nothing.
680
- */
463
+ /** Projects whose findings decide the verdict: a subset of `directories`, named by callidescope's own project roots, not Nx names. */
681
464
  readonly judgedProjectNames: readonly string[];
682
465
  readonly workspaceRoot: string;
683
466
  }
@@ -689,32 +472,15 @@ export declare interface RunTraceResult {
689
472
  }
690
473
 
691
474
  /**
692
- * What one predicate decided about a traced result.
693
- *
694
- * The findings come back with the verdict so the rendering shows what was
695
- * judged rather than what was measured — the two differ for every scoped run.
696
- *
697
- * `reason` carries the rendering a verdict owes the reader when the findings
698
- * cannot explain it themselves — a run that read nothing has no finding to
699
- * show, and a bare red task there is the guessing game this rule exists to
700
- * end.
475
+ * What one predicate decided about a traced result. `reason` explains a verdict the findings
476
+ * cannot, such as a run that read nothing.
701
477
  */
702
478
  declare interface RunVerdict {
703
479
  readonly findings: OwnedFindings;
704
480
  /** Whether every rule both targets share was cleared. */
705
481
  readonly ok: boolean;
706
482
  readonly reason: string | undefined;
707
- /**
708
- * Judged projects none of whose own files were read.
709
- *
710
- * Reported beside `ok` rather than folded into it, because this is the one
711
- * rule the two targets act on differently: a `gate` fails on it, a `trace`
712
- * prints it and passes. Every project the workspace configuration excludes
713
- * reads nothing of its own and keeps its trace while losing its gate, so a
714
- * trace failing here would be permanently red for being configured as asked.
715
- * The rule itself still lives in one place — `PluginService.judge` — and only
716
- * the consequence is the caller's.
717
- */
483
+ /** Judged projects none of whose own files were read. A `gate` fails on this and a `trace` prints it and passes. */
718
484
  readonly unreadProjectNames: readonly string[];
719
485
  }
720
486
 
@@ -730,52 +496,13 @@ declare class VerdictService {
730
496
  private readonly projectReportsService;
731
497
  constructor(projectReportsService: ProjectReportsService);
732
498
  /**
733
- * The block a verdict owes the reader when its findings cannot explain it.
734
- *
735
- * Both targets print this and only one fails on it — see `judge` — because
736
- * an unread project is a fact about the run either way. The unread projects
737
- * come first when both apply: they name what went missing, where the
738
- * whole-run reason can only say that something did.
499
+ * The block a verdict owes the reader when its findings cannot explain it. Unread projects come
500
+ * first, since they name what went missing.
739
501
  */
740
502
  explain(verdict: RunVerdict): string | undefined;
741
503
  /**
742
- * Decides whether a traced result passes, for every target that reads one.
743
- *
744
- * One predicate rather than the same expression beside each caller, so a
745
- * rule added here cannot reach one verdict and miss the other.
746
- *
747
- * **Only the projects the run was scoped to are judged.** A trace reaches
748
- * into the dependencies of what it was pointed at, so judging the whole
749
- * run's findings would fail `alpha`'s task for a breach in `beta`. The same
750
- * line the publishing side already draws, one step further along:
751
- * measurement reaches into dependencies, publishing does not, and judging
752
- * does not either. A dependency's breach is its own gate's business, and
753
- * `nx affected` selects it too when it changes, so nothing escapes a verdict.
754
- *
755
- * **A judged project none of whose own files were read is named back**, the
756
- * case `callidescope`'s own `reportEmptyTrace` fails for the same reason: a
757
- * gate that passes because it never looked reports the project as clean.
758
- * Asked of each judged project rather than of the whole run, because
759
- * narrowing made those two different questions — a project with dependencies
760
- * has a non-empty run whatever became of its own sources, so its own
761
- * `exclude` over-matching would otherwise leave it owning no finding and
762
- * passing green. The whole run is asked too, for a run judging no project at
763
- * all.
764
- *
765
- * It is the one rule whose **consequence** is the caller's rather than this
766
- * predicate's, and so the one thing `unreadProjectNames` is returned beside
767
- * `ok` for: a `gate` fails on it and a `trace` prints it and passes. Every
768
- * project the workspace configuration excludes reads nothing of its own and
769
- * is denied a gate while keeping its trace, so failing the trace too would
770
- * make that project's target permanently red for being configured exactly as
771
- * it was asked to be. Finding the projects stays here either way, so the
772
- * rule cannot be applied to one verdict and forgotten by the other.
773
- *
774
- * **Depth is judged always, breadth wherever a limit exists** — not two
775
- * modes to be selected between. `maximumDepth` has a default and
776
- * `maximumBreadth` has none at any level, so a project declaring no breadth
777
- * limit can produce no breadth finding to fail on. Reading the findings
778
- * rather than naming a check is what keeps that true without a decision.
504
+ * Decides whether a traced result passes, judging only in-scope projects. Unread judged projects
505
+ * are named back to the caller.
779
506
  */
780
507
  judge(args: {
781
508
  judgedProjectNames: readonly string[];
package/package.json CHANGED
@@ -4,11 +4,11 @@
4
4
  "url": "https://github.com/organizzolini/codebase/issues"
5
5
  },
6
6
  "dependencies": {
7
- "@callidescope/cli": "0.0.77",
8
- "@callidescope/configuration": "0.0.77",
9
- "@callidescope/core": "0.0.76",
10
- "@callidescope/graph": "0.0.76",
11
- "@callidescope/output": "0.0.76",
7
+ "@callidescope/cli": "0.0.79",
8
+ "@callidescope/configuration": "0.0.79",
9
+ "@callidescope/core": "0.0.78",
10
+ "@callidescope/graph": "0.0.78",
11
+ "@callidescope/output": "0.0.78",
12
12
  "@nestjs/common": "^11.1.21 || ^12.0.1",
13
13
  "@nestjs/core": "^11.1.21 || ^12.0.1",
14
14
  "@nx/devkit": "^24.0.0",
@@ -25,9 +25,9 @@
25
25
  "@nx/eslint-plugin": "^24.0.0",
26
26
  "@swc/helpers": "^0.5.21",
27
27
  "@types/node": "^26.5.1",
28
- "@vitest/coverage-v8": "^5.0.0",
28
+ "@vitest/coverage-v8": "^5.1.0",
29
29
  "typescript": "^6.0.3",
30
- "vitest": "^5.0.0"
30
+ "vitest": "^5.1.0"
31
31
  },
32
32
  "executors": "./executors.json",
33
33
  "exports": {
@@ -80,5 +80,5 @@
80
80
  "strict": true
81
81
  },
82
82
  "types": "./dist/src/index.d.ts",
83
- "version": "0.0.78"
83
+ "version": "0.0.80"
84
84
  }