spec-controller 0.1.0-alpha.45 → 0.1.0-alpha.47

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 (116) hide show
  1. package/dist/cli-allocate/cli.d.ts.map +1 -1
  2. package/dist/cli-allocate/cli.js +0 -5
  3. package/dist/cli-allocate/cli.js.map +1 -1
  4. package/dist/cli-allocate/readHistory.d.ts +0 -13
  5. package/dist/cli-allocate/readHistory.d.ts.map +1 -1
  6. package/dist/cli-allocate/readHistory.js +0 -33
  7. package/dist/cli-allocate/readHistory.js.map +1 -1
  8. package/dist/cli-allocate/readParts.d.ts +0 -1
  9. package/dist/cli-allocate/readParts.d.ts.map +1 -1
  10. package/dist/cli-allocate/readParts.js +0 -6
  11. package/dist/cli-allocate/readParts.js.map +1 -1
  12. package/dist/cli-allocate/readTree.d.ts +0 -11
  13. package/dist/cli-allocate/readTree.d.ts.map +1 -1
  14. package/dist/cli-allocate/readTree.js +0 -32
  15. package/dist/cli-allocate/readTree.js.map +1 -1
  16. package/dist/cli-allocate/refStore.d.ts +0 -1
  17. package/dist/cli-allocate/refStore.d.ts.map +1 -1
  18. package/dist/cli-allocate/refStore.js +0 -13
  19. package/dist/cli-allocate/refStore.js.map +1 -1
  20. package/dist/cli-allocate/request.d.ts +0 -2
  21. package/dist/cli-allocate/request.d.ts.map +1 -1
  22. package/dist/cli-allocate/request.js +0 -7
  23. package/dist/cli-allocate/request.js.map +1 -1
  24. package/dist/cli-allocate/stderr.d.ts +0 -7
  25. package/dist/cli-allocate/stderr.d.ts.map +1 -1
  26. package/dist/cli-allocate/stderr.js +0 -7
  27. package/dist/cli-allocate/stderr.js.map +1 -1
  28. package/dist/cli-allocate/unreadable.d.ts +0 -13
  29. package/dist/cli-allocate/unreadable.d.ts.map +1 -1
  30. package/dist/cli-allocate/unreadable.js +0 -13
  31. package/dist/cli-allocate/unreadable.js.map +1 -1
  32. package/dist/cli-args.d.ts +0 -113
  33. package/dist/cli-args.d.ts.map +1 -1
  34. package/dist/cli-args.js +0 -145
  35. package/dist/cli-args.js.map +1 -1
  36. package/dist/cli-balance/cli.d.ts +0 -85
  37. package/dist/cli-balance/cli.d.ts.map +1 -1
  38. package/dist/cli-balance/cli.js +0 -230
  39. package/dist/cli-balance/cli.js.map +1 -1
  40. package/dist/cli-balance/emit/format.d.ts +0 -52
  41. package/dist/cli-balance/emit/format.d.ts.map +1 -1
  42. package/dist/cli-balance/emit/format.js +0 -70
  43. package/dist/cli-balance/emit/format.js.map +1 -1
  44. package/dist/cli-balance/emit/writer.d.ts +0 -17
  45. package/dist/cli-balance/emit/writer.d.ts.map +1 -1
  46. package/dist/cli-balance/emit/writer.js +0 -13
  47. package/dist/cli-balance/emit/writer.js.map +1 -1
  48. package/dist/cli-balance/exitStatus.d.ts +0 -1
  49. package/dist/cli-balance/exitStatus.d.ts.map +1 -1
  50. package/dist/cli-balance/exitStatus.js +0 -7
  51. package/dist/cli-balance/exitStatus.js.map +1 -1
  52. package/dist/cli-balance/inputsRead.d.ts +0 -12
  53. package/dist/cli-balance/inputsRead.d.ts.map +1 -1
  54. package/dist/cli-balance/inputsRead.js +0 -12
  55. package/dist/cli-balance/inputsRead.js.map +1 -1
  56. package/dist/cli-balance/reRender.d.ts +0 -14
  57. package/dist/cli-balance/reRender.d.ts.map +1 -1
  58. package/dist/cli-balance/reRender.js +0 -15
  59. package/dist/cli-balance/reRender.js.map +1 -1
  60. package/dist/cli-balance/unreadableInputs.d.ts +0 -21
  61. package/dist/cli-balance/unreadableInputs.d.ts.map +1 -1
  62. package/dist/cli-balance/unreadableInputs.js +0 -21
  63. package/dist/cli-balance/unreadableInputs.js.map +1 -1
  64. package/dist/cli-registry.d.ts +0 -86
  65. package/dist/cli-registry.d.ts.map +1 -1
  66. package/dist/cli-registry.js +0 -70
  67. package/dist/cli-registry.js.map +1 -1
  68. package/dist/cli.d.ts +0 -20
  69. package/dist/cli.d.ts.map +1 -1
  70. package/dist/cli.js +0 -21
  71. package/dist/cli.js.map +1 -1
  72. package/dist/deferralTags.d.ts +0 -14
  73. package/dist/deferralTags.d.ts.map +1 -1
  74. package/dist/deferralTags.js +0 -14
  75. package/dist/deferralTags.js.map +1 -1
  76. package/dist/host.d.ts +0 -61
  77. package/dist/host.d.ts.map +1 -1
  78. package/dist/host.js +1 -84
  79. package/dist/host.js.map +1 -1
  80. package/dist/ingest/ciSourcePaths.d.ts +0 -38
  81. package/dist/ingest/ciSourcePaths.d.ts.map +1 -1
  82. package/dist/ingest/ciSourcePaths.js +0 -38
  83. package/dist/ingest/ciSourcePaths.js.map +1 -1
  84. package/dist/ingest/gherkinValidation.d.ts +0 -76
  85. package/dist/ingest/gherkinValidation.d.ts.map +1 -1
  86. package/dist/ingest/gherkinValidation.js +0 -76
  87. package/dist/ingest/gherkinValidation.js.map +1 -1
  88. package/dist/ingest/ingestQualityChecks.d.ts +0 -81
  89. package/dist/ingest/ingestQualityChecks.d.ts.map +1 -1
  90. package/dist/ingest/ingestQualityChecks.js +0 -194
  91. package/dist/ingest/ingestQualityChecks.js.map +1 -1
  92. package/dist/ingest/ingestScenarios.d.ts +0 -39
  93. package/dist/ingest/ingestScenarios.d.ts.map +1 -1
  94. package/dist/ingest/ingestScenarios.js +0 -70
  95. package/dist/ingest/ingestScenarios.js.map +1 -1
  96. package/dist/ingest/inputShapes.d.ts +0 -31
  97. package/dist/ingest/inputShapes.d.ts.map +1 -1
  98. package/dist/ingest/inputShapes.js +0 -30
  99. package/dist/ingest/inputShapes.js.map +1 -1
  100. package/dist/outputLocation.d.ts +0 -48
  101. package/dist/outputLocation.d.ts.map +1 -1
  102. package/dist/outputLocation.js +0 -48
  103. package/dist/outputLocation.js.map +1 -1
  104. package/dist/run-management/keptRun.d.ts +0 -107
  105. package/dist/run-management/keptRun.d.ts.map +1 -1
  106. package/dist/run-management/keptRun.js +0 -75
  107. package/dist/run-management/keptRun.js.map +1 -1
  108. package/dist/run-management/resolveRunInputs.d.ts +0 -67
  109. package/dist/run-management/resolveRunInputs.d.ts.map +1 -1
  110. package/dist/run-management/resolveRunInputs.js +0 -88
  111. package/dist/run-management/resolveRunInputs.js.map +1 -1
  112. package/dist/storedRun.d.ts +0 -21
  113. package/dist/storedRun.d.ts.map +1 -1
  114. package/dist/storedRun.js +0 -21
  115. package/dist/storedRun.js.map +1 -1
  116. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/cli-balance/emit/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH;;;;GAIG;AACH,MAAM,iBAAiB,GAA4B,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAElE,oFAAoF;AACpF,SAAS,iBAAiB,CAAC,GAAW;IACpC,OAAQ,iBAAuC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAChE,CAAC;AA2BD;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CACxB,WAA8B,EAC9B,cAAyC,GAAG,EAAE,CAAC,KAAK;IAEpD,8EAA8E;IAC9E,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IAC9D,MAAM,OAAO,GAAoB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAClD,qFAAqF;QACrF,qFAAqF;QACrF,sFAAsF;QACtF,sFAAsF;QACtF,iFAAiF;QACjF,4BAA4B;QAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,GAAG,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAiB,CAAC;QACzE,MAAM,IAAI,GACR,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAA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AQD,MAAM,UAAU,qBAAqB,CAAC,OAAoC,EAAE,MAAkC;IAC5G,KAAK,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,OAAO,EAAE,CAAC;QAC3C,IAAI,QAAQ,KAAK,SAAS;YAAE,SAAS;QACrC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;QACxG,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,CACL,oDAAoD,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,IAAI;gBACxG,oCAAoC,CACrC,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,QAAQ,CAAC,CAAe,EAAE,CAAe;IAChD,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC;AAC5C,CAAC;AAED,SAAS,OAAO,CAAC,MAAqB;IACpC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AAClH,CAAC"}
@@ -1,18 +1,8 @@
1
- /**
2
- * The output writer: renders each planned output through the pure renderers and performs the only
3
- * IO in the pipeline, to stdout or to a file.
4
- */
5
1
  import type { FeatureNames } from "@3f-consulting/spec-controller-core";
6
2
  import { type FileIdentity, type IdentifiedInput, type OutputPlan } from "./format.js";
7
3
  import type { RunContext } from "@3f-consulting/spec-controller-core";
8
4
  import type { EvidenceObligations } from "@3f-consulting/spec-controller-core";
9
5
  import type { EvidenceReconciliation } from "@3f-consulting/spec-controller-core";
10
- /**
11
- * The reconciliation payloads the writer renders — the balance plus its sibling reads
12
- * (ctx / evidenceObligations / featureNames), exactly the arguments the pure renderers take.
13
- * `withRuntimeObservations` and `withStaticChecks` gate the two observation axes; the renderers
14
- * fold both off the Ledger themselves, so the writer threads only whether each axis is in play.
15
- */
16
6
  export interface OutputPayloads {
17
7
  readonly balance: EvidenceReconciliation;
18
8
  readonly ctx: RunContext;
@@ -21,12 +11,5 @@ export interface OutputPayloads {
21
11
  readonly withStaticChecks?: boolean;
22
12
  readonly featureNames?: FeatureNames;
23
13
  }
24
- /**
25
- * Every destination is vetted before any output is emitted, so a refused run never leaves a report
26
- * behind, on stdout or in a file, whose headline names an exit the process does not take. Writing
27
- * files first and stdout last would not do: an earlier file would still be written. The vetting
28
- * refuses a destination that cannot be written, two outputs that land on one regular file, and an
29
- * output that lands on one of the files the run read.
30
- */
31
14
  export declare function writeOutputs(plan: OutputPlan, payloads: OutputPayloads, stdoutFile?: () => FileIdentity | undefined, inputs?: readonly IdentifiedInput[]): void;
32
15
  //# sourceMappingURL=writer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/cli-balance/emit/writer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAA4C,KAAK,YAAY,EAAE,KAAK,eAAe,EAA4C,KAAK,UAAU,EAAsB,MAAM,aAAa,CAAC;AAC/L,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAGlF;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAA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B,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,cAAc,EACxB,UAAU,GAAE,MAAM,YAAY,GAAG,SAA0B,EAC3D,MAAM,GAAE,SAAS,eAAe,EAAO,GACtC,IAAI,CAKN"}
@@ -1,7 +1,3 @@
1
- /**
2
- * The output writer: renders each planned output through the pure renderers and performs the only
3
- * IO in the pipeline, to stdout or to a file.
4
- */
5
1
  import { unlinkSync, writeFileSync } from "node:fs";
6
2
  import { renderMarkdown } from "@3f-consulting/spec-controller-core";
7
3
  import { renderJson } from "@3f-consulting/spec-controller-core";
@@ -12,13 +8,6 @@ function render(fmt, p) {
12
8
  ? renderJson(p.balance, p.ctx, p.evidenceObligations, p.featureNames)
13
9
  : renderMarkdown(p.balance, p.ctx, p.evidenceObligations, p.featureNames);
14
10
  }
15
- /**
16
- * Every destination is vetted before any output is emitted, so a refused run never leaves a report
17
- * behind, on stdout or in a file, whose headline names an exit the process does not take. Writing
18
- * files first and stdout last would not do: an earlier file would still be written. The vetting
19
- * refuses a destination that cannot be written, two outputs that land on one regular file, and an
20
- * output that lands on one of the files the run read.
21
- */
22
11
  export function writeOutputs(plan, payloads, stdoutFile = stdoutIdentity, inputs = []) {
23
12
  const emissions = plan.outputs.map((output) => ({ output, text: render(output.fmt, payloads) + "\n" }));
24
13
  const refusal = vetDestinations(plan.outputs, stdoutFile, inputs);
@@ -27,7 +16,6 @@ export function writeOutputs(plan, payloads, stdoutFile = stdoutIdentity, inputs
27
16
  for (const { output, text } of emissions)
28
17
  emit(output, text);
29
18
  }
30
- /** The refusal the destinations earn, if any. Every file the vetting had to create is removed again first. */
31
19
  function vetDestinations(outputs, stdoutFile, inputs) {
32
20
  const created = [];
33
21
  try {
@@ -45,7 +33,6 @@ function vetDestinations(outputs, stdoutFile, inputs) {
45
33
  unlinkSync(path);
46
34
  }
47
35
  }
48
- /** The regular file an output lands on, or the refusal naming why its destination cannot be written. */
49
36
  function identify(output, stdoutFile, created) {
50
37
  const dest = output.dest;
51
38
  if (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I,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AACjG,CAAC"}
@@ -1,3 +1,2 @@
1
- /** The status the process leaves for a verdict code, live or re-rendered, with or without `--exit-zero`. */
2
1
  export declare function statusFor(code: number, exitZero: boolean): number;
3
2
  //# sourceMappingURL=exitStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exitStatus.d.ts","sourceRoot":"","sources":["../../src/cli-balance/exitStatus.ts"],"names":[],"mappings":"AAQA,4GAA4G;AAC5G,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CAEjE"}
1
+ {"version":3,"file":"exitStatus.d.ts","sourceRoot":"","sources":["../../src/cli-balance/exitStatus.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CAEjE"}
@@ -1,11 +1,4 @@
1
- /**
2
- * The codes `--exit-zero` moves to 0: the two VERDICTS on the target —
3
- * out-of-balance and pending-under-`--strict`. Enumerated rather than "anything non-zero", because
4
- * unsound (4) and nothing-to-reconcile (5) are not verdicts but the absence of a trustworthy one,
5
- * and suppressing a verdict never suppresses that. Usage (2) exits before the ladder is reached.
6
- */
7
1
  const VERDICT_CODES = new Set([1, 3]);
8
- /** The status the process leaves for a verdict code, live or re-rendered, with or without `--exit-zero`. */
9
2
  export function statusFor(code, exitZero) {
10
3
  return exitZero && VERDICT_CODES.has(code) ? 0 : code;
11
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"exitStatus.js","sourceRoot":"","sources":["../../src/cli-balance/exitStatus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE3D,4GAA4G;AAC5G,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,QAAiB;IACvD,OAAO,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACxD,CAAC"}
1
+ {"version":3,"file":"exitStatus.js","sourceRoot":"","sources":["../../src/cli-balance/exitStatus.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE3D,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,QAAiB;IACvD,OAAO,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACxD,CAAC"}
@@ -1,23 +1,11 @@
1
- /**
2
- * The files a `balance` run reads, each named by how the run came to read it: pointed at by a flag,
3
- * read where the run looks by default, or read from inside a folder it was pointed at. The writer
4
- * refuses a report aimed at any of them, and a stored run refuses its own files landing on one.
5
- */
6
1
  import { type ReadInput } from "../outputLocation.js";
7
2
  import type { IdentifiedInput } from "./emit/format.js";
8
- /** The filesystem reads the enumeration needs, injected so the rules stay pure. */
9
3
  export interface InputReader {
10
4
  exists(path: string): boolean;
11
5
  featureFiles(dir: string): string[];
12
6
  workflowFiles(path: string): string[];
13
7
  }
14
- /**
15
- * Lists what the readers will read and nothing more, and answers nothing for a folder it cannot list:
16
- * a stored run asks before `balance`'s own guards have refused an unreadable input, and those guards,
17
- * not this, say what is wrong with it.
18
- */
19
8
  export declare const NODE_INPUT_READER: InputReader;
20
9
  export declare function inputsReadBy(args: Record<string, string>, reader: InputReader): ReadInput[];
21
- /** Each input beside the identity of the regular file it is, read now, just before anything is written. */
22
10
  export declare function identifiedInputs(inputs: readonly ReadInput[]): IdentifiedInput[];
23
11
  //# sourceMappingURL=inputsRead.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inputsRead.d.ts","sourceRoot":"","sources":["../../src/cli-balance/inputsRead.ts"],"names":[],"m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,gBAAgB,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,GAAG,eAAe,EAAE,CAEhF"}
@@ -1,21 +1,10 @@
1
- /**
2
- * The files a `balance` run reads, each named by how the run came to read it: pointed at by a flag,
3
- * read where the run looks by default, or read from inside a folder it was pointed at. The writer
4
- * refuses a report aimed at any of them, and a stored run refuses its own files landing on one.
5
- */
6
1
  import { existsSync, readdirSync } from "node:fs";
7
2
  import { join } from "node:path";
8
3
  import { ciSourcePathsOf } from "../ingest/ciSourcePaths.js";
9
4
  import { DEFAULT_CI_PATH } from "../ingest/ingestQualityChecks.js";
10
5
  import { regularFileIdentity } from "../outputLocation.js";
11
6
  import { jsonInputsOf } from "./unreadableInputs.js";
12
- /** Where the feature corpus is read from when `--features` is not given, relative to where the run is. */
13
7
  const DEFAULT_FEATURES_DIR = "features";
14
- /**
15
- * Lists what the readers will read and nothing more, and answers nothing for a folder it cannot list:
16
- * a stored run asks before `balance`'s own guards have refused an unreadable input, and those guards,
17
- * not this, say what is wrong with it.
18
- */
19
8
  export const NODE_INPUT_READER = {
20
9
  exists: existsSync,
21
10
  featureFiles: (dir) => {
@@ -42,7 +31,6 @@ export function inputsReadBy(args, reader) {
42
31
  const reports = jsonInputsOf(args, reader.exists).map(({ subject, path }) => ({ subject: lowerFirst(subject), path }));
43
32
  return [...reports, ...featureInputs(args["features"], reader), ...workflowInputs(args["ci"], reader)];
44
33
  }
45
- /** Each input beside the identity of the regular file it is, read now, just before anything is written. */
46
34
  export function identifiedInputs(inputs) {
47
35
  return inputs.map((input) => ({ ...input, identity: regularFileIdentity(input.path) }));
48
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"inputsRead.js","sourceRoot":"","sources":["../../src/cli-balance/inputsRead.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,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EAAE,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,eAAe,CAAC,EAAsB,EAAE,IAAY;IAC3D,IAAI,EAAE,KAAK,SAAS;QAAE,OAAO,+BAA+B,CAAC;IAC7D,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,+BAA+B,CAAC;AAC7E,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC"}
@@ -1,22 +1,8 @@
1
- /**
2
- * Re-rendering a saved Evidence Reconciliation: the markdown the saved report renders to, and the
3
- * verdict it carries. Pure over the saved bytes; the CLI does the reading and the writing.
4
- */
5
1
  import type { VerdictCode } from "@3f-consulting/spec-controller-core";
6
2
  export interface ReRendered {
7
3
  readonly markdown: string;
8
4
  readonly code: VerdictCode;
9
5
  }
10
- /**
11
- * `strictGiven` is `--strict` on the re-render. The run is strict when the saved run was or the
12
- * re-render asks, and that one value is written onto the report before it renders, so the headline
13
- * names the same code the re-render exits.
14
- */
15
6
  export declare function reRender(savedJson: string, strictGiven: boolean): ReRendered;
16
- /**
17
- * The first flag given beside `--render-from-json` that a re-render would silently ignore, as the
18
- * usage message that refuses it; null when there is none, or no re-render was asked for. Any flag
19
- * outside the three it reads is refused, so one added to balance later is refused by default.
20
- */
21
7
  export declare function checkReRenderFlags(args: Record<string, string>): string | null;
22
8
  //# sourceMappingURL=reRender.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reRender.d.ts","sourceRoot":"","sources":["../../src/cli-balance/reRender.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAEpF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,UAAU,CAQ5E;AAKD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAQ9E"}
1
+ {"version":3,"file":"reRender.d.ts","sourceRoot":"","sources":["../../src/cli-balance/reRender.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAEpF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;CAC5B;AAED,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,UAAU,CAQ5E;AAID,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAQ9E"}
@@ -1,13 +1,4 @@
1
- /**
2
- * Re-rendering a saved Evidence Reconciliation: the markdown the saved report renders to, and the
3
- * verdict it carries. Pure over the saved bytes; the CLI does the reading and the writing.
4
- */
5
1
  import { renderReport, verdictCode } from "@3f-consulting/spec-controller-core";
6
- /**
7
- * `strictGiven` is `--strict` on the re-render. The run is strict when the saved run was or the
8
- * re-render asks, and that one value is written onto the report before it renders, so the headline
9
- * names the same code the re-render exits.
10
- */
11
2
  export function reRender(savedJson, strictGiven) {
12
3
  const saved = JSON.parse(savedJson);
13
4
  const strict = saved.runProvenance.strict === true || strictGiven;
@@ -17,13 +8,7 @@ export function reRender(savedJson, strictGiven) {
17
8
  code: verdictCode({ ledger: report.ledger, scenarioCodeErrors: report.scenarioCodeErrors, strict }),
18
9
  };
19
10
  }
20
- /** The flags a re-render reads; `--help` answers before any of this runs. */
21
11
  const READ_BY_A_RE_RENDER = new Set(["render-from-json", "strict", "exit-zero"]);
22
- /**
23
- * The first flag given beside `--render-from-json` that a re-render would silently ignore, as the
24
- * usage message that refuses it; null when there is none, or no re-render was asked for. Any flag
25
- * outside the three it reads is refused, so one added to balance later is refused by default.
26
- */
27
12
  export function checkReRenderFlags(args) {
28
13
  if (args["render-from-json"] === undefined)
29
14
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"reRender.js","sourceRoot":"","sources":["../../src/cli-balance/reRender.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAQhF;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,SAAiB,EAAE,WAAoB;IAC9D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAgB,CAAC;IACnD,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,MAAM,KAAK,IAAI,IAAI,WAAW,CAAC;IAClE,MAAM,MAAM,GAAgB,EAAE,GAAG,KAAK,EAAE,aAAa,EAAE,EAAE,GAAG,KAAK,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC5F,OAAO;QACL,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC;QAC9B,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,EAAE,CAAC;KACpG,CAAC;AACJ,CAAC;AAED,6EAA6E;AAC7E,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC,CAAC,kBAAkB,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;AAEtG;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAA4B;IAC7D,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,SAAS;QAAE,OAAO,IA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,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/E,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACvC,OAAO,CACL,kGAAkG;QAClG,KAAK,OAAO,0EAA0E,CACvF,CAAC;AACJ,CAAC"}
@@ -1,35 +1,14 @@
1
- /**
2
- * The input guards that decide, before anything is reconciled, whether the run can read what it
3
- * was handed. Each returns the refusal to print or null, and `refuseUnreadableInputs` in ./cli.ts
4
- * turns a refusal into exit 2: an input the tool cannot read is a usage error, never a verdict.
5
- */
6
1
  import { type Shape } from "../ingest/inputShapes.js";
7
2
  import { type ReRendered } from "./reRender.js";
8
- /** One JSON input the run will read: how a refusal names it, where it is, and the shape it must have. */
9
3
  export interface JsonInput {
10
4
  readonly subject: string;
11
5
  readonly path: string;
12
6
  readonly shape: Shape;
13
7
  readonly writer: string;
14
8
  }
15
- /**
16
- * The JSON inputs this invocation hands the readers, in flag order: each one given, and the
17
- * package.json the run reads by default when none is given and there is one to read.
18
- */
19
9
  export declare function jsonInputsOf(args: Record<string, string>, exists: (path: string) => boolean): JsonInput[];
20
- /** The first input that cannot be read in the shape its reader expects, as the refusal; else null. */
21
10
  export declare function checkInputShapes(inputs: readonly JsonInput[], read: (path: string) => string): string | null;
22
- /**
23
- * The feature corpus or CI workflow path the run cannot read, as the refusal: a path that is not
24
- * the kind its flag reads, or one the operating system will not let it read. Else null. Both are
25
- * read here by the same discovery the reconcile reads them by.
26
- */
27
11
  export declare function checkInputPaths(args: Record<string, string>): string | null;
28
- /** The saved file given to `--render-from-json`, refused when it is not a saved reconciliation at its top; else null. */
29
12
  export declare function checkSavedReconciliation(path: string, savedJson: string): string | null;
30
- /**
31
- * The re-render of a saved reconciliation, or the refusal naming the file when the renderer cannot
32
- * read it. The file is this path's only input, so a render that fails is a file the tool cannot read.
33
- */
34
13
  export declare function reRenderOrRefusal(path: string, savedJson: string, strict: boolean): ReRendered | string;
35
14
  //# sourceMappingURL=unreadableInputs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unreadableInputs.d.ts","sourceRoot":"","sources":["../../src/cli-balance/unreadableInputs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAOL,KAAK,KAAK,EACX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAE1D,yGAAyG;AACzG,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAgBD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,EAAE,CASzG;AAwBD,sGAAsG;AACtG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,CAM5G;AAMD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAQ3E;AAED,yHAAyH;AACzH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIvF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,CAMvG"}
1
+ {"version":3,"file":"unreadableInputs.d.ts","sourceRoot":"","sources":["../../src/cli-balance/unreadableInputs.ts"],"names":[],"mappings":"AAMA,OAAO,EAOL,KAAK,KAAK,EACX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAeD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,EAAE,CASzG;AAwBD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,CAM5G;AAMD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAQ3E;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIvF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,CAMvG"}
@@ -1,22 +1,12 @@
1
- /**
2
- * The input guards that decide, before anything is reconciled, whether the run can read what it
3
- * was handed. Each returns the refusal to print or null, and `refuseUnreadableInputs` in ./cli.ts
4
- * turns a refusal into exit 2: an input the tool cannot read is a usage error, never a verdict.
5
- */
6
1
  import { ciReadFault, corpusReadFault, DEFAULT_PACKAGE_JSON, } from "../ingest/ingestQualityChecks.js";
7
2
  import { CI_STEP_RECORD, CUCUMBER_REPORT, PACKAGE_MANIFEST, SAVED_RECONCILIATION, shapeFaultIn, VITEST_REPORT, } from "../ingest/inputShapes.js";
8
3
  import { reRender } from "./reRender.js";
9
- /** Each JSON-bearing flag whose reader expects a shape, keyed by the flag without its dashes. */
10
4
  const READ_SHAPES = {
11
5
  vitest: { noun: "report", writer: "the Vitest JSON reporter writes", shape: VITEST_REPORT },
12
6
  cucumber: { noun: "report", writer: "the Cucumber JSON formatter writes", shape: CUCUMBER_REPORT },
13
7
  "ci-steps": { noun: "record", writer: "of a CI run's record of its steps", shape: CI_STEP_RECORD },
14
8
  "package-json": { noun: "manifest", writer: "of a package.json manifest", shape: PACKAGE_MANIFEST },
15
9
  };
16
- /**
17
- * The JSON inputs this invocation hands the readers, in flag order: each one given, and the
18
- * package.json the run reads by default when none is given and there is one to read.
19
- */
20
10
  export function jsonInputsOf(args, exists) {
21
11
  const given = Object.entries(READ_SHAPES).flatMap(([flag, read]) => {
22
12
  const path = args[flag];
@@ -52,7 +42,6 @@ function jsonInputFault(input, read) {
52
42
  return null;
53
43
  return `${input.subject} is not in the shape ${input.writer}: ${input.path} (${fault})`;
54
44
  }
55
- /** The first input that cannot be read in the shape its reader expects, as the refusal; else null. */
56
45
  export function checkInputShapes(inputs, read) {
57
46
  for (const input of inputs) {
58
47
  const fault = jsonInputFault(input, read);
@@ -64,11 +53,6 @@ export function checkInputShapes(inputs, read) {
64
53
  function pathRefusal(subject, fault) {
65
54
  return `${subject} could not be read: ${fault.path} (${fault.reason})`;
66
55
  }
67
- /**
68
- * The feature corpus or CI workflow path the run cannot read, as the refusal: a path that is not
69
- * the kind its flag reads, or one the operating system will not let it read. Else null. Both are
70
- * read here by the same discovery the reconcile reads them by.
71
- */
72
56
  export function checkInputPaths(args) {
73
57
  const corpus = corpusReadFault(args["features"]);
74
58
  if (corpus !== null) {
@@ -79,17 +63,12 @@ export function checkInputPaths(args) {
79
63
  return pathRefusal(args["ci"] === undefined ? "The CI workflows read by default" : "The --ci workflows", ci);
80
64
  return null;
81
65
  }
82
- /** The saved file given to `--render-from-json`, refused when it is not a saved reconciliation at its top; else null. */
83
66
  export function checkSavedReconciliation(path, savedJson) {
84
67
  const fault = shapeFaultIn(JSON.parse(savedJson), SAVED_RECONCILIATION);
85
68
  if (fault === null)
86
69
  return null;
87
70
  return `The --render-from-json file is not a saved reconciliation: ${path} (${fault})`;
88
71
  }
89
- /**
90
- * The re-render of a saved reconciliation, or the refusal naming the file when the renderer cannot
91
- * read it. The file is this path's only input, so a render that fails is a file the tool cannot read.
92
- */
93
72
  export function reRenderOrRefusal(path, savedJson, strict) {
94
73
  try {
95
74
  return reRender(savedJson, strict);
@@ -1 +1 @@
1
- {"version":3,"file":"unreadableInputs.js","sourceRoot":"","sources":["../../src/cli-balance/unreadableInputs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,WAAW,EACX,eAAe,EACf,oBAAoB,GAErB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,EACZ,aAAa,GAEd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAmB,MAAM,eAAe,CAAC;AAgB1D,iGAAiG;AACjG,MAAM,WAAW,GAAwC;IACvD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,iCAAiC,EAAE,KAAK,EAAE,aAAa,EAAE;IAC3F,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,oCAAoC,EAAE,KAAK,EAAE,eAAe,EAAE;IAClG,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,mCAAmC,EAAE,KAAK,EAAE,cAAc,EAAE;IAClG,cAAc,EAAE,EAAE,IAAI,EAAE,UAAU,E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AS,EAAE,MAAM,CAAC,CAAC;IACrC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,gFAAgF,IAAI,KAAK,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;IACnH,CAAC;AACH,CAAC"}
@@ -1,119 +1,33 @@
1
- /**
2
- * The data-driven command/flag registry — the single source the CLI answers `--help`
3
- * from (@SCN-CLI-006). Two scopes mirror the two help surfaces:
4
- *
5
- * - `global` — the host modifiers recognised BEFORE the command (`--store`,
6
- * `--run-id`), consumed by the top-level dispatcher; rendered by
7
- * `spec-controller --help` (the sibling @SCN-CLI-007 surface).
8
- * - `commands` — the per-command scopes; each command's own flags (+ `--help`/`-h`),
9
- * rendered by `<command> --help`. No count is written here: @SCN-CLI-008 holds
10
- * registry and render together whatever the number is, and a figure repeated in
11
- * prose is one nothing reads (3F-3277).
12
- *
13
- * A flag exists ⇒ a registry entry ⇒ it appears in help, by construction — the
14
- * single-source discipline the completeness guard (@SCN-CLI-008) will enforce and the
15
- * registry-bounded parser (@SCN-CLI-009) will reject against. Registry + renderers live in the
16
- * CLI/app layer, never the domain.
17
- *
18
- * THE REGISTRY IS THE SOURCE OF TRUTH FOR A FLAG'S DESCRIPTION AND NOTHING RECONCILES THE DOC
19
- * AGAINST IT. This docblock used to say the doc was reconciled by @SCN-CLI-007/008; it is not —
20
- * those two are about the registry and the two RENDERERS, and nothing in `tests/` or `features/`
21
- * reads doc/how_to_use.md at all (3F-3256 deleted the checks that read documentation). So the
22
- * flag table in that page is kept in step by hand, and it has drifted in BOTH directions before
23
- * now: ahead of the registry on one sentence and behind it on the next (3F-3083).
24
- */
25
- /** One flag in a scope: its canonical name, optional aliases, value placeholder, help. */
26
1
  export interface FlagSpec {
27
- /** The canonical flag with dashes (e.g. "--features", "--help"). */
28
2
  name: string;
29
- /** Alternate spellings rendered after the name (e.g. ["-h"]); omit when none. */
30
3
  aliases?: string[];
31
- /** The value placeholder (e.g. "<dir>"); omit for boolean flags like `--help`. */
32
4
  arg?: string;
33
- /** True when the flag may be given more than once (`--format`); omit otherwise. */
34
5
  repeatable?: boolean;
35
- /** One-line help text — the description migrated from doc/how_to_use.md. */
36
6
  description: string;
37
7
  }
38
- /** A positional argument a command takes: its placeholder, and what it is. */
39
8
  export interface PositionalSpec {
40
- /** The placeholder as help shows it (e.g. "<FFF>"). */
41
9
  name: string;
42
- /** One-line help text. */
43
10
  description: string;
44
11
  }
45
- /** A command: its token, a one-line summary, its per-command flag scope, and any config it reads. */
46
12
  export interface CommandSpec {
47
- /** The command token (e.g. "balance"). */
48
13
  name: string;
49
- /** One-line summary for the top-level `spec-controller --help` (the CLI-007 surface). */
50
14
  summary: string;
51
- /** The command's per-command flag scope. */
52
15
  flags: FlagSpec[];
53
- /** The positional arguments the command takes, in order, each once. Omit when it takes flags only. */
54
16
  positionals?: PositionalSpec[];
55
- /** False for a command that keeps no run, so the host refuses `--store`/`--run-id` before it. Omit otherwise. */
56
17
  acceptsHostModifiers?: false;
57
- /**
58
- * Trailing help lines documenting `package.json` config THIS command reads, rendered
59
- * verbatim after the flag list. It lives on the command's entry rather than in the
60
- * renderer because a config field belongs to whichever command consumes it: appended
61
- * unconditionally, `balance`'s `specController.deferralTags` block would document, under
62
- * every later command, a field that command does not read (3F-3298). Omit when none.
63
- */
64
18
  configHelp?: string[];
65
- /**
66
- * Flags this command once accepted and no longer does (3F-3528). Refused like any flag
67
- * outside `flags`, but as retired: a flag every earlier version accepts and no later one will
68
- * cannot be cured by bumping a pin, only by moving to what replaced it. Never read by the help
69
- * renderers, so a retired flag cannot reach `--help` or become accepted by being listed here.
70
- * APPEND-ONLY. Omit when none.
71
- */
72
19
  retiredFlags?: RetiredFlagSpec[];
73
20
  }
74
- /** A flag a command has retired: what it was, the first version to refuse it, and its successor. */
75
21
  export interface RetiredFlagSpec {
76
- /** The retired flag with dashes (e.g. "--measurements"). */
77
22
  name: string;
78
- /** The first published version whose command no longer accepted it. */
79
23
  retiredIn: string;
80
- /** One sentence naming what a consumer does instead. */
81
24
  replacement: string;
82
25
  }
83
- /** The two-scope registry: the global host-modifier scope, and the per-command scopes. */
84
26
  export interface CliRegistry {
85
- /** Host modifiers recognised before the command — the global scope (CLI-007). */
86
27
  global: FlagSpec[];
87
- /** The per-command scopes. */
88
28
  commands: CommandSpec[];
89
29
  }
90
- /**
91
- * The registry singleton — the single source both help surfaces render from.
92
- */
93
30
  export declare const cliRegistry: CliRegistry;
94
- /**
95
- * Render THE NAMED command's per-command scope as help text: one line per registered flag
96
- * (name + arg-placeholder + description), then whatever config lines that command's entry
97
- * carries — driven BY the registry, so a flag that exists is a flag that appears, by
98
- * construction. Returns the help block WITHOUT a trailing newline (the caller adds it,
99
- * matching the writer's stdout convention).
100
- *
101
- * THE COMMAND IS A PARAMETER (3F-3298). It used to be the literal `"balance"`, found by name
102
- * inside this function, which is what the single registered command made look general. A
103
- * second command had no help surface at all under that signature — not an empty one; there
104
- * was no argument by which to ask. What the renderer covers is now the registry's shape
105
- * rather than the command set's size on the day it was written.
106
- */
107
31
  export declare function renderCommandHelp(registry: CliRegistry, command: string): string;
108
- /**
109
- * Render the top-level `spec-controller --help` surface (@SCN-CLI-007) FROM the registry:
110
- * a Commands section (each command's name + one-line summary) and a Host modifiers section
111
- * (each global-scope flag: name + arg-placeholder + one-line description). The global-scope
112
- * half of the two-scope registry — the counterpart to `renderCommandHelp`'s per-command
113
- * half — so the top-level usage no longer hand-keeps (and can no longer silently drift
114
- * from) the command set or the host modifiers; both are sourced from `cliRegistry`.
115
- * Summaries and descriptions render on a single line (no wrapping) so a registered string
116
- * appears verbatim. Returns the block WITHOUT a trailing newline (the caller adds it).
117
- */
118
32
  export declare function renderTopLevelHelp(registry: CliRegistry): string;
119
33
  //# sourceMappingURL=cli-registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-registry.d.ts","sourceRoot":"","sources":["../src/cli-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,0FA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