@codyswann/lisa 3.48.7 → 3.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/cli/doctor-hook-copy-parity.d.ts +8 -0
  2. package/dist/cli/doctor-hook-copy-parity.d.ts.map +1 -0
  3. package/dist/cli/doctor-hook-copy-parity.js +121 -0
  4. package/dist/cli/doctor-hook-copy-parity.js.map +1 -0
  5. package/dist/cli/doctor.d.ts.map +1 -1
  6. package/dist/cli/doctor.js +6 -0
  7. package/dist/cli/doctor.js.map +1 -1
  8. package/dist/cli/gate-report-agent-hooks.d.ts +40 -0
  9. package/dist/cli/gate-report-agent-hooks.d.ts.map +1 -0
  10. package/dist/cli/gate-report-agent-hooks.js +226 -0
  11. package/dist/cli/gate-report-agent-hooks.js.map +1 -0
  12. package/dist/cli/gate-report-assemble.d.ts +37 -0
  13. package/dist/cli/gate-report-assemble.d.ts.map +1 -0
  14. package/dist/cli/gate-report-assemble.js +69 -0
  15. package/dist/cli/gate-report-assemble.js.map +1 -0
  16. package/dist/cli/gate-report-cells.d.ts +27 -2
  17. package/dist/cli/gate-report-cells.d.ts.map +1 -1
  18. package/dist/cli/gate-report-cells.js +59 -14
  19. package/dist/cli/gate-report-cells.js.map +1 -1
  20. package/dist/cli/gate-report-contexts.d.ts +70 -0
  21. package/dist/cli/gate-report-contexts.d.ts.map +1 -0
  22. package/dist/cli/gate-report-contexts.js +72 -0
  23. package/dist/cli/gate-report-contexts.js.map +1 -0
  24. package/dist/cli/gate-report-facade.d.ts +62 -0
  25. package/dist/cli/gate-report-facade.d.ts.map +1 -0
  26. package/dist/cli/gate-report-facade.js +224 -0
  27. package/dist/cli/gate-report-facade.js.map +1 -0
  28. package/dist/cli/gate-report-fragment.d.ts +11 -0
  29. package/dist/cli/gate-report-fragment.d.ts.map +1 -0
  30. package/dist/cli/gate-report-fragment.js +100 -0
  31. package/dist/cli/gate-report-fragment.js.map +1 -0
  32. package/dist/cli/gate-report-html.d.ts +47 -0
  33. package/dist/cli/gate-report-html.d.ts.map +1 -0
  34. package/dist/cli/gate-report-html.js +49 -0
  35. package/dist/cli/gate-report-html.js.map +1 -0
  36. package/dist/cli/gate-report-joins.d.ts +37 -0
  37. package/dist/cli/gate-report-joins.d.ts.map +1 -0
  38. package/dist/cli/gate-report-joins.js +104 -0
  39. package/dist/cli/gate-report-joins.js.map +1 -0
  40. package/dist/cli/gate-report-merge.d.ts +22 -0
  41. package/dist/cli/gate-report-merge.d.ts.map +1 -0
  42. package/dist/cli/gate-report-merge.js +79 -0
  43. package/dist/cli/gate-report-merge.js.map +1 -0
  44. package/dist/cli/gate-report-preview.d.ts +0 -18
  45. package/dist/cli/gate-report-preview.d.ts.map +1 -1
  46. package/dist/cli/gate-report-preview.js +35 -266
  47. package/dist/cli/gate-report-preview.js.map +1 -1
  48. package/dist/cli/gate-report-rows.d.ts +39 -0
  49. package/dist/cli/gate-report-rows.d.ts.map +1 -0
  50. package/dist/cli/gate-report-rows.js +209 -0
  51. package/dist/cli/gate-report-rows.js.map +1 -0
  52. package/dist/cli/gate-report-sections.d.ts +32 -0
  53. package/dist/cli/gate-report-sections.d.ts.map +1 -0
  54. package/dist/cli/gate-report-sections.js +164 -0
  55. package/dist/cli/gate-report-sections.js.map +1 -0
  56. package/dist/cli/gate-report-style.d.ts +19 -0
  57. package/dist/cli/gate-report-style.d.ts.map +1 -0
  58. package/dist/cli/gate-report-style.js +97 -0
  59. package/dist/cli/gate-report-style.js.map +1 -0
  60. package/dist/cli/gate-report-summary.d.ts.map +1 -1
  61. package/dist/cli/gate-report-summary.js +3 -0
  62. package/dist/cli/gate-report-summary.js.map +1 -1
  63. package/dist/cli/gate-report-types.d.ts +132 -1
  64. package/dist/cli/gate-report-types.d.ts.map +1 -1
  65. package/dist/cli/gate-report-types.js +1 -1
  66. package/dist/cli/gate-report-upstream.d.ts +70 -0
  67. package/dist/cli/gate-report-upstream.d.ts.map +1 -0
  68. package/dist/cli/gate-report-upstream.js +90 -0
  69. package/dist/cli/gate-report-upstream.js.map +1 -0
  70. package/dist/cli/gate-report.d.ts +2 -0
  71. package/dist/cli/gate-report.d.ts.map +1 -1
  72. package/dist/cli/gate-report.js +98 -140
  73. package/dist/cli/gate-report.js.map +1 -1
  74. package/dist/cli/ui-cmd.d.ts +4 -0
  75. package/dist/cli/ui-cmd.d.ts.map +1 -1
  76. package/dist/cli/ui-cmd.js +10 -2
  77. package/dist/cli/ui-cmd.js.map +1 -1
  78. package/dist/cli/ui-gate-report.d.ts +57 -0
  79. package/dist/cli/ui-gate-report.d.ts.map +1 -0
  80. package/dist/cli/ui-gate-report.js +95 -0
  81. package/dist/cli/ui-gate-report.js.map +1 -0
  82. package/dist/core/hook-copy-parity.d.ts +81 -0
  83. package/dist/core/hook-copy-parity.d.ts.map +1 -0
  84. package/dist/core/hook-copy-parity.js +111 -0
  85. package/dist/core/hook-copy-parity.js.map +1 -0
  86. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  87. package/dist/core/upstream-evidence-manifest.js +28 -2
  88. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  89. package/package.json +1 -1
  90. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  92. package/plugins/lisa-agy/plugin.json +1 -1
  93. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  94. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  95. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  96. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  97. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  99. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  100. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  101. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  102. package/plugins/lisa-expo-agy/plugin.json +1 -1
  103. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  104. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  105. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  106. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  107. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  108. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  109. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  111. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  112. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  113. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  114. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  115. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  116. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  117. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  118. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  119. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  120. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  121. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  122. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  123. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  125. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  126. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  127. package/plugins/lisa-rails-agy/plugin.json +1 -1
  128. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  129. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  130. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  132. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  133. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  134. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  135. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  136. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  137. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  138. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  139. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  140. package/ui/README.md +56 -3
  141. package/ui/index.html +52 -0
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import type { GateRegistryModule, RegistryGate, ResolvedGate } from "./gate-report-registry.js";
12
12
  import { type HookEvidence } from "./gate-report-executors.js";
13
- import type { Bucket, ExecutorEvidence, Finding, GateMomentCell, MergeBlock, ProofMode, TaskProvenance } from "./gate-report-types.js";
13
+ import type { Bucket, ExecutorEvidence, Finding, GateMomentCell, MergeBlock, MergeVerdict, ProofMode, TaskProvenance } from "./gate-report-types.js";
14
14
  /** Everything one moment's cells are derived from. */
15
15
  export interface MomentContext {
16
16
  /** The moment, `:environment` suffix included. */
@@ -33,6 +33,24 @@ export interface CellContext {
33
33
  readonly workflowName: string;
34
34
  /** Tier 2: the live ruleset's answer for one expected context. */
35
35
  readonly blocksMerge: (moment: string, expectedContext: string | null) => Finding<MergeBlock>;
36
+ /** Tier 3: whether the mapped CI job reads the declaration. */
37
+ readonly facade: (gateId: string, qualityJob: string | null) => Finding<boolean>;
38
+ /**
39
+ * Whether this run could read the workflows Tier 3 is written in.
40
+ *
41
+ * When it could, "nothing runs this and nothing declares it" becomes
42
+ * provable rather than merely unproved, and bucket D stops being a thing the
43
+ * report has to decline to say.
44
+ */
45
+ readonly facadeKnown: boolean;
46
+ /** The moment a CI job's verdict actually applies at. */
47
+ readonly mergeMoment: string;
48
+ /** Tier 2 joined with the workflow: does this gate block a merge? */
49
+ readonly merge: (inputs: {
50
+ expectedContext: string | null;
51
+ task: string | null;
52
+ label: string;
53
+ }) => Finding<MergeVerdict>;
36
54
  }
37
55
  /**
38
56
  * A gate-level `run` override, which applies at every declared moment.
@@ -82,6 +100,9 @@ export declare function commandExistsFinding(scripts: Readonly<Record<string, st
82
100
  * @param options.mode - How the gate is proved
83
101
  * @param options.commandExists - Whether the task exists
84
102
  * @param options.executors - Executors proved for this pair
103
+ * @param options.facade - Whether the mapped CI job reads the declaration
104
+ * @param options.atMergeMoment - Whether a CI verdict applies at this moment
105
+ * @param options.facadeKnown - Whether this run could read the CI workflows
85
106
  * @returns A bucket, or an explicit refusal
86
107
  */
87
108
  export declare function classifyBucket(options: {
@@ -89,13 +110,17 @@ export declare function classifyBucket(options: {
89
110
  mode: ProofMode | null;
90
111
  commandExists: Finding<boolean>;
91
112
  executors: readonly ExecutorEvidence[];
113
+ facade: Finding<boolean>;
114
+ atMergeMoment: boolean;
115
+ facadeKnown: boolean;
92
116
  }): Finding<Bucket>;
93
117
  /**
94
118
  * Build one cell.
95
119
  * @param context - Report-wide inputs
96
120
  * @param momentContext - Per-moment inputs
97
121
  * @param id - Gate id
122
+ * @param qualityJob - The CI job the static table pairs with this gate
98
123
  * @returns The cell
99
124
  */
100
- export declare function buildCell(context: CellContext, momentContext: MomentContext, id: string): GateMomentCell;
125
+ export declare function buildCell(context: CellContext, momentContext: MomentContext, id: string, qualityJob: string | null): GateMomentCell;
101
126
  //# sourceMappingURL=gate-report-cells.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gate-report-cells.d.ts","sourceRoot":"","sources":["../../src/cli/gate-report-cells.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EACV,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACb,MAAM,2BAA2B,CAA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AC,MAAM,CAAC,CAMlB;AA2ED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,aAAa,EAC5B,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,MAAM,GAAG,IAAI,GACxB,cAAc,CAiEhB"}
@@ -1,4 +1,5 @@
1
1
  import { executorsFor } from "./gate-report-executors.js";
2
+ import { TIER_THREE_UNKNOWABLE } from "./gate-report-facade.js";
2
3
  /** Levels that put a gate into service. `off` is a declaration, not service. */
3
4
  const ACTIVE_LEVELS = new Set(["required", "optional"]);
4
5
  /** Every level the settings file may carry, `off` included. */
@@ -6,11 +7,7 @@ const DECLARED_LEVELS = new Set([...ACTIVE_LEVELS, "off"]);
6
7
  /** The state of a gate the settings file never mentions at a moment. */
7
8
  const UNDECLARED = "not-declared";
8
9
  /** Tier 3 is the same refusal everywhere, so it is written once. */
9
- const TIER_THREE = {
10
- state: "unknown",
11
- reason: "determined-by-quality-yml",
12
- message: "Whether the CI job reads this declaration or runs a hardcoded command is written in quality.yml, which this project does not have — it calls the reusable workflow by ref.",
13
- };
10
+ const TIER_THREE = TIER_THREE_UNKNOWABLE;
14
11
  /**
15
12
  * The raw per-moment entry the settings file holds for one gate.
16
13
  * @param gates - The gates block
@@ -108,21 +105,59 @@ export function commandExistsFinding(scripts, task) {
108
105
  * @param options.mode - How the gate is proved
109
106
  * @param options.commandExists - Whether the task exists
110
107
  * @param options.executors - Executors proved for this pair
108
+ * @param options.facade - Whether the mapped CI job reads the declaration
109
+ * @param options.atMergeMoment - Whether a CI verdict applies at this moment
110
+ * @param options.facadeKnown - Whether this run could read the CI workflows
111
111
  * @returns A bucket, or an explicit refusal
112
112
  */
113
113
  export function classifyBucket(options) {
114
+ const local = localBucket(options);
115
+ if (local !== null)
116
+ return { state: "verified", value: local };
117
+ const ci = ciBucket(options);
118
+ if (ci !== null)
119
+ return { state: "verified", value: ci };
120
+ return options.facadeKnown ? { state: "verified", value: "D" } : TIER_THREE;
121
+ }
122
+ /**
123
+ * The bucket the project's own files alone can prove.
124
+ * @param options - Classification inputs
125
+ * @param options.active - Whether the declaration puts the gate into service
126
+ * @param options.mode - How the gate is proved
127
+ * @param options.commandExists - Whether the task exists
128
+ * @param options.executors - Executors proved for this pair
129
+ * @returns A bucket, or null when the local files do not settle it
130
+ */
131
+ function localBucket(options) {
114
132
  const { active, mode, commandExists, executors } = options;
115
133
  const missingCommand = commandExists.state === "verified" && !commandExists.value;
116
- if (active && mode === "run" && missingCommand) {
117
- return { state: "verified", value: "C" };
118
- }
134
+ if (active && mode === "run" && missingCommand)
135
+ return "C";
119
136
  if (active && executors.some(entry => entry.kind === "gate-runner")) {
120
- return { state: "verified", value: "A" };
137
+ return "A";
121
138
  }
122
139
  if (!active && executors.some(entry => entry.kind !== "gate-runner")) {
123
- return { state: "verified", value: "B" };
140
+ return "B";
124
141
  }
125
- return TIER_THREE;
142
+ return null;
143
+ }
144
+ /**
145
+ * The bucket the CI half settles, once the workflow declaring the job is read.
146
+ *
147
+ * A wired façade under a live declaration is the whole point of the façade; a
148
+ * wired façade under NO declaration runs the hardcoded fallback, which is
149
+ * bucket B wearing the clothes of bucket A.
150
+ * @param options - Classification inputs
151
+ * @param options.active - Whether the declaration puts the gate into service
152
+ * @param options.facade - Whether the mapped CI job reads the declaration
153
+ * @param options.atMergeMoment - Whether a CI verdict applies at this moment
154
+ * @returns A bucket, or null when CI does not settle it
155
+ */
156
+ function ciBucket(options) {
157
+ const { active, facade, atMergeMoment } = options;
158
+ if (!atMergeMoment || facade.state !== "verified")
159
+ return null;
160
+ return facade.value && active ? "A" : "B";
126
161
  }
127
162
  /**
128
163
  * The branch-protection context a `required` declaration implies.
@@ -147,9 +182,10 @@ function expectedContextFor(options) {
147
182
  * @param context - Report-wide inputs
148
183
  * @param momentContext - Per-moment inputs
149
184
  * @param id - Gate id
185
+ * @param qualityJob - The CI job the static table pairs with this gate
150
186
  * @returns The cell
151
187
  */
152
- export function buildCell(context, momentContext, id) {
188
+ export function buildCell(context, momentContext, id, qualityJob) {
153
189
  const { registry, gates, hooks, scripts, runner, workflowName } = context;
154
190
  const { moment, resolved, failure } = momentContext;
155
191
  const definition = registry.REGISTRY[id];
@@ -176,6 +212,7 @@ export function buildCell(context, momentContext, id) {
176
212
  task: cellTask,
177
213
  declared: active,
178
214
  });
215
+ const facade = context.facade(id, qualityJob);
179
216
  const expectedContext = expectedContextFor({
180
217
  level: declaration,
181
218
  mode,
@@ -196,9 +233,17 @@ export function buildCell(context, momentContext, id) {
196
233
  executors,
197
234
  expectedContext,
198
235
  blocksMerge: context.blocksMerge(moment, expectedContext),
199
- facadeReadsDeclaration: TIER_THREE,
236
+ facadeReadsDeclaration: facade,
200
237
  bucket: legal
201
- ? classifyBucket({ active, mode, commandExists, executors })
238
+ ? classifyBucket({
239
+ active,
240
+ mode,
241
+ commandExists,
242
+ executors,
243
+ facade,
244
+ atMergeMoment: moment === context.mergeMoment,
245
+ facadeKnown: context.facadeKnown,
246
+ })
202
247
  : {
203
248
  state: "not-applicable",
204
249
  reason: "moment-illegal",
@@ -1 +1 @@
1
- {"version":3,"file":"gate-report-cells.js","sourceRoot":"","sources":["../../src/cli/gate-report-cells.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAqB,MAAM,4BAA4B,CAAC;AAY7E,gFAAgF;AAChF,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AAExD,+DAA+D;AAC/D,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;AAE3D,wEAAwE;AACxE,MAAM,UAAU,GAAqB,cAAc,CAAC;AA8BpD,oEAAoE;AACpE,MAAM,UAAU,GAAmB;IACjC,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,2BAA2B;IACnC,OAAO,EACL,4KAA4K;CAC/K,CAAC;AAEF;;;;;;GAMG;AACH,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7B,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * What else gates my merges, and where does it come from?
3
+ *
4
+ * The rest of this report describes Lisa's own jobs. A reader can reasonably
5
+ * take that for the whole picture of what stands between their work and a
6
+ * merge, and it is not: a project's CI almost always carries jobs Lisa neither
7
+ * ships nor governs — a third-party app, or a workflow the project wrote — and
8
+ * some of them are required.
9
+ *
10
+ * Four origins, because collapsing them loses the attribution. A context Lisa
11
+ * ships AND a declaration governs is working as intended. A context Lisa ships
12
+ * that nothing declares is the project's own settings gap. A context from the
13
+ * project's own workflow is the project's, and Lisa has no opinion about it. A
14
+ * context from something else entirely is neither the project's
15
+ * misconfiguration nor Lisa's defect, and reporting it as a gap in either is
16
+ * how a report manufactures a problem that does not exist.
17
+ * @module cli/gate-report-contexts
18
+ */
19
+ import type { ContextOrigin, Finding, RequiredContextRow } from "./gate-report-types.js";
20
+ /** Everything the classification needs. */
21
+ export interface ContextOriginInputs {
22
+ /** Contexts the settings file's `required` declarations imply. */
23
+ readonly declared: readonly string[];
24
+ /** Every context Lisa could produce if every gate were declared required. */
25
+ readonly lisaUniverse: readonly string[];
26
+ /** Contexts the project's own workflows could post. */
27
+ readonly projectContexts: ReadonlySet<string>;
28
+ }
29
+ /**
30
+ * Which of the four origins a required context has.
31
+ * @param context - The context string
32
+ * @param inputs - Everything the classification needs
33
+ * @returns The origin
34
+ */
35
+ export declare function originOf(context: string, inputs: ContextOriginInputs): ContextOrigin;
36
+ /**
37
+ * Classify every context a merge is actually blocked on.
38
+ *
39
+ * Carries the unknown through unchanged. A run that could not read branch
40
+ * protection has no list to classify, and inventing an empty one would report
41
+ * "nothing else gates your merges" on the strength of not having looked.
42
+ * @param required - The live required contexts, or an unknown
43
+ * @param inputs - Everything the classification needs
44
+ * @returns One row per required context, sorted, or the same unknown
45
+ */
46
+ export declare function classifyRequiredContexts(required: Finding<readonly string[]>, inputs: ContextOriginInputs): Finding<readonly RequiredContextRow[]>;
47
+ /**
48
+ * Every context Lisa could produce, if every gate were declared required.
49
+ *
50
+ * Derived by asking the registry rather than by rebuilding its format string:
51
+ * an `await` gate posts under the awaited signal's own name and a `run` gate
52
+ * under the calling workflow's, and a second transcription of that rule is a
53
+ * second thing to keep true.
54
+ * @param options - Derivation inputs
55
+ * @param options.gateIds - Gate ids legal at the merge moment
56
+ * @param options.moment - The merge moment
57
+ * @param options.workflowName - The calling workflow's name
58
+ * @param options.contextsFor - The registry's own context derivation
59
+ * @returns Every context Lisa ships a job for, sorted
60
+ */
61
+ export declare function lisaContextUniverse(options: {
62
+ gateIds: readonly string[];
63
+ moment: string;
64
+ workflowName: string;
65
+ contextsFor: (gates: Record<string, unknown>, options?: {
66
+ moment?: string;
67
+ workflowName?: string;
68
+ }) => string[];
69
+ }): string[];
70
+ //# sourceMappingURL=gate-report-contexts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-report-contexts.d.ts","sourceRoot":"","sources":["../../src/cli/gate-report-contexts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAEhC,2CAA2C;AAC3C,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,6EAA6E;IAC7E,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,uDAAuD;IACvD,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/C;AAcD;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,mBAAmB,GAC1B,aAAa,CAMf;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,EACpC,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,SAAS,kBAAkB,EAAE,CAAC,CAWxC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE;IAC3C,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,CACX,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,KACjD,MAAM,EAAE,CAAC;CACf,GAAG,MAAM,EAAE,CAYX"}
@@ -0,0 +1,72 @@
1
+ /** What each origin means, in one operator-readable sentence. */
2
+ const DETAILS = {
3
+ "lisa-governed": "Lisa ships the job and a declaration in this project's settings governs it. Changing the declaration changes what runs.",
4
+ "lisa-undeclared": "Lisa ships the job and it blocks merges, but nothing in this project's settings governs it — changing the settings file cannot turn it on, off, or into something else.",
5
+ "project-workflow": "This project's own workflow posts this context. Lisa neither ships nor governs it, and nothing here is a finding against it.",
6
+ "third-party": "Neither Lisa nor a workflow in this repository posts this context — it comes from an app installed on the repository. It gates merges and is outside both.",
7
+ };
8
+ /**
9
+ * Which of the four origins a required context has.
10
+ * @param context - The context string
11
+ * @param inputs - Everything the classification needs
12
+ * @returns The origin
13
+ */
14
+ export function originOf(context, inputs) {
15
+ if (inputs.declared.includes(context))
16
+ return "lisa-governed";
17
+ if (inputs.lisaUniverse.includes(context))
18
+ return "lisa-undeclared";
19
+ return inputs.projectContexts.has(context)
20
+ ? "project-workflow"
21
+ : "third-party";
22
+ }
23
+ /**
24
+ * Classify every context a merge is actually blocked on.
25
+ *
26
+ * Carries the unknown through unchanged. A run that could not read branch
27
+ * protection has no list to classify, and inventing an empty one would report
28
+ * "nothing else gates your merges" on the strength of not having looked.
29
+ * @param required - The live required contexts, or an unknown
30
+ * @param inputs - Everything the classification needs
31
+ * @returns One row per required context, sorted, or the same unknown
32
+ */
33
+ export function classifyRequiredContexts(required, inputs) {
34
+ if (required.state !== "verified")
35
+ return required;
36
+ return {
37
+ state: "verified",
38
+ value: [...required.value]
39
+ .sort((left, right) => left.localeCompare(right))
40
+ .map(context => {
41
+ const origin = originOf(context, inputs);
42
+ return { context, origin, detail: DETAILS[origin] };
43
+ }),
44
+ };
45
+ }
46
+ /**
47
+ * Every context Lisa could produce, if every gate were declared required.
48
+ *
49
+ * Derived by asking the registry rather than by rebuilding its format string:
50
+ * an `await` gate posts under the awaited signal's own name and a `run` gate
51
+ * under the calling workflow's, and a second transcription of that rule is a
52
+ * second thing to keep true.
53
+ * @param options - Derivation inputs
54
+ * @param options.gateIds - Gate ids legal at the merge moment
55
+ * @param options.moment - The merge moment
56
+ * @param options.workflowName - The calling workflow's name
57
+ * @param options.contextsFor - The registry's own context derivation
58
+ * @returns Every context Lisa ships a job for, sorted
59
+ */
60
+ export function lisaContextUniverse(options) {
61
+ const everything = Object.fromEntries(options.gateIds.map(id => [id, { [options.moment]: "required" }]));
62
+ try {
63
+ return options.contextsFor(everything, {
64
+ moment: options.moment,
65
+ workflowName: options.workflowName,
66
+ });
67
+ }
68
+ catch {
69
+ return [];
70
+ }
71
+ }
72
+ //# sourceMappingURL=gate-report-contexts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-report-contexts.js","sourceRoot":"","sources":["../../src/cli/gate-report-contexts.ts"],"names":[],"mappings":"AAkCA,iEAAiE;AACjE,MAAM,OAAO,GAA4C;IACvD,eAAe,EACb,yHAAyH;IAC3H,iBAAiB,EACf,yKAAyK;IAC3K,kBAAkB,EAChB,8HAA8H;IAChI,aAAa,EACX,4JAA4J;CAC/J,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CACtB,OAAe,EACf,MAA2B;IAE3B,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,eA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MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -0,0 +1,62 @@
1
+ import type { FacadeSource, Finding } from "./gate-report-types.js";
2
+ /** Everything the local workflows say about façade wiring. */
3
+ export interface FacadeFacts {
4
+ /** Whether `quality.yml` itself was found and parsed. */
5
+ readonly qualityYmlPresent: boolean;
6
+ /** Workflow files parsed, project-relative and sorted. */
7
+ readonly files: readonly string[];
8
+ /** Job id -> the gate its façade resolves. */
9
+ readonly gatesByJob: ReadonlyMap<string, string>;
10
+ /** Every job id declared across the parsed workflows. */
11
+ readonly jobs: ReadonlySet<string>;
12
+ /**
13
+ * Every status context the project's OWN workflows could post.
14
+ *
15
+ * Both the bare job name and the `workflow / job` form, because GitHub
16
+ * spells a context differently depending on how the job was reached and a
17
+ * report that matched only one form would attribute a project's own job to a
18
+ * third party.
19
+ */
20
+ readonly projectContexts: ReadonlySet<string>;
21
+ /** Every job, with the shell it runs and the contexts it could post. */
22
+ readonly jobSites: readonly JobSite[];
23
+ }
24
+ /** One CI job, as the merge-verdict join reads it. */
25
+ export interface JobSite {
26
+ /** The job's id. */
27
+ readonly id: string;
28
+ /** The job's `name:`, which is what a ruleset matches by string. */
29
+ readonly name: string;
30
+ /** The contexts it could post, in both spellings GitHub uses. */
31
+ readonly contexts: readonly string[];
32
+ /** Every `run:` block in the job, concatenated. */
33
+ readonly shell: string;
34
+ }
35
+ /** The refusal a project with no copy of the workflow gets. */
36
+ export declare const TIER_THREE_UNKNOWABLE: Finding<never>;
37
+ /**
38
+ * Read what the project's own workflows say about façade wiring.
39
+ * @param projectRoot - Project root
40
+ * @returns The facts, empty when the project holds no workflows
41
+ */
42
+ export declare function readFacadeFacts(projectRoot: string): Promise<FacadeFacts>;
43
+ /**
44
+ * How the report names the workflows it read.
45
+ * @param facts - The parsed workflow facts
46
+ * @returns The source block
47
+ */
48
+ export declare function facadeSourceOf(facts: FacadeFacts): FacadeSource;
49
+ /**
50
+ * Whether the CI job for one gate reads the declaration.
51
+ *
52
+ * Three answers, and the third is not a fourth state smuggled in: a job the
53
+ * workflow does not declare at all is a different fact from a job that runs a
54
+ * hardcoded command, and calling the first one `false` would report a gate as
55
+ * unwired on the strength of never having found it.
56
+ * @param facts - The parsed workflow facts
57
+ * @param gateId - The gate being reported
58
+ * @param qualityJob - The CI job the static table pairs with it
59
+ * @returns Whether that job's façade resolves this gate
60
+ */
61
+ export declare function facadeFinding(facts: FacadeFacts, gateId: string, qualityJob: string | null): Finding<boolean>;
62
+ //# sourceMappingURL=gate-report-facade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-report-facade.d.ts","sourceRoot":"","sources":["../../src/cli/gate-report-facade.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAWpE,8DAA8D;AAC9D,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,8CAA8C;IAC9C,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9C,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;CACvC;AAED,sDAAsD;AACtD,MAAM,WAAW,OAAO;IACtB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,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