agent-gauntlet 0.1.9 → 0.1.11
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/README.md +1 -1
- package/package.json +4 -2
- package/src/cli-adapters/claude.ts +139 -108
- package/src/cli-adapters/codex.ts +141 -117
- package/src/cli-adapters/cursor.ts +152 -0
- package/src/cli-adapters/gemini.ts +171 -139
- package/src/cli-adapters/github-copilot.ts +153 -0
- package/src/cli-adapters/index.ts +77 -48
- package/src/commands/check.test.ts +24 -20
- package/src/commands/check.ts +65 -59
- package/src/commands/detect.test.ts +38 -32
- package/src/commands/detect.ts +74 -61
- package/src/commands/health.test.ts +67 -53
- package/src/commands/health.ts +167 -145
- package/src/commands/help.test.ts +37 -37
- package/src/commands/help.ts +30 -22
- package/src/commands/index.ts +9 -9
- package/src/commands/init.test.ts +118 -107
- package/src/commands/init.ts +515 -417
- package/src/commands/list.test.ts +87 -70
- package/src/commands/list.ts +28 -24
- package/src/commands/rerun.ts +142 -119
- package/src/commands/review.test.ts +26 -20
- package/src/commands/review.ts +65 -59
- package/src/commands/run.test.ts +22 -20
- package/src/commands/run.ts +64 -58
- package/src/commands/shared.ts +44 -35
- package/src/config/loader.test.ts +112 -90
- package/src/config/loader.ts +132 -123
- package/src/config/schema.ts +49 -47
- package/src/config/types.ts +15 -13
- package/src/config/validator.ts +521 -454
- package/src/core/change-detector.ts +122 -104
- package/src/core/entry-point.test.ts +60 -62
- package/src/core/entry-point.ts +76 -67
- package/src/core/job.ts +69 -59
- package/src/core/runner.ts +261 -221
- package/src/gates/check.ts +78 -69
- package/src/gates/result.ts +7 -6
- package/src/gates/review.test.ts +188 -0
- package/src/gates/review.ts +717 -506
- package/src/index.ts +16 -15
- package/src/output/console.ts +253 -198
- package/src/output/logger.ts +65 -51
- package/src/templates/run_gauntlet.template.md +18 -0
- package/src/utils/diff-parser.ts +64 -62
- package/src/utils/log-parser.ts +227 -206
- package/src/utils/sanitizer.ts +1 -1
|
@@ -1,27 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import {
|
|
2
|
+
afterAll,
|
|
3
|
+
afterEach,
|
|
4
|
+
beforeAll,
|
|
5
|
+
beforeEach,
|
|
6
|
+
describe,
|
|
7
|
+
expect,
|
|
8
|
+
it,
|
|
9
|
+
} from "bun:test";
|
|
10
|
+
import fs from "node:fs/promises";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
import { Command } from "commander";
|
|
13
|
+
import { registerHealthCommand } from "./health.js";
|
|
6
14
|
|
|
7
|
-
const TEST_DIR = path.join(process.cwd(),
|
|
8
|
-
const GAUNTLET_DIR = path.join(TEST_DIR,
|
|
9
|
-
const REVIEWS_DIR = path.join(GAUNTLET_DIR,
|
|
15
|
+
const TEST_DIR = path.join(process.cwd(), `test-health-${Date.now()}`);
|
|
16
|
+
const GAUNTLET_DIR = path.join(TEST_DIR, ".gauntlet");
|
|
17
|
+
const REVIEWS_DIR = path.join(GAUNTLET_DIR, "reviews");
|
|
10
18
|
|
|
11
|
-
describe(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
describe("Health Command", () => {
|
|
20
|
+
let program: Command;
|
|
21
|
+
const originalConsoleLog = console.log;
|
|
22
|
+
const originalCwd = process.cwd();
|
|
23
|
+
let logs: string[];
|
|
16
24
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
beforeAll(async () => {
|
|
26
|
+
// Setup test directory structure
|
|
27
|
+
await fs.mkdir(TEST_DIR, { recursive: true });
|
|
28
|
+
await fs.mkdir(GAUNTLET_DIR, { recursive: true });
|
|
29
|
+
await fs.mkdir(REVIEWS_DIR, { recursive: true });
|
|
22
30
|
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
// Write config.yml
|
|
32
|
+
await fs.writeFile(
|
|
33
|
+
path.join(GAUNTLET_DIR, "config.yml"),
|
|
34
|
+
`
|
|
25
35
|
base_branch: origin/main
|
|
26
36
|
log_dir: .gauntlet_logs
|
|
27
37
|
cli:
|
|
@@ -30,50 +40,54 @@ cli:
|
|
|
30
40
|
check_usage_limit: false
|
|
31
41
|
entry_points:
|
|
32
42
|
- path: .
|
|
33
|
-
|
|
43
|
+
`,
|
|
44
|
+
);
|
|
34
45
|
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
// Write review definition with CLI preference
|
|
47
|
+
await fs.writeFile(
|
|
48
|
+
path.join(REVIEWS_DIR, "security.md"),
|
|
49
|
+
`---
|
|
37
50
|
cli_preference:
|
|
38
51
|
- gemini
|
|
39
52
|
---
|
|
40
53
|
|
|
41
54
|
# Security Review
|
|
42
55
|
Review for security.
|
|
43
|
-
|
|
44
|
-
|
|
56
|
+
`,
|
|
57
|
+
);
|
|
58
|
+
});
|
|
45
59
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
60
|
+
afterAll(async () => {
|
|
61
|
+
await fs.rm(TEST_DIR, { recursive: true, force: true });
|
|
62
|
+
});
|
|
49
63
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
beforeEach(() => {
|
|
65
|
+
program = new Command();
|
|
66
|
+
registerHealthCommand(program);
|
|
67
|
+
logs = [];
|
|
68
|
+
console.log = (...args: unknown[]) => {
|
|
69
|
+
logs.push(args.join(" "));
|
|
70
|
+
};
|
|
71
|
+
process.chdir(TEST_DIR);
|
|
72
|
+
});
|
|
59
73
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
74
|
+
afterEach(() => {
|
|
75
|
+
console.log = originalConsoleLog;
|
|
76
|
+
process.chdir(originalCwd);
|
|
77
|
+
});
|
|
64
78
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
it("should register the health command", () => {
|
|
80
|
+
const healthCmd = program.commands.find((cmd) => cmd.name() === "health");
|
|
81
|
+
expect(healthCmd).toBeDefined();
|
|
82
|
+
expect(healthCmd?.description()).toBe("Check CLI tool availability");
|
|
83
|
+
});
|
|
70
84
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
85
|
+
it("should run health check", async () => {
|
|
86
|
+
const healthCmd = program.commands.find((cmd) => cmd.name() === "health");
|
|
87
|
+
await healthCmd?.parseAsync(["health"]);
|
|
74
88
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
const output = logs.join("\n");
|
|
90
|
+
expect(output).toContain("Config validation:");
|
|
91
|
+
expect(output).toContain("CLI Tool Health Check:");
|
|
92
|
+
});
|
|
79
93
|
});
|
package/src/commands/health.ts
CHANGED
|
@@ -1,148 +1,170 @@
|
|
|
1
|
-
import
|
|
2
|
-
import chalk from
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import type { Command } from "commander";
|
|
4
|
+
import { getAdapter, getAllAdapters } from "../cli-adapters/index.js";
|
|
5
|
+
import { loadConfig } from "../config/loader.js";
|
|
6
|
+
import { validateConfig } from "../config/validator.js";
|
|
7
7
|
|
|
8
8
|
export function registerHealthCommand(program: Command): void {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
9
|
+
program
|
|
10
|
+
.command("health")
|
|
11
|
+
.description("Check CLI tool availability")
|
|
12
|
+
.action(async () => {
|
|
13
|
+
// 1. Config validation
|
|
14
|
+
console.log(chalk.bold("Config validation:"));
|
|
15
|
+
const validationResult = await validateConfig();
|
|
16
|
+
|
|
17
|
+
if (validationResult.filesChecked.length === 0) {
|
|
18
|
+
console.log(chalk.yellow(" No config files found"));
|
|
19
|
+
} else {
|
|
20
|
+
// List all files checked
|
|
21
|
+
for (const file of validationResult.filesChecked) {
|
|
22
|
+
const relativePath = path.relative(process.cwd(), file);
|
|
23
|
+
console.log(chalk.dim(` ${relativePath}`));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Show validation results
|
|
27
|
+
if (validationResult.valid && validationResult.issues.length === 0) {
|
|
28
|
+
console.log(chalk.green(" ✓ All config files are valid"));
|
|
29
|
+
} else {
|
|
30
|
+
// Group issues by file
|
|
31
|
+
const issuesByFile = new Map<
|
|
32
|
+
string,
|
|
33
|
+
typeof validationResult.issues
|
|
34
|
+
>();
|
|
35
|
+
for (const issue of validationResult.issues) {
|
|
36
|
+
const relativeFile = path.relative(process.cwd(), issue.file);
|
|
37
|
+
if (!issuesByFile.has(relativeFile)) {
|
|
38
|
+
issuesByFile.set(relativeFile, []);
|
|
39
|
+
}
|
|
40
|
+
issuesByFile.get(relativeFile)?.push(issue);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Display issues
|
|
44
|
+
for (const [file, issues] of issuesByFile.entries()) {
|
|
45
|
+
for (const issue of issues) {
|
|
46
|
+
const icon =
|
|
47
|
+
issue.severity === "error" ? chalk.red("✗") : chalk.yellow("⚠");
|
|
48
|
+
const fieldInfo = issue.field
|
|
49
|
+
? chalk.dim(` (${issue.field})`)
|
|
50
|
+
: "";
|
|
51
|
+
console.log(` ${icon} ${file}${fieldInfo}`);
|
|
52
|
+
console.log(` ${issue.message}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
console.log();
|
|
59
|
+
|
|
60
|
+
// 2. CLI Tool Health Check
|
|
61
|
+
console.log(chalk.bold("CLI Tool Health Check:"));
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
const config = await loadConfig();
|
|
65
|
+
const checkUsageLimit = config.project.cli.check_usage_limit;
|
|
66
|
+
|
|
67
|
+
// Check for reviews configuration
|
|
68
|
+
const reviewEntries = Object.entries(config.reviews);
|
|
69
|
+
|
|
70
|
+
if (reviewEntries.length === 0) {
|
|
71
|
+
console.log(chalk.yellow(" No CLI tools configured"));
|
|
72
|
+
console.log(
|
|
73
|
+
chalk.dim(
|
|
74
|
+
" No review gates found. Add review gates with cli_preference to check tool availability.",
|
|
75
|
+
),
|
|
76
|
+
);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Collect all unique agent names from review gate cli_preference settings
|
|
81
|
+
const preferredAgents = new Set<string>();
|
|
82
|
+
const reviewsWithEmptyPreference: string[] = [];
|
|
83
|
+
|
|
84
|
+
reviewEntries.forEach(([reviewName, review]) => {
|
|
85
|
+
if (!review.cli_preference || review.cli_preference.length === 0) {
|
|
86
|
+
reviewsWithEmptyPreference.push(reviewName);
|
|
87
|
+
} else {
|
|
88
|
+
review.cli_preference.forEach((agent) => {
|
|
89
|
+
preferredAgents.add(agent);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// Report Empty Preferences (Loader should handle this via default merging, but good to check)
|
|
95
|
+
if (reviewsWithEmptyPreference.length > 0) {
|
|
96
|
+
console.log(chalk.yellow(" ⚠️ Misconfiguration detected:"));
|
|
97
|
+
reviewsWithEmptyPreference.forEach((name) => {
|
|
98
|
+
console.log(
|
|
99
|
+
chalk.yellow(
|
|
100
|
+
` Review gate "${name}" has empty cli_preference`,
|
|
101
|
+
),
|
|
102
|
+
);
|
|
103
|
+
});
|
|
104
|
+
console.log();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// If no agents are configured, show message
|
|
108
|
+
if (preferredAgents.size === 0) {
|
|
109
|
+
console.log(chalk.yellow(" No CLI tools configured"));
|
|
110
|
+
console.log(
|
|
111
|
+
chalk.dim(
|
|
112
|
+
" All review gates have empty cli_preference. Add tools to cli_preference to check availability.",
|
|
113
|
+
),
|
|
114
|
+
);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Check the configured agents
|
|
119
|
+
for (const agentName of Array.from(preferredAgents).sort()) {
|
|
120
|
+
const adapter = getAdapter(agentName);
|
|
121
|
+
if (adapter) {
|
|
122
|
+
const health = await adapter.checkHealth({ checkUsageLimit });
|
|
123
|
+
let statusStr = "";
|
|
124
|
+
|
|
125
|
+
switch (health.status) {
|
|
126
|
+
case "healthy":
|
|
127
|
+
statusStr = chalk.green("Installed");
|
|
128
|
+
break;
|
|
129
|
+
case "missing":
|
|
130
|
+
statusStr = chalk.red("Missing");
|
|
131
|
+
break;
|
|
132
|
+
case "unhealthy":
|
|
133
|
+
statusStr = chalk.red(`${health.message || "Unhealthy"}`);
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
console.log(` ${adapter.name.padEnd(10)} : ${statusStr}`);
|
|
138
|
+
} else {
|
|
139
|
+
console.log(
|
|
140
|
+
` ${agentName.padEnd(10)} : ${chalk.yellow("Unknown")}`,
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
} catch (_error: unknown) {
|
|
145
|
+
// If config can't be loaded, fall back to checking all adapters
|
|
146
|
+
const adapters = getAllAdapters();
|
|
147
|
+
console.log(
|
|
148
|
+
chalk.dim(" (Config not found, checking all supported agents)"),
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
for (const adapter of adapters) {
|
|
152
|
+
const health = await adapter.checkHealth();
|
|
153
|
+
let statusStr = "";
|
|
154
|
+
|
|
155
|
+
switch (health.status) {
|
|
156
|
+
case "healthy":
|
|
157
|
+
statusStr = chalk.green("Installed");
|
|
158
|
+
break;
|
|
159
|
+
case "missing":
|
|
160
|
+
statusStr = chalk.red("Missing");
|
|
161
|
+
break;
|
|
162
|
+
case "unhealthy":
|
|
163
|
+
statusStr = chalk.red(`${health.message || "Unhealthy"}`);
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
console.log(` ${adapter.name.padEnd(10)} : ${statusStr}`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
148
170
|
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Command } from
|
|
3
|
-
import { registerHelpCommand } from
|
|
1
|
+
import { afterEach, beforeEach, describe, expect, it } from "bun:test";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { registerHelpCommand } from "./help.js";
|
|
4
4
|
|
|
5
|
-
describe(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
describe("Help Command", () => {
|
|
6
|
+
let program: Command;
|
|
7
|
+
const originalConsoleLog = console.log;
|
|
8
|
+
let logs: string[];
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
program = new Command();
|
|
12
|
+
registerHelpCommand(program);
|
|
13
|
+
logs = [];
|
|
14
|
+
console.log = (...args: unknown[]) => {
|
|
15
|
+
logs.push(args.join(" "));
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
console.log = originalConsoleLog;
|
|
21
|
+
});
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
it("should register the help command", () => {
|
|
24
|
+
const helpCmd = program.commands.find((cmd) => cmd.name() === "help");
|
|
25
|
+
expect(helpCmd).toBeDefined();
|
|
26
|
+
expect(helpCmd?.description()).toBe("Show help information");
|
|
27
|
+
});
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
it("should output help information when executed", async () => {
|
|
30
|
+
const helpCmd = program.commands.find((cmd) => cmd.name() === "help");
|
|
31
|
+
await helpCmd?.parseAsync(["help"]);
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
const output = logs.join("\n");
|
|
34
|
+
expect(output).toContain("Agent Gauntlet");
|
|
35
|
+
expect(output).toContain("Commands:");
|
|
36
|
+
expect(output).toContain("run");
|
|
37
|
+
expect(output).toContain("check");
|
|
38
|
+
expect(output).toContain("review");
|
|
39
|
+
expect(output).toContain("detect");
|
|
40
|
+
expect(output).toContain("list");
|
|
41
|
+
expect(output).toContain("health");
|
|
42
|
+
expect(output).toContain("init");
|
|
43
|
+
});
|
|
44
44
|
});
|
package/src/commands/help.ts
CHANGED
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import type { Command } from "commander";
|
|
3
3
|
|
|
4
4
|
export function registerHelpCommand(program: Command): void {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
program
|
|
6
|
+
.command("help")
|
|
7
|
+
.description("Show help information")
|
|
8
|
+
.action(() => {
|
|
9
|
+
console.log(chalk.bold("Agent Gauntlet - AI-assisted quality gates\n"));
|
|
10
|
+
console.log(
|
|
11
|
+
"Agent Gauntlet runs quality gates (checks + AI reviews) for only the parts",
|
|
12
|
+
);
|
|
13
|
+
console.log(
|
|
14
|
+
"of your repo that changed, based on a configurable set of entry points.\n",
|
|
15
|
+
);
|
|
16
|
+
console.log(chalk.bold("Commands:\n"));
|
|
17
|
+
console.log(" run Run gates for detected changes");
|
|
18
|
+
console.log(" rerun Rerun gates with previous failure context");
|
|
19
|
+
console.log(" check Run only applicable checks");
|
|
20
|
+
console.log(" review Run only applicable reviews");
|
|
21
|
+
console.log(
|
|
22
|
+
" detect Show what gates would run (without executing them)",
|
|
23
|
+
);
|
|
24
|
+
console.log(" list List configured gates");
|
|
25
|
+
console.log(" health Check CLI tool availability");
|
|
26
|
+
console.log(" init Initialize .gauntlet configuration");
|
|
27
|
+
console.log(" help Show this help message\n");
|
|
28
|
+
console.log(
|
|
29
|
+
"For more information, see: https://github.com/your-repo/agent-gauntlet",
|
|
30
|
+
);
|
|
31
|
+
console.log("Or run: agent-gauntlet <command> --help");
|
|
32
|
+
});
|
|
25
33
|
}
|
package/src/commands/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export { registerListCommand } from
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
1
|
+
export { registerCheckCommand } from "./check.js";
|
|
2
|
+
export { registerDetectCommand } from "./detect.js";
|
|
3
|
+
export { registerHealthCommand } from "./health.js";
|
|
4
|
+
export { registerHelpCommand } from "./help.js";
|
|
5
|
+
export { registerInitCommand } from "./init.js";
|
|
6
|
+
export { registerListCommand } from "./list.js";
|
|
7
|
+
export { registerRerunCommand } from "./rerun.js";
|
|
8
|
+
export { registerReviewCommand } from "./review.js";
|
|
9
|
+
export { registerRunCommand } from "./run.js";
|