@codyswann/lisa 3.49.0 → 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.
- package/dist/cli/gate-report-agent-hooks.d.ts +40 -0
- package/dist/cli/gate-report-agent-hooks.d.ts.map +1 -0
- package/dist/cli/gate-report-agent-hooks.js +226 -0
- package/dist/cli/gate-report-agent-hooks.js.map +1 -0
- package/dist/cli/gate-report-assemble.d.ts +37 -0
- package/dist/cli/gate-report-assemble.d.ts.map +1 -0
- package/dist/cli/gate-report-assemble.js +69 -0
- package/dist/cli/gate-report-assemble.js.map +1 -0
- package/dist/cli/gate-report-cells.d.ts +27 -2
- package/dist/cli/gate-report-cells.d.ts.map +1 -1
- package/dist/cli/gate-report-cells.js +59 -14
- package/dist/cli/gate-report-cells.js.map +1 -1
- package/dist/cli/gate-report-contexts.d.ts +70 -0
- package/dist/cli/gate-report-contexts.d.ts.map +1 -0
- package/dist/cli/gate-report-contexts.js +72 -0
- package/dist/cli/gate-report-contexts.js.map +1 -0
- package/dist/cli/gate-report-facade.d.ts +62 -0
- package/dist/cli/gate-report-facade.d.ts.map +1 -0
- package/dist/cli/gate-report-facade.js +224 -0
- package/dist/cli/gate-report-facade.js.map +1 -0
- package/dist/cli/gate-report-fragment.d.ts +11 -0
- package/dist/cli/gate-report-fragment.d.ts.map +1 -0
- package/dist/cli/gate-report-fragment.js +100 -0
- package/dist/cli/gate-report-fragment.js.map +1 -0
- package/dist/cli/gate-report-html.d.ts +47 -0
- package/dist/cli/gate-report-html.d.ts.map +1 -0
- package/dist/cli/gate-report-html.js +49 -0
- package/dist/cli/gate-report-html.js.map +1 -0
- package/dist/cli/gate-report-joins.d.ts +37 -0
- package/dist/cli/gate-report-joins.d.ts.map +1 -0
- package/dist/cli/gate-report-joins.js +104 -0
- package/dist/cli/gate-report-joins.js.map +1 -0
- package/dist/cli/gate-report-merge.d.ts +22 -0
- package/dist/cli/gate-report-merge.d.ts.map +1 -0
- package/dist/cli/gate-report-merge.js +79 -0
- package/dist/cli/gate-report-merge.js.map +1 -0
- package/dist/cli/gate-report-preview.d.ts +0 -18
- package/dist/cli/gate-report-preview.d.ts.map +1 -1
- package/dist/cli/gate-report-preview.js +35 -266
- package/dist/cli/gate-report-preview.js.map +1 -1
- package/dist/cli/gate-report-rows.d.ts +39 -0
- package/dist/cli/gate-report-rows.d.ts.map +1 -0
- package/dist/cli/gate-report-rows.js +209 -0
- package/dist/cli/gate-report-rows.js.map +1 -0
- package/dist/cli/gate-report-sections.d.ts +32 -0
- package/dist/cli/gate-report-sections.d.ts.map +1 -0
- package/dist/cli/gate-report-sections.js +164 -0
- package/dist/cli/gate-report-sections.js.map +1 -0
- package/dist/cli/gate-report-style.d.ts +19 -0
- package/dist/cli/gate-report-style.d.ts.map +1 -0
- package/dist/cli/gate-report-style.js +97 -0
- package/dist/cli/gate-report-style.js.map +1 -0
- package/dist/cli/gate-report-summary.d.ts.map +1 -1
- package/dist/cli/gate-report-summary.js +3 -0
- package/dist/cli/gate-report-summary.js.map +1 -1
- package/dist/cli/gate-report-types.d.ts +132 -1
- package/dist/cli/gate-report-types.d.ts.map +1 -1
- package/dist/cli/gate-report-types.js +1 -1
- package/dist/cli/gate-report-upstream.d.ts +70 -0
- package/dist/cli/gate-report-upstream.d.ts.map +1 -0
- package/dist/cli/gate-report-upstream.js +90 -0
- package/dist/cli/gate-report-upstream.js.map +1 -0
- package/dist/cli/gate-report.d.ts +2 -0
- package/dist/cli/gate-report.d.ts.map +1 -1
- package/dist/cli/gate-report.js +98 -140
- package/dist/cli/gate-report.js.map +1 -1
- package/dist/cli/ui-cmd.d.ts +4 -0
- package/dist/cli/ui-cmd.d.ts.map +1 -1
- package/dist/cli/ui-cmd.js +10 -2
- package/dist/cli/ui-cmd.js.map +1 -1
- package/dist/cli/ui-gate-report.d.ts +57 -0
- package/dist/cli/ui-gate-report.d.ts.map +1 -0
- package/dist/cli/ui-gate-report.js +95 -0
- package/dist/cli/ui-gate-report.js.map +1 -0
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +20 -2
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/ui/README.md +56 -3
- package/ui/index.html +52 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AgentHookEvidence, Finding } from "./gate-report-types.js";
|
|
2
|
+
/** Injectable boundaries, so tests never read the real home directory. */
|
|
3
|
+
export interface AgentHookDependencies {
|
|
4
|
+
/** Home directory holding the installed marketplaces. */
|
|
5
|
+
readonly homedir?: () => string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Whether a matcher selects a tool that writes a file.
|
|
9
|
+
*
|
|
10
|
+
* Compared alternative by alternative rather than by substring, because
|
|
11
|
+
* `TodoWrite` contains `Write` and a substring test therefore reports a hook
|
|
12
|
+
* on the task list as edit-time enforcement. Over-reporting here is not a
|
|
13
|
+
* harmless surplus: the count it feeds is an operator's measure of how much
|
|
14
|
+
* runs that they cannot govern.
|
|
15
|
+
* @param matcher - The matcher as the manifest spells it
|
|
16
|
+
* @returns True when it selects a file-writing tool
|
|
17
|
+
*/
|
|
18
|
+
export declare function matchesEditTool(matcher: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The script a hook command runs.
|
|
21
|
+
*
|
|
22
|
+
* A command is not always a bare path — some are a small shell pipeline — so
|
|
23
|
+
* the last path-like token wins and a command with no script falls back to its
|
|
24
|
+
* first word rather than to a slice of shell syntax.
|
|
25
|
+
* @param command - The registered command
|
|
26
|
+
* @returns A short, operator-readable name
|
|
27
|
+
*/
|
|
28
|
+
export declare function scriptNameOf(command: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Every edit-time hook proved installed and active for this project.
|
|
31
|
+
*
|
|
32
|
+
* Degrades to `unknown` rather than to an empty list. "No agent hooks run
|
|
33
|
+
* here" and "this run could not see which plugins are installed" are different
|
|
34
|
+
* answers, and only the first of them is a finding.
|
|
35
|
+
* @param projectRoot - Project root
|
|
36
|
+
* @param dependencies - Injectable boundaries
|
|
37
|
+
* @returns The evidence, or an honest unknown
|
|
38
|
+
*/
|
|
39
|
+
export declare function collectAgentHooks(projectRoot: string, dependencies?: AgentHookDependencies): Promise<Finding<readonly AgentHookEvidence[]>>;
|
|
40
|
+
//# sourceMappingURL=gate-report-agent-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate-report-agent-hooks.d.ts","sourceRoot":"","sources":["../../src/cli/gate-report-agent-hooks.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAWzE,0EAA0E;AAC1E,MAAM,WAAW,qBAAqB;IACpC,yDAAyD;IACzD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC;CACjC;AA4DD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAKxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOpD;AAuED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,YAAY,GAAE,qBAA0B,GACvC,OAAO,CAAC,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAAC,CAyBhD"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What enforces on every file an agent writes — the `pre-tool` moment.
|
|
3
|
+
*
|
|
4
|
+
* No registry entry lists `pre-tool` in its moments, so no gate can be
|
|
5
|
+
* declared there and the column renders as a wall of "not legal here". Read
|
|
6
|
+
* literally that says nothing happens at this moment. What actually happens is
|
|
7
|
+
* the more alarming state: six scripts fire on every edit — formatting,
|
|
8
|
+
* linting, structural scanning, suppression blocking — running, ungoverned,
|
|
9
|
+
* and impossible to declare.
|
|
10
|
+
*
|
|
11
|
+
* They live in the INSTALLED plugin rather than the project checkout, which is
|
|
12
|
+
* why the emitter did not see them. That is a statement about where the
|
|
13
|
+
* emitter was looking, not about whether the fact is knowable: which plugins a
|
|
14
|
+
* project enables is in its own settings file, and which hooks those plugins
|
|
15
|
+
* register is on the machine running the report. "Not where I was looking" and
|
|
16
|
+
* "not derivable" are different answers and the three-state rule means the
|
|
17
|
+
* difference has to be said rather than rendered as absence.
|
|
18
|
+
*
|
|
19
|
+
* Only file names are reported, never the absolute paths they were read from.
|
|
20
|
+
* An absolute path differs per machine and would break the byte-identical
|
|
21
|
+
* property the report is built on.
|
|
22
|
+
* @module cli/gate-report-agent-hooks
|
|
23
|
+
*/
|
|
24
|
+
import { readFile } from "node:fs/promises";
|
|
25
|
+
import { homedir as defaultHomedir } from "node:os";
|
|
26
|
+
import * as path from "node:path";
|
|
27
|
+
/** The harness events that fire around a single tool call. */
|
|
28
|
+
const PRE_TOOL_EVENTS = ["PreToolUse", "PostToolUse"];
|
|
29
|
+
/** The tools that write a file, as a matcher spells them. */
|
|
30
|
+
const EDIT_TOOLS = new Set(["Write", "Edit", "MultiEdit", "NotebookEdit"]);
|
|
31
|
+
/** File extensions a hook command's script carries. */
|
|
32
|
+
const SCRIPT_SUFFIXES = [".sh", ".mjs", ".js", ".py", ".ts"];
|
|
33
|
+
/**
|
|
34
|
+
* Parse a JSON file, treating anything unreadable as absent.
|
|
35
|
+
* @param file - Absolute path
|
|
36
|
+
* @returns The parsed value, or undefined
|
|
37
|
+
*/
|
|
38
|
+
async function readJson(file) {
|
|
39
|
+
const source = await readFile(file, "utf8").catch(() => undefined);
|
|
40
|
+
if (source === undefined)
|
|
41
|
+
return undefined;
|
|
42
|
+
try {
|
|
43
|
+
return JSON.parse(source);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The plugins the project's settings file switches on.
|
|
51
|
+
* @param projectRoot - Project root
|
|
52
|
+
* @returns Plugin references in `name@marketplace` form, sorted
|
|
53
|
+
*/
|
|
54
|
+
async function enabledPlugins(projectRoot) {
|
|
55
|
+
const settings = await readJson(path.join(projectRoot, ".claude", "settings.json"));
|
|
56
|
+
if (settings === null || typeof settings !== "object")
|
|
57
|
+
return null;
|
|
58
|
+
const enabled = Reflect.get(settings, "enabledPlugins");
|
|
59
|
+
if (enabled === null || typeof enabled !== "object")
|
|
60
|
+
return [];
|
|
61
|
+
return Object.entries(enabled)
|
|
62
|
+
.filter(([, value]) => value === true)
|
|
63
|
+
.map(([key]) => key)
|
|
64
|
+
.sort((left, right) => left.localeCompare(right));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Where each installed marketplace was unpacked.
|
|
68
|
+
* @param home - Home directory
|
|
69
|
+
* @returns Marketplace name -> install location
|
|
70
|
+
*/
|
|
71
|
+
async function marketplaceLocations(home) {
|
|
72
|
+
const known = await readJson(path.join(home, ".claude", "plugins", "known_marketplaces.json"));
|
|
73
|
+
if (known === null || typeof known !== "object" || Array.isArray(known)) {
|
|
74
|
+
return new Map();
|
|
75
|
+
}
|
|
76
|
+
return new Map(Object.entries(known).flatMap(([name, entry]) => {
|
|
77
|
+
if (entry === null || typeof entry !== "object")
|
|
78
|
+
return [];
|
|
79
|
+
const location = Reflect.get(entry, "installLocation");
|
|
80
|
+
return typeof location === "string" && location.length > 0
|
|
81
|
+
? [[name, location]]
|
|
82
|
+
: [];
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Whether a matcher selects a tool that writes a file.
|
|
87
|
+
*
|
|
88
|
+
* Compared alternative by alternative rather than by substring, because
|
|
89
|
+
* `TodoWrite` contains `Write` and a substring test therefore reports a hook
|
|
90
|
+
* on the task list as edit-time enforcement. Over-reporting here is not a
|
|
91
|
+
* harmless surplus: the count it feeds is an operator's measure of how much
|
|
92
|
+
* runs that they cannot govern.
|
|
93
|
+
* @param matcher - The matcher as the manifest spells it
|
|
94
|
+
* @returns True when it selects a file-writing tool
|
|
95
|
+
*/
|
|
96
|
+
export function matchesEditTool(matcher) {
|
|
97
|
+
return matcher
|
|
98
|
+
.split("|")
|
|
99
|
+
.map(part => part.trim())
|
|
100
|
+
.some(part => EDIT_TOOLS.has(part));
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The script a hook command runs.
|
|
104
|
+
*
|
|
105
|
+
* A command is not always a bare path — some are a small shell pipeline — so
|
|
106
|
+
* the last path-like token wins and a command with no script falls back to its
|
|
107
|
+
* first word rather than to a slice of shell syntax.
|
|
108
|
+
* @param command - The registered command
|
|
109
|
+
* @returns A short, operator-readable name
|
|
110
|
+
*/
|
|
111
|
+
export function scriptNameOf(command) {
|
|
112
|
+
const tokens = command.split(/\s+/).filter(token => token.length > 0);
|
|
113
|
+
const scripts = tokens.filter(token => SCRIPT_SUFFIXES.some(suffix => token.endsWith(suffix)));
|
|
114
|
+
const chosen = scripts[scripts.length - 1] ?? tokens[0] ?? command;
|
|
115
|
+
return chosen.slice(chosen.lastIndexOf("/") + 1);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Every command a hook group registers.
|
|
119
|
+
* @param group - One entry of a hook event's array
|
|
120
|
+
* @returns The commands, in declaration order
|
|
121
|
+
*/
|
|
122
|
+
function commandsOf(group) {
|
|
123
|
+
if (group === null || typeof group !== "object")
|
|
124
|
+
return [];
|
|
125
|
+
const hooks = Reflect.get(group, "hooks");
|
|
126
|
+
if (!Array.isArray(hooks))
|
|
127
|
+
return [];
|
|
128
|
+
return hooks.flatMap(hook => {
|
|
129
|
+
if (hook === null || typeof hook !== "object")
|
|
130
|
+
return [];
|
|
131
|
+
const command = Reflect.get(hook, "command");
|
|
132
|
+
return typeof command === "string" ? [command] : [];
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The edit-time hooks one plugin manifest registers.
|
|
137
|
+
* @param reference - The plugin as the settings file spells it
|
|
138
|
+
* @param manifest - The parsed plugin manifest
|
|
139
|
+
* @returns Evidence, one entry per registered command
|
|
140
|
+
*/
|
|
141
|
+
function hooksOfManifest(reference, manifest) {
|
|
142
|
+
if (manifest === null || typeof manifest !== "object")
|
|
143
|
+
return [];
|
|
144
|
+
const hooks = Reflect.get(manifest, "hooks");
|
|
145
|
+
if (hooks === null || typeof hooks !== "object")
|
|
146
|
+
return [];
|
|
147
|
+
return PRE_TOOL_EVENTS.flatMap(event => {
|
|
148
|
+
const groups = Reflect.get(hooks, event);
|
|
149
|
+
if (!Array.isArray(groups))
|
|
150
|
+
return [];
|
|
151
|
+
return groups.flatMap(group => {
|
|
152
|
+
const matcher = group !== null && typeof group === "object"
|
|
153
|
+
? Reflect.get(group, "matcher")
|
|
154
|
+
: undefined;
|
|
155
|
+
if (typeof matcher !== "string" || !matchesEditTool(matcher))
|
|
156
|
+
return [];
|
|
157
|
+
return commandsOf(group).map(command => ({
|
|
158
|
+
plugin: reference,
|
|
159
|
+
event,
|
|
160
|
+
matcher,
|
|
161
|
+
script: scriptNameOf(command),
|
|
162
|
+
}));
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Read one enabled plugin's manifest from its installed marketplace.
|
|
168
|
+
* @param reference - `name@marketplace`
|
|
169
|
+
* @param locations - Marketplace name -> install location
|
|
170
|
+
* @returns Evidence from that plugin alone
|
|
171
|
+
*/
|
|
172
|
+
async function hooksOfPlugin(reference, locations) {
|
|
173
|
+
const separator = reference.lastIndexOf("@");
|
|
174
|
+
if (separator <= 0)
|
|
175
|
+
return [];
|
|
176
|
+
const name = reference.slice(0, separator);
|
|
177
|
+
const location = locations.get(reference.slice(separator + 1));
|
|
178
|
+
if (location === undefined)
|
|
179
|
+
return [];
|
|
180
|
+
const manifest = await readJson(path.join(location, "plugins", name, ".claude-plugin", "plugin.json"));
|
|
181
|
+
return hooksOfManifest(reference, manifest);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Every edit-time hook proved installed and active for this project.
|
|
185
|
+
*
|
|
186
|
+
* Degrades to `unknown` rather than to an empty list. "No agent hooks run
|
|
187
|
+
* here" and "this run could not see which plugins are installed" are different
|
|
188
|
+
* answers, and only the first of them is a finding.
|
|
189
|
+
* @param projectRoot - Project root
|
|
190
|
+
* @param dependencies - Injectable boundaries
|
|
191
|
+
* @returns The evidence, or an honest unknown
|
|
192
|
+
*/
|
|
193
|
+
export async function collectAgentHooks(projectRoot, dependencies = {}) {
|
|
194
|
+
const enabled = await enabledPlugins(projectRoot);
|
|
195
|
+
if (enabled === null) {
|
|
196
|
+
return {
|
|
197
|
+
state: "unknown",
|
|
198
|
+
reason: "agent-settings-unreadable",
|
|
199
|
+
message: "This project's .claude/settings.json could not be read, so which agent hooks are active on every edit is unknown. It is not a claim that none are.",
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
const home = (dependencies.homedir ?? defaultHomedir)();
|
|
203
|
+
const locations = await marketplaceLocations(home);
|
|
204
|
+
if (enabled.length > 0 && locations.size === 0) {
|
|
205
|
+
return {
|
|
206
|
+
state: "unknown",
|
|
207
|
+
reason: "installed-plugins-unreadable",
|
|
208
|
+
message: "This project enables plugins, but the installed marketplaces on this machine could not be read, so the hooks they register on every edit are unknown.",
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
const found = await Promise.all(enabled.map(async (reference) => await hooksOfPlugin(reference, locations)));
|
|
212
|
+
const flat = found.flat();
|
|
213
|
+
return { state: "verified", value: [...flat].sort(byPluginThenScript) };
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Order two hooks so the report is stable across machines.
|
|
217
|
+
* @param left - One hook
|
|
218
|
+
* @param right - Another hook
|
|
219
|
+
* @returns A comparison result
|
|
220
|
+
*/
|
|
221
|
+
function byPluginThenScript(left, right) {
|
|
222
|
+
return (left.plugin.localeCompare(right.plugin) ||
|
|
223
|
+
left.event.localeCompare(right.event) ||
|
|
224
|
+
left.script.localeCompare(right.script));
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=gate-report-agent-hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate-report-agent-hooks.js","sourceRoot":"","sources":["../../src/cli/gate-report-agent-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM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AE,SAAS;YAChB,MAAM,EAAE,8BAA8B;YACtC,OAAO,EACL,uJAAuJ;SAC1J,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAC7B,OAAO,CAAC,GAAG,CAAC,KAAK,EAAC,SAAS,EAAC,EAAE,CAAC,MAAM,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAC1E,CAAC;IACF,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED;;;;;GAKG;AACH,SAAS,kBAAkB,CACzB,IAAuB,EACvB,KAAwB;IAExB,OAAO,CACL,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;QACvC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC;QACrC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CACxC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assemble one gate's row from its cells.
|
|
3
|
+
*
|
|
4
|
+
* Separated from the report's own module because the two do different work:
|
|
5
|
+
* that one reads the world, this one shapes what was read. Everything here is
|
|
6
|
+
* pure — the same inputs give the same row, which is what makes the byte-
|
|
7
|
+
* identical property testable without touching a filesystem.
|
|
8
|
+
* @module cli/gate-report-assemble
|
|
9
|
+
*/
|
|
10
|
+
import { type CellContext } from "./gate-report-cells.js";
|
|
11
|
+
import type { GateRegistryModule, ResolvedGate } from "./gate-report-registry.js";
|
|
12
|
+
import type { GateReportRow } from "./gate-report-types.js";
|
|
13
|
+
/** One moment's resolution, in axis order. */
|
|
14
|
+
export interface ResolvedMoment {
|
|
15
|
+
/** The moment, `:environment` suffix included. */
|
|
16
|
+
readonly moment: string;
|
|
17
|
+
/** `resolveMoment(..., includeOff: true)` keyed by gate id, or null. */
|
|
18
|
+
readonly resolved: Map<string, ResolvedGate> | null;
|
|
19
|
+
/** Why `resolved` is null, when it is. */
|
|
20
|
+
readonly failure: string | null;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Invert the static job table so a gate can name its CI job.
|
|
24
|
+
* @param registry - The shipped registry
|
|
25
|
+
* @returns Gate id -> job id
|
|
26
|
+
*/
|
|
27
|
+
export declare function invertJobTable(registry: GateRegistryModule): Map<string, string>;
|
|
28
|
+
/**
|
|
29
|
+
* Build one gate's row.
|
|
30
|
+
* @param context - Report-wide cell inputs
|
|
31
|
+
* @param moments - Per-moment resolution results, in axis order
|
|
32
|
+
* @param id - Gate id
|
|
33
|
+
* @param jobForGate - Gate id -> `quality.yml` job
|
|
34
|
+
* @returns The row
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildRow(context: CellContext, moments: readonly ResolvedMoment[], id: string, jobForGate: ReadonlyMap<string, string>): GateReportRow;
|
|
37
|
+
//# sourceMappingURL=gate-report-assemble.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate-report-assemble.d.ts","sourceRoot":"","sources":["../../src/cli/gate-report-assemble.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EACV,kBAAkB,EAClB,YAAY,EACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5E,8CAA8C;AAC9C,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,IAAI,CAAC;IACpD,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAkBD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,kBAAkB,GAC3B,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAQrB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACtC,aAAa,CA8Bf"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assemble one gate's row from its cells.
|
|
3
|
+
*
|
|
4
|
+
* Separated from the report's own module because the two do different work:
|
|
5
|
+
* that one reads the world, this one shapes what was read. Everything here is
|
|
6
|
+
* pure — the same inputs give the same row, which is what makes the byte-
|
|
7
|
+
* identical property testable without touching a filesystem.
|
|
8
|
+
* @module cli/gate-report-assemble
|
|
9
|
+
*/
|
|
10
|
+
import { buildCell } from "./gate-report-cells.js";
|
|
11
|
+
/**
|
|
12
|
+
* A gate-level `run` override from the settings file.
|
|
13
|
+
* @param gates - The gates block
|
|
14
|
+
* @param id - Gate id
|
|
15
|
+
* @returns The task, or null
|
|
16
|
+
*/
|
|
17
|
+
function projectLevelTask(gates, id) {
|
|
18
|
+
const gate = gates[id];
|
|
19
|
+
if (typeof gate !== "object" || gate === null)
|
|
20
|
+
return null;
|
|
21
|
+
const run = Reflect.get(gate, "run");
|
|
22
|
+
return typeof run === "string" ? run : null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Invert the static job table so a gate can name its CI job.
|
|
26
|
+
* @param registry - The shipped registry
|
|
27
|
+
* @returns Gate id -> job id
|
|
28
|
+
*/
|
|
29
|
+
export function invertJobTable(registry) {
|
|
30
|
+
// Reversed before the Map is built so that when two jobs name one gate the
|
|
31
|
+
// FIRST in declaration order wins, which is the order the table reads in.
|
|
32
|
+
return new Map(Object.entries(registry.QUALITY_JOB_GATES)
|
|
33
|
+
.map(([job, gate]) => [gate, job])
|
|
34
|
+
.reverse());
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Build one gate's row.
|
|
38
|
+
* @param context - Report-wide cell inputs
|
|
39
|
+
* @param moments - Per-moment resolution results, in axis order
|
|
40
|
+
* @param id - Gate id
|
|
41
|
+
* @param jobForGate - Gate id -> `quality.yml` job
|
|
42
|
+
* @returns The row
|
|
43
|
+
*/
|
|
44
|
+
export function buildRow(context, moments, id, jobForGate) {
|
|
45
|
+
const definition = context.registry.REGISTRY[id];
|
|
46
|
+
const mergeIndex = moments.findIndex(entry => entry.moment === context.mergeMoment);
|
|
47
|
+
const qualityJob = jobForGate.get(id) ?? null;
|
|
48
|
+
const cells = moments.map(moment => buildCell(context, moment, id, qualityJob));
|
|
49
|
+
return {
|
|
50
|
+
id,
|
|
51
|
+
label: definition?.label ?? id,
|
|
52
|
+
summary: definition?.summary ?? "",
|
|
53
|
+
legalMoments: [...(definition?.moments ?? [])].sort((left, right) => left.localeCompare(right)),
|
|
54
|
+
defaultTask: definition?.task ?? null,
|
|
55
|
+
taskAt: { ...definition?.taskAt },
|
|
56
|
+
projectTask: projectLevelTask(context.gates, id),
|
|
57
|
+
mayRewrite: definition?.mayRewrite === true,
|
|
58
|
+
costly: definition?.costly === true,
|
|
59
|
+
interceptor: context.registry.INTERCEPTORS[id] ?? null,
|
|
60
|
+
qualityJob,
|
|
61
|
+
moments: cells,
|
|
62
|
+
merge: context.merge({
|
|
63
|
+
expectedContext: cells[mergeIndex]?.expectedContext ?? null,
|
|
64
|
+
task: cells[mergeIndex]?.task ?? null,
|
|
65
|
+
label: definition?.label ?? id,
|
|
66
|
+
}),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=gate-report-assemble.js.map
|
|
@@ -0,0 +1 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Evidence } 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,CAAC;AACnC,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"gate-report-cells.d.ts","sourceRoot":"","sources":["../../src/cli/gate-report-cells.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;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a,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACvC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACtB,GAAG,OAAO,CAAC,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
|
|
118
|
-
}
|
|
134
|
+
if (active && mode === "run" && missingCommand)
|
|
135
|
+
return "C";
|
|
119
136
|
if (active && executors.some(entry => entry.kind === "gate-runner")) {
|
|
120
|
-
return
|
|
137
|
+
return "A";
|
|
121
138
|
}
|
|
122
139
|
if (!active && executors.some(entry => entry.kind !== "gate-runner")) {
|
|
123
|
-
return
|
|
140
|
+
return "B";
|
|
124
141
|
}
|
|
125
|
-
return
|
|
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:
|
|
236
|
+
facadeReadsDeclaration: facade,
|
|
200
237
|
bucket: legal
|
|
201
|
-
? classifyBucket({
|
|
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;
|
|
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;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAahE,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;AAmDpD,oEAAoE;AACpE,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAEzC;;;;;;GAMG;AACH,SAAS,QAAQ,CACf,KAA8B,EAC9B,EAAU,EACV,MAAc;IAEd,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC;I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