@opensip-cli/fitness 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +2 -2
  2. package/dist/__tests__/fit-execute-opts.test.js +2 -2
  3. package/dist/__tests__/fit-execute-opts.test.js.map +1 -1
  4. package/dist/__tests__/public-api.test.js +2 -1
  5. package/dist/__tests__/public-api.test.js.map +1 -1
  6. package/dist/__tests__/tool.test.js +24 -13
  7. package/dist/__tests__/tool.test.js.map +1 -1
  8. package/dist/cli/__tests__/fit-gate-mode.test.js +1 -1
  9. package/dist/cli/__tests__/fit-gate-mode.test.js.map +1 -1
  10. package/dist/cli/__tests__/fit-modes-live.test.d.ts +1 -1
  11. package/dist/cli/__tests__/fit-modes-live.test.js +13 -6
  12. package/dist/cli/__tests__/fit-modes-live.test.js.map +1 -1
  13. package/dist/cli/__tests__/fit-runner-progress.test.d.ts +2 -0
  14. package/dist/cli/__tests__/fit-runner-progress.test.d.ts.map +1 -0
  15. package/dist/cli/__tests__/fit-runner-progress.test.js +30 -0
  16. package/dist/cli/__tests__/fit-runner-progress.test.js.map +1 -0
  17. package/dist/cli/__tests__/report-data.test.js +3 -3
  18. package/dist/cli/__tests__/report-data.test.js.map +1 -1
  19. package/dist/cli/fit/__tests__/display-fold.test.js +2 -2
  20. package/dist/cli/fit/__tests__/display-fold.test.js.map +1 -1
  21. package/dist/cli/fit/__tests__/fit-export-command-spec.test.d.ts +9 -0
  22. package/dist/cli/fit/__tests__/fit-export-command-spec.test.d.ts.map +1 -0
  23. package/dist/cli/fit/__tests__/fit-export-command-spec.test.js +75 -0
  24. package/dist/cli/fit/__tests__/fit-export-command-spec.test.js.map +1 -0
  25. package/dist/cli/fit/check-loader.d.ts +1 -1
  26. package/dist/cli/fit/check-loader.js +1 -1
  27. package/dist/cli/fit/config-loader.d.ts +1 -1
  28. package/dist/cli/fit/config-loader.js +1 -1
  29. package/dist/cli/fit/envelope-view.d.ts.map +1 -1
  30. package/dist/cli/fit/envelope-view.js +2 -14
  31. package/dist/cli/fit/envelope-view.js.map +1 -1
  32. package/dist/cli/fit/fit-aux-command-specs.d.ts +27 -17
  33. package/dist/cli/fit/fit-aux-command-specs.d.ts.map +1 -1
  34. package/dist/cli/fit/fit-aux-command-specs.js +91 -53
  35. package/dist/cli/fit/fit-aux-command-specs.js.map +1 -1
  36. package/dist/cli/fit/recipe-selector.test.js +2 -2
  37. package/dist/cli/fit/recipe-selector.test.js.map +1 -1
  38. package/dist/cli/fit/result-builders.d.ts +29 -19
  39. package/dist/cli/fit/result-builders.d.ts.map +1 -1
  40. package/dist/cli/fit/result-builders.js +29 -24
  41. package/dist/cli/fit/result-builders.js.map +1 -1
  42. package/dist/cli/fit-modes.d.ts.map +1 -1
  43. package/dist/cli/fit-modes.js +7 -4
  44. package/dist/cli/fit-modes.js.map +1 -1
  45. package/dist/cli/fit-runner-progress.d.ts +12 -0
  46. package/dist/cli/fit-runner-progress.d.ts.map +1 -0
  47. package/dist/cli/fit-runner-progress.js +25 -0
  48. package/dist/cli/fit-runner-progress.js.map +1 -0
  49. package/dist/cli/fit-runner-views.d.ts +1 -1
  50. package/dist/cli/fit-runner-views.js +1 -1
  51. package/dist/cli/fit-runner.d.ts.map +1 -1
  52. package/dist/cli/fit-runner.js +51 -16
  53. package/dist/cli/fit-runner.js.map +1 -1
  54. package/dist/cli/fit-worker.d.ts.map +1 -1
  55. package/dist/cli/fit-worker.js +1 -0
  56. package/dist/cli/fit-worker.js.map +1 -1
  57. package/dist/cli/fit.d.ts +5 -3
  58. package/dist/cli/fit.d.ts.map +1 -1
  59. package/dist/cli/fit.js +6 -4
  60. package/dist/cli/fit.js.map +1 -1
  61. package/dist/framework/__tests__/concurrent-file-cache.test.d.ts +24 -0
  62. package/dist/framework/__tests__/concurrent-file-cache.test.d.ts.map +1 -0
  63. package/dist/framework/__tests__/concurrent-file-cache.test.js +151 -0
  64. package/dist/framework/__tests__/concurrent-file-cache.test.js.map +1 -0
  65. package/dist/framework/__tests__/define-check.test.js +38 -1
  66. package/dist/framework/__tests__/define-check.test.js.map +1 -1
  67. package/dist/framework/__tests__/define-regex-list-check.test.js +5 -1
  68. package/dist/framework/__tests__/define-regex-list-check.test.js.map +1 -1
  69. package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.js +3 -1
  70. package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.js.map +1 -1
  71. package/dist/framework/__tests__/execution-context.test.js +32 -9
  72. package/dist/framework/__tests__/execution-context.test.js.map +1 -1
  73. package/dist/framework/__tests__/file-accessor.test.js +7 -4
  74. package/dist/framework/__tests__/file-accessor.test.js.map +1 -1
  75. package/dist/framework/__tests__/file-cache-autoclear.test.d.ts +25 -0
  76. package/dist/framework/__tests__/file-cache-autoclear.test.d.ts.map +1 -0
  77. package/dist/framework/__tests__/file-cache-autoclear.test.js +116 -0
  78. package/dist/framework/__tests__/file-cache-autoclear.test.js.map +1 -0
  79. package/dist/framework/__tests__/register-helpers.test.js +2 -2
  80. package/dist/framework/__tests__/register-helpers.test.js.map +1 -1
  81. package/dist/framework/__tests__/scope-registry.test.js +2 -2
  82. package/dist/framework/__tests__/scope-registry.test.js.map +1 -1
  83. package/dist/framework/define-check.d.ts.map +1 -1
  84. package/dist/framework/define-check.js +9 -0
  85. package/dist/framework/define-check.js.map +1 -1
  86. package/dist/framework/execution-context.d.ts +9 -2
  87. package/dist/framework/execution-context.d.ts.map +1 -1
  88. package/dist/framework/execution-context.js +20 -6
  89. package/dist/framework/execution-context.js.map +1 -1
  90. package/dist/framework/file-accessor.d.ts +12 -0
  91. package/dist/framework/file-accessor.d.ts.map +1 -1
  92. package/dist/framework/file-accessor.js +8 -3
  93. package/dist/framework/file-accessor.js.map +1 -1
  94. package/dist/framework/file-cache.d.ts +11 -1
  95. package/dist/framework/file-cache.d.ts.map +1 -1
  96. package/dist/framework/file-cache.js +11 -1
  97. package/dist/framework/file-cache.js.map +1 -1
  98. package/dist/framework/ignore-processing.d.ts.map +1 -1
  99. package/dist/framework/ignore-processing.js +26 -11
  100. package/dist/framework/ignore-processing.js.map +1 -1
  101. package/dist/index.d.ts +1 -0
  102. package/dist/index.d.ts.map +1 -1
  103. package/dist/index.js +4 -1
  104. package/dist/index.js.map +1 -1
  105. package/dist/persistence/session-replay.d.ts +8 -3
  106. package/dist/persistence/session-replay.d.ts.map +1 -1
  107. package/dist/persistence/session-replay.js +7 -8
  108. package/dist/persistence/session-replay.js.map +1 -1
  109. package/dist/persistence/session-replay.test.js +9 -7
  110. package/dist/persistence/session-replay.test.js.map +1 -1
  111. package/dist/plugins/__tests__/loader.test.js +2 -2
  112. package/dist/plugins/__tests__/loader.test.js.map +1 -1
  113. package/dist/recipes/__tests__/run-one-check.test.js +16 -1
  114. package/dist/recipes/__tests__/run-one-check.test.js.map +1 -1
  115. package/dist/recipes/__tests__/service.test.js +46 -3
  116. package/dist/recipes/__tests__/service.test.js.map +1 -1
  117. package/dist/recipes/service.d.ts +8 -1
  118. package/dist/recipes/service.d.ts.map +1 -1
  119. package/dist/recipes/service.js +33 -4
  120. package/dist/recipes/service.js.map +1 -1
  121. package/dist/scope-augmentation.d.ts +26 -1
  122. package/dist/scope-augmentation.d.ts.map +1 -1
  123. package/dist/signalers/schema.d.ts +1 -1
  124. package/dist/tool.d.ts +4 -3
  125. package/dist/tool.d.ts.map +1 -1
  126. package/dist/tool.js +67 -85
  127. package/dist/tool.js.map +1 -1
  128. package/package.json +14 -14
@@ -27,13 +27,14 @@
27
27
  * scope construction. A run that doesn't load the fitness tool carries
28
28
  * no `scope.fitness`, and reads return `undefined`.
29
29
  */
30
+ import type { FileCache } from './framework/file-cache.js';
30
31
  import type { CheckRegistry } from './framework/registry.js';
31
32
  import type { FitnessRecipeRegistry } from './recipes/registry.js';
32
33
  /**
33
34
  * Per-RunScope `ensureChecksLoaded` lifecycle state — moved off the
34
35
  * `check-loader.ts` module singletons so two concurrent scopes carry
35
36
  * independent load state. Mutable: `ensureChecksLoaded` writes it once
36
- * per run; the phase helpers (`buildFitEnvelope`, `buildFitDoneResult`)
37
+ * per run; the phase helpers (`buildFitEnvelope`, `buildFitPresentation`)
37
38
  * and the public accessors read it back.
38
39
  */
39
40
  export interface FitnessLoadState {
@@ -47,6 +48,21 @@ export interface FitnessLoadState {
47
48
  * `ensureChecksLoaded` call. */
48
49
  loadWarnings: string[];
49
50
  }
51
+ /**
52
+ * Per-run holder for the shared, lazily-built type-checked TypeScript Program
53
+ * (D2). A single `ts.Program` + bound `TypeChecker` is expensive (~1s / ~0.6 GB
54
+ * on a ~900-file corpus) but type-aware checks need it, so it is built ONCE per
55
+ * run and reused by every type-aware TS check, then released on dispose.
56
+ *
57
+ * `value` is intentionally `unknown`: the build logic lives in
58
+ * `@opensip-cli/checks-typescript` (which owns the `lang-typescript`/`typescript`
59
+ * runtime dep), so the fitness engine and core never name lang-typescript's
60
+ * `TypeCheckedProgram` — keeping the heavy `typescript` dep out of the engine
61
+ * and every non-TS check run. The TS pack casts `value` to its concrete type.
62
+ */
63
+ export interface SharedTsProgramCell {
64
+ value: unknown;
65
+ }
50
66
  /**
51
67
  * Per-RunScope fitness state. Constructed by the fitness tool's
52
68
  * `contributeScope()` hook and attached to `scope.fitness`.
@@ -60,6 +76,15 @@ export interface FitnessSubscope {
60
76
  readonly recipes: FitnessRecipeRegistry;
61
77
  /** `ensureChecksLoaded` lifecycle state for this run. */
62
78
  readonly load: FitnessLoadState;
79
+ /** Per-run file cache — prewarmed by the recipe service, read by every
80
+ * reader site (execution context, file accessor, ignore processing),
81
+ * cleared on scope dispose via the disposer `contributeScope` returns.
82
+ * Replaces the module singleton on every production path. */
83
+ readonly fileCache: FileCache;
84
+ /** Lazily-built shared type-checked TS Program for this run (D2). Built by
85
+ * checks-typescript's `getSharedTypeCheckedProgram` on the first type-aware
86
+ * check, reused by all, and cleared by the dispose hook. */
87
+ readonly tsProgram: SharedTsProgramCell;
63
88
  }
64
89
  declare module '@opensip-cli/core' {
65
90
  interface ScopeContribution {
@@ -1 +1 @@
1
- {"version":3,"file":"scope-augmentation.d.ts","sourceRoot":"","sources":["../src/scope-augmentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;qDAEiD;IACjD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,2EAA2E;IAC3E,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;qCACiC;IACjC,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;qEACiE;IACjE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B;gDAC4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACxC,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;CACjC;AAED,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,iBAAiB;QACzB;;;;;;;WAOG;QACH,OAAO,CAAC,EAAE,eAAe,CAAC;KAC3B;CACF"}
1
+ {"version":3,"file":"scope-augmentation.d.ts","sourceRoot":"","sources":["../src/scope-augmentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;qDAEiD;IACjD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,2EAA2E;IAC3E,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;qCACiC;IACjC,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;qEACiE;IACjE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B;gDAC4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACxC,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC;;;kEAG8D;IAC9D,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B;;iEAE6D;IAC7D,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC;AAED,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,iBAAiB;QACzB;;;;;;;WAOG;QACH,OAAO,CAAC,EAAE,eAAe,CAAC;KAC3B;CACF"}
@@ -35,7 +35,7 @@ export declare const SignalersConfigSchema: z.ZodObject<{
35
35
  exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
36
36
  verbose: z.ZodOptional<z.ZodBoolean>;
37
37
  json: z.ZodOptional<z.ZodBoolean>;
38
- reportTo: z.ZodOptional<z.ZodURL>;
38
+ reportTo: z.ZodOptional<z.ZodString>;
39
39
  apiKey: z.ZodOptional<z.ZodString>;
40
40
  fileTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
41
  ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
package/dist/tool.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * fitnessTool — fitness as a Tool plugin.
3
3
  *
4
- * Owns the `fit`, `fit-list`, `fit-recipes`, and `fit-baseline-export`
5
- * subcommands. Since release 2.11.0 (Phase 4) the Commander wiring is no longer
4
+ * Owns the `fit` primary plus its nested `fit list`, `fit recipes`, and
5
+ * `fit export` subcommands. Since release 2.11.0 (Phase 4) the Commander wiring is no longer
6
6
  * hand-rolled: the tool exports declarative {@link CommandSpec}s
7
7
  * (`commandSpecs`) and the host's `mountCommandSpec` mounts them
8
8
  * (name/description/aliases, the ADR-0021 common flags, each command's options)
@@ -43,7 +43,8 @@
43
43
  * -------------
44
44
  * - This file owns the command-spec assembly + the tool descriptor.
45
45
  * - `cli/fit/fit-command-spec.ts` owns the primary `fit` command spec + handler.
46
- * - `cli/fit/fit-aux-command-specs.ts` owns the aux command specs.
46
+ * - `cli/fit/fit-aux-command-specs.ts` owns the nested `fit list` / `fit recipes`
47
+ * / `fit export` command specs.
47
48
  * - `cli/fit-modes.ts` owns the dispatch branches (gate/list/recipes/json/live).
48
49
  */
49
50
  import './scope-augmentation.js';
@@ -1 +1 @@
1
- {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AA4BH,OAAO,yBAAyB,CAAC;AAKjC,OAAO,KAAK,EAIV,IAAI,EAGL,MAAM,mBAAmB,CAAC;AA6I3B;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAMhD,eAAO,MAAM,iBAAiB,yCAAyC,CAAC;AAExE,eAAO,MAAM,WAAW,EAAE,IAwDzB,CAAC"}
1
+ {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AA6BH,OAAO,yBAAyB,CAAC;AAKjC,OAAO,KAAK,EAIV,IAAI,EAEL,MAAM,mBAAmB,CAAC;AAwI3B;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAMhD,eAAO,MAAM,iBAAiB,yCAAyC,CAAC;AAExE,eAAO,MAAM,WAAW,EAAE,IAkCxB,CAAC"}
package/dist/tool.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * fitnessTool — fitness as a Tool plugin.
3
3
  *
4
- * Owns the `fit`, `fit-list`, `fit-recipes`, and `fit-baseline-export`
5
- * subcommands. Since release 2.11.0 (Phase 4) the Commander wiring is no longer
4
+ * Owns the `fit` primary plus its nested `fit list`, `fit recipes`, and
5
+ * `fit export` subcommands. Since release 2.11.0 (Phase 4) the Commander wiring is no longer
6
6
  * hand-rolled: the tool exports declarative {@link CommandSpec}s
7
7
  * (`commandSpecs`) and the host's `mountCommandSpec` mounts them
8
8
  * (name/description/aliases, the ADR-0021 common flags, each command's options)
@@ -43,17 +43,19 @@
43
43
  * -------------
44
44
  * - This file owns the command-spec assembly + the tool descriptor.
45
45
  * - `cli/fit/fit-command-spec.ts` owns the primary `fit` command spec + handler.
46
- * - `cli/fit/fit-aux-command-specs.ts` owns the aux command specs.
46
+ * - `cli/fit/fit-aux-command-specs.ts` owns the nested `fit list` / `fit recipes`
47
+ * / `fit export` command specs.
47
48
  * - `cli/fit-modes.ts` owns the dispatch branches (gate/list/recipes/json/live).
48
49
  */
49
- import { readPackageVersion } from '@opensip-cli/core';
50
+ import { defineTool, readPackageVersion } from '@opensip-cli/core';
50
51
  import { fitnessFingerprintStrategy } from './baseline-strategy.js';
51
- import { fitBaselineExportCommandSpec, fitListCommandSpec, fitRecipesCommandSpec, } from './cli/fit/fit-aux-command-specs.js';
52
+ import { fitExportCommandSpec, fitListGroupedCommandSpec, fitRecipesGroupedCommandSpec, } from './cli/fit/fit-aux-command-specs.js';
52
53
  import { buildFitCommandSpec, FIT_LIVE_VIEW_KEY } from './cli/fit/fit-command-spec.js';
53
54
  import { renderFitLive } from './cli/fit-runner.js';
54
55
  import { fitRunWorkerCommandSpec } from './cli/fit-worker.js';
55
56
  import { collectFitnessReportData } from './cli/report-data.js';
56
57
  import { fitnessConfigDeclaration } from './config/fitness-config-schema.js';
58
+ import { FileCache } from './framework/file-cache.js';
57
59
  import { createCheckRegistry, createFitnessLoadState, createRecipeRegistry, currentCheckRegistry, currentRecipeRegistry, } from './framework/scope-registry.js';
58
60
  import { fitReplayFromSession } from './persistence/session-replay.js';
59
61
  import { FIT_PLUGIN_LAYOUT } from './plugins/loader.js';
@@ -63,29 +65,6 @@ import { fitScaffoldExamples, fitStableExampleIds } from './scaffold/examples.js
63
65
  // `scope.fitness` is the correctly-typed slot here.
64
66
  import './scope-augmentation.js';
65
67
  // =============================================================================
66
- // COMMAND DESCRIPTORS — used by --help listings and conflict detection.
67
- // =============================================================================
68
- const FIT = {
69
- name: 'fit',
70
- description: 'Run fitness checks',
71
- };
72
- const FIT_LIST = {
73
- name: 'fit-list',
74
- description: 'List available fitness checks',
75
- };
76
- const FIT_RECIPES = {
77
- name: 'fit-recipes',
78
- description: 'List available fitness recipes',
79
- };
80
- const FIT_BASELINE_EXPORT = {
81
- name: 'fit-baseline-export',
82
- description: 'Export the fit gate baseline (SARIF) from the datastore to a file',
83
- };
84
- const FIT_RUN_WORKER = {
85
- name: 'fit-run-worker',
86
- description: '[internal] Run fit headless and stream progress + result over IPC (forked by the live view)',
87
- };
88
- // =============================================================================
89
68
  // LIVE-VIEW SETUP + COMMAND-SPEC ASSEMBLY
90
69
  // =============================================================================
91
70
  /**
@@ -138,9 +117,14 @@ function setUpFitLiveView(cli) {
138
117
  */
139
118
  const fitCommandSpecs = [
140
119
  buildFitCommandSpec(setUpFitLiveView),
141
- fitListCommandSpec,
142
- fitRecipesCommandSpec,
143
- fitBaselineExportCommandSpec,
120
+ // Grouped Tier-2 children — `fit list` / `fit recipes` nest under the `fit`
121
+ // primary via the nested-mount capability (the canonical `<tool> <verb>`
122
+ // grammar; the legacy flat aliases were removed).
123
+ fitListGroupedCommandSpec,
124
+ fitRecipesGroupedCommandSpec,
125
+ // Canonical nested export — mounts as `fit export` under the `fit` primary via
126
+ // the nested-mount capability.
127
+ fitExportCommandSpec,
144
128
  fitRunWorkerCommandSpec,
145
129
  ];
146
130
  /**
@@ -172,16 +156,36 @@ const registerFitRecipe = (contribution) => {
172
156
  /**
173
157
  * Per-run subscope contribution (D7). Called by the CLI's pre-action-hook
174
158
  * after constructing the scope and before entering it; the kernel installs
175
- * the returned `fitness` slot. Fresh check + recipe registries (and an empty
176
- * `ensureChecksLoaded` lifecycle slot) per run so concurrent scopes carry
177
- * independent fitness state.
159
+ * the returned `fitness` slot. Fresh check + recipe registries, an empty
160
+ * `ensureChecksLoaded` lifecycle slot, and a fresh per-run `FileCache` so
161
+ * concurrent scopes carry independent fitness state.
162
+ *
163
+ * Returns the {@link ScopeContributionWithDisposer} wrapper: the SAME
164
+ * `fileCache` instance is placed on `scope.fitness.fileCache` and closed over by
165
+ * the `onDispose` disposer, so `RunScope.dispose()` clears the cache + cancels
166
+ * its auto-clear timer. The kernel install loop registers the disposer via
167
+ * `scope.onDispose(...)`; core never names `FileCache` (layering-clean).
178
168
  */
179
169
  function contributeScope() {
170
+ const fileCache = new FileCache();
171
+ // Lazily populated by checks-typescript's getSharedTypeCheckedProgram; held
172
+ // here so one ts.Program is shared by every type-aware check in the run and
173
+ // released on dispose. `value` is opaque (unknown) — the engine never names
174
+ // lang-typescript's TypeCheckedProgram, keeping the typescript dep out of here.
175
+ const tsProgram = { value: undefined };
180
176
  return {
181
- fitness: {
182
- checks: createCheckRegistry(),
183
- recipes: createRecipeRegistry(),
184
- load: createFitnessLoadState(),
177
+ contribution: {
178
+ fitness: {
179
+ checks: createCheckRegistry(),
180
+ recipes: createRecipeRegistry(),
181
+ load: createFitnessLoadState(),
182
+ fileCache,
183
+ tsProgram,
184
+ },
185
+ },
186
+ onDispose: () => {
187
+ fileCache.clear();
188
+ tsProgram.value = undefined;
185
189
  },
186
190
  };
187
191
  }
@@ -200,61 +204,39 @@ export const FITNESS_CONTRACT_VERSION = '1.0.0';
200
204
  // EXPORT
201
205
  // =============================================================================
202
206
  export const FITNESS_STABLE_ID = 'afd68bd3-ff3c-4935-a5b6-76d8fc7a5224';
203
- export const fitnessTool = {
207
+ export const fitnessTool = defineTool({
204
208
  metadata: {
205
209
  id: FITNESS_STABLE_ID, // stable UUID (per ADR-0048; matches Checks `id` naming)
206
- name: 'fitness', // human key (previously the value in `id`)
210
+ // tool-command-surface-taxonomy Task 2.4 (Q1): metadata.name == the command
211
+ // verb (`fit`). The config namespace key stays `fitness:` — it keys off the
212
+ // DECOUPLED `fitnessConfigDeclaration.namespace = 'fitness'` literal, NOT
213
+ // metadata.name, so existing `fitness:` config blocks keep validating. The
214
+ // session `tool` column is already `'fit'` (sessionReplay.tool + the session
215
+ // contributions), so aligning the name REDUCES mismatch. Q6 (flipping the
216
+ // namespace literal to `fit:`) stays open — no `fit:` config alias is added.
217
+ name: 'fit', // command verb + human key (was 'fitness')
207
218
  version: readPackageVersion(import.meta.url),
208
219
  description: 'Run fitness checks against a codebase',
209
220
  },
210
- commands: [FIT, FIT_LIST, FIT_RECIPES, FIT_BASELINE_EXPORT, FIT_RUN_WORKER],
211
221
  pluginLayout: FIT_PLUGIN_LAYOUT,
212
- // Release 2.11.0 Phase 4: fitness declares its command surface; the host
213
- // mounts each spec via mountCommandSpec. The deprecated `register()` fallback
214
- // is gone — fitness no longer touches Commander.
215
222
  commandSpecs: fitCommandSpecs,
216
- contributeScope,
217
- collectReportData: collectFitnessReportData,
218
- sessionReplay: {
219
- tool: 'fit',
220
- replaySession: fitReplayFromSession,
221
- },
222
- // ADR-0023 Phase 4: fitness contributes its namespaced `fitness:` Zod schema
223
- // (gate thresholds, disabledChecks, recipe) so the host composes +
224
- // strict-validates the whole config document before dispatch. Shared
225
- // targeting (targets/globalExcludes/checkOverrides) stays with
226
- // SignalersConfigSchema because the fit hot path consumes target registries
227
- // through that loader.
228
- config: fitnessConfigDeclaration,
229
- // §5.3 Phase 4: fitness owns the `fit-pack` capability domain (declared in
230
- // its manifest). It supplies the REAL registrar so the host can replace the
231
- // manifest-time deferred placeholder once fitness's module loads.
232
- capabilityRegistrars: { 'fit-pack': registerFitCheck, 'fit-recipe': registerFitRecipe },
233
- // ADR-0036: fitness's message-hash baseline identity (sha256(filePath\nruleId\n
234
- // message)), read by the host baseline/ratchet seams when fit stamps its gate
235
- // envelope. Excludes line/col so unrelated line-shifts don't flap the ratchet.
236
- fingerprintStrategy: fitnessFingerprintStrategy,
237
- // ADR-0038: fitness owns its `init` example bytes + the pinned check-id universe.
238
- // The host writes each returned file under userPluginDir('fit', file.kind).
239
- scaffoldExamples: fitScaffoldExamples,
240
- stableExampleIds: fitStableExampleIds,
241
- // ADR-0038 Decision 2: fitness owns its `fitness:` config block (inline guidance
242
- // comments the bare ToolConfigDeclaration.defaults can't express → the hook route).
243
- scaffoldConfigBlock: fitScaffoldConfigBlock,
244
- initialize: async () => {
245
- // ensureChecksLoaded() is called inside the executeFit / listChecks
246
- // / listRecipes paths, so a separate initialize() pass is not
247
- // strictly needed today. Left as a no-op so fitness has somewhere
248
- // to hang future tool-startup work (eager check-pack discovery,
249
- // catalog warming, etc.) without requiring a contract change.
250
- },
251
- // ADR-0047: per-tool contract version for the fitness-specific surface
252
- // (defineCheck, analysis modes, check packs, recipes, etc.). This is
253
- // independent of the core TOOL_CONTRACT_VERSION (the generic Tool bus).
254
- // Declared here so agent-catalog, compatibility logic, and external
255
- // fitness pack authors can see the exact surface this tool was written against.
256
223
  extensionPoints: {
257
224
  fitnessContractVersion: FITNESS_CONTRACT_VERSION,
225
+ contributeScope,
226
+ collectReportData: collectFitnessReportData,
227
+ sessionReplay: {
228
+ tool: 'fit',
229
+ replaySession: fitReplayFromSession,
230
+ },
231
+ config: fitnessConfigDeclaration,
232
+ capabilityRegistrars: { 'fit-pack': registerFitCheck, 'fit-recipe': registerFitRecipe },
233
+ fingerprintStrategy: fitnessFingerprintStrategy,
234
+ scaffoldExamples: fitScaffoldExamples,
235
+ stableExampleIds: fitStableExampleIds,
236
+ scaffoldConfigBlock: fitScaffoldConfigBlock,
237
+ initialize: async () => {
238
+ // ensureChecksLoaded() runs inside executeFit / listChecks / listRecipes.
239
+ },
258
240
  },
259
- };
241
+ });
260
242
  //# sourceMappingURL=tool.js.map
package/dist/tool.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tool.js","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClF,6EAA6E;AAC7E,oDAAoD;AACpD,OAAO,yBAAyB,CAAC;AAcjC,gFAAgF;AAChF,wEAAwE;AACxE,gFAAgF;AAEhF,MAAM,GAAG,GAA0B;IACjC,IAAI,EAAE,KAAK;IACX,WAAW,EAAE,oBAAoB;CAClC,C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7B,eAAe,EAAE;QACf,sBAAsB,EAAE,wBAAwB;QAChD,eAAe;QACf,iBAAiB,EAAE,wBAAwB;QAC3C,aAAa,EAAE;YACb,IAAI,EAAE,KAAK;YACX,aAAa,EAAE,oBAAoB;SACpC;QACD,MAAM,EAAE,wBAAwB;QAChC,oBAAoB,EAAE,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,EAAE;QACvF,mBAAmB,EAAE,0BAA0B;QAC/C,gBAAgB,EAAE,mBAAmB;QACrC,gBAAgB,EAAE,mBAAmB;QACrC,mBAAmB,EAAE,sBAAsB;QAC3C,UAAU,EAAE,KAAK,IAAmB,EAAE;YACpC,0EAA0E;QAC5E,CAAC;KACF;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensip-cli/fitness",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Fitness checks engine for OpenSIP CLI",
6
6
  "keywords": [
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "opensipTools": {
36
36
  "kind": "tool",
37
- "id": "fitness",
37
+ "id": "fit",
38
38
  "stableId": "afd68bd3-ff3c-4935-a5b6-76d8fc7a5224",
39
39
  "apiVersion": 1,
40
40
  "commands": [
@@ -43,16 +43,16 @@
43
43
  "description": "Run fitness checks"
44
44
  },
45
45
  {
46
- "name": "fit-list",
46
+ "name": "list",
47
47
  "description": "List available fitness checks"
48
48
  },
49
49
  {
50
- "name": "fit-recipes",
50
+ "name": "recipes",
51
51
  "description": "List available fitness recipes"
52
52
  },
53
53
  {
54
- "name": "fit-baseline-export",
55
- "description": "Export the fit gate baseline (SARIF) from the datastore to a file"
54
+ "name": "export",
55
+ "description": "Export fit artifacts (--format baseline)"
56
56
  },
57
57
  {
58
58
  "name": "fit-run-worker",
@@ -114,19 +114,19 @@
114
114
  "react": "^19.2.7",
115
115
  "typescript": "~6.0.3",
116
116
  "zod": "^4.4.3",
117
- "@opensip-cli/cli-ui": "0.1.6",
118
- "@opensip-cli/config": "0.1.6",
119
- "@opensip-cli/contracts": "0.1.6",
120
- "@opensip-cli/core": "0.1.6",
121
- "@opensip-cli/datastore": "0.1.6",
122
- "@opensip-cli/targeting": "0.1.6",
123
- "@opensip-cli/session-store": "0.1.6"
117
+ "@opensip-cli/cli-ui": "0.1.8",
118
+ "@opensip-cli/config": "0.1.8",
119
+ "@opensip-cli/datastore": "0.1.8",
120
+ "@opensip-cli/session-store": "0.1.8",
121
+ "@opensip-cli/contracts": "0.1.8",
122
+ "@opensip-cli/core": "0.1.8",
123
+ "@opensip-cli/targeting": "0.1.8"
124
124
  },
125
125
  "devDependencies": {
126
126
  "@types/node": "^24.13.2",
127
127
  "@types/react": "^19.2.17",
128
128
  "vitest": "^4.1.8",
129
- "@opensip-cli/lang-typescript": "0.1.6"
129
+ "@opensip-cli/lang-typescript": "0.1.8"
130
130
  },
131
131
  "scripts": {
132
132
  "build": "tsc",