agent-gauntlet 0.10.0 → 0.11.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/README.md +25 -23
- package/dist/index.js +9226 -0
- package/dist/index.js.map +65 -0
- package/dist/scripts/status.js +280 -0
- package/dist/scripts/status.js.map +10 -0
- package/package.json +22 -8
- package/src/built-in-reviews/code-quality.md +0 -25
- package/src/built-in-reviews/index.ts +0 -28
- package/src/bun-plugins.d.ts +0 -4
- package/src/cli-adapters/claude.ts +0 -327
- package/src/cli-adapters/codex.ts +0 -290
- package/src/cli-adapters/cursor.ts +0 -128
- package/src/cli-adapters/gemini.ts +0 -510
- package/src/cli-adapters/github-copilot.ts +0 -141
- package/src/cli-adapters/index.ts +0 -250
- package/src/cli-adapters/thinking-budget.ts +0 -23
- package/src/commands/check.ts +0 -311
- package/src/commands/ci/index.ts +0 -15
- package/src/commands/ci/init.ts +0 -96
- package/src/commands/ci/list-jobs.ts +0 -90
- package/src/commands/clean.ts +0 -54
- package/src/commands/detect.ts +0 -173
- package/src/commands/health.ts +0 -169
- package/src/commands/help.ts +0 -34
- package/src/commands/index.ts +0 -13
- package/src/commands/init.ts +0 -1878
- package/src/commands/list.ts +0 -33
- package/src/commands/review.ts +0 -311
- package/src/commands/run.ts +0 -29
- package/src/commands/shared.ts +0 -267
- package/src/commands/stop-hook.ts +0 -567
- package/src/commands/validate.ts +0 -20
- package/src/commands/wait-ci.ts +0 -518
- package/src/config/ci-loader.ts +0 -33
- package/src/config/ci-schema.ts +0 -28
- package/src/config/global.ts +0 -87
- package/src/config/loader.ts +0 -301
- package/src/config/schema.ts +0 -165
- package/src/config/stop-hook-config.ts +0 -130
- package/src/config/types.ts +0 -65
- package/src/config/validator.ts +0 -592
- package/src/core/change-detector.ts +0 -137
- package/src/core/diff-stats.ts +0 -442
- package/src/core/entry-point.ts +0 -190
- package/src/core/job.ts +0 -96
- package/src/core/run-executor.ts +0 -621
- package/src/core/runner.ts +0 -290
- package/src/gates/check.ts +0 -118
- package/src/gates/resolve-check-command.ts +0 -21
- package/src/gates/result.ts +0 -54
- package/src/gates/review.ts +0 -1333
- package/src/hooks/adapters/claude-stop-hook.ts +0 -99
- package/src/hooks/adapters/cursor-stop-hook.ts +0 -122
- package/src/hooks/adapters/types.ts +0 -94
- package/src/hooks/stop-hook-handler.ts +0 -748
- package/src/index.ts +0 -47
- package/src/output/app-logger.ts +0 -214
- package/src/output/console-log.ts +0 -168
- package/src/output/console.ts +0 -359
- package/src/output/logger.ts +0 -126
- package/src/output/sinks/console-sink.ts +0 -59
- package/src/output/sinks/file-sink.ts +0 -110
- package/src/scripts/status.ts +0 -433
- package/src/templates/workflow.yml +0 -79
- package/src/types/gauntlet-status.ts +0 -79
- package/src/utils/debug-log.ts +0 -392
- package/src/utils/diff-parser.ts +0 -103
- package/src/utils/execution-state.ts +0 -472
- package/src/utils/log-parser.ts +0 -696
- package/src/utils/sanitizer.ts +0 -3
- package/src/utils/session-ref.ts +0 -91
package/src/utils/session-ref.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated This module is deprecated.
|
|
3
|
-
* Session reference is now stored in .execution_state as working_tree_ref.
|
|
4
|
-
* See src/utils/execution-state.ts for the new implementation.
|
|
5
|
-
* This file is kept for backward compatibility cleanup only.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { exec } from "node:child_process";
|
|
9
|
-
import fs from "node:fs/promises";
|
|
10
|
-
import path from "node:path";
|
|
11
|
-
import { promisify } from "node:util";
|
|
12
|
-
import { getCategoryLogger } from "../output/app-logger.js";
|
|
13
|
-
|
|
14
|
-
const log = getCategoryLogger("session-ref");
|
|
15
|
-
|
|
16
|
-
const SESSION_REF_FILENAME = ".session_ref";
|
|
17
|
-
|
|
18
|
-
// Exported for testing - allows injection of mock exec
|
|
19
|
-
export let execFn: (
|
|
20
|
-
cmd: string,
|
|
21
|
-
) => Promise<{ stdout: string; stderr: string }> = promisify(exec);
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Set the exec function (for testing)
|
|
25
|
-
*/
|
|
26
|
-
export function setExecFn(
|
|
27
|
-
fn: (cmd: string) => Promise<{ stdout: string; stderr: string }>,
|
|
28
|
-
): void {
|
|
29
|
-
execFn = fn;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Reset the exec function to the real implementation
|
|
34
|
-
*/
|
|
35
|
-
export function resetExecFn(): void {
|
|
36
|
-
execFn = promisify(exec);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Captures the current git state (working tree) as a commit SHA
|
|
41
|
-
* and writes it to the log directory.
|
|
42
|
-
* Uses `git stash create --include-untracked` to capture the state without modifying it.
|
|
43
|
-
*/
|
|
44
|
-
export async function writeSessionRef(logDir: string): Promise<void> {
|
|
45
|
-
try {
|
|
46
|
-
// Create a stash of the current state (including untracked files)
|
|
47
|
-
// This returns a commit SHA but doesn't modify the working tree
|
|
48
|
-
const { stdout } = await execFn("git stash create --include-untracked");
|
|
49
|
-
let sha = stdout.trim();
|
|
50
|
-
|
|
51
|
-
if (!sha) {
|
|
52
|
-
// If no changes to stash (clean working tree), use HEAD
|
|
53
|
-
const { stdout: headSha } = await execFn("git rev-parse HEAD");
|
|
54
|
-
sha = headSha.trim();
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Ensure log directory exists
|
|
58
|
-
await fs.mkdir(logDir, { recursive: true });
|
|
59
|
-
await fs.writeFile(path.join(logDir, SESSION_REF_FILENAME), sha);
|
|
60
|
-
} catch (error) {
|
|
61
|
-
log.warn(
|
|
62
|
-
`Failed to create session reference: ${error instanceof Error ? error.message : String(error)}`,
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Reads the stored session reference SHA from the log directory.
|
|
69
|
-
* Returns null if the file doesn't exist.
|
|
70
|
-
*/
|
|
71
|
-
export async function readSessionRef(logDir: string): Promise<string | null> {
|
|
72
|
-
try {
|
|
73
|
-
const refPath = path.join(logDir, SESSION_REF_FILENAME);
|
|
74
|
-
const content = await fs.readFile(refPath, "utf-8");
|
|
75
|
-
return content.trim();
|
|
76
|
-
} catch {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Removes the session reference file from the log directory.
|
|
83
|
-
*/
|
|
84
|
-
export async function clearSessionRef(logDir: string): Promise<void> {
|
|
85
|
-
try {
|
|
86
|
-
const refPath = path.join(logDir, SESSION_REF_FILENAME);
|
|
87
|
-
await fs.rm(refPath, { force: true });
|
|
88
|
-
} catch {
|
|
89
|
-
// Ignore errors
|
|
90
|
-
}
|
|
91
|
-
}
|