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.
Files changed (71) hide show
  1. package/README.md +25 -23
  2. package/dist/index.js +9226 -0
  3. package/dist/index.js.map +65 -0
  4. package/dist/scripts/status.js +280 -0
  5. package/dist/scripts/status.js.map +10 -0
  6. package/package.json +22 -8
  7. package/src/built-in-reviews/code-quality.md +0 -25
  8. package/src/built-in-reviews/index.ts +0 -28
  9. package/src/bun-plugins.d.ts +0 -4
  10. package/src/cli-adapters/claude.ts +0 -327
  11. package/src/cli-adapters/codex.ts +0 -290
  12. package/src/cli-adapters/cursor.ts +0 -128
  13. package/src/cli-adapters/gemini.ts +0 -510
  14. package/src/cli-adapters/github-copilot.ts +0 -141
  15. package/src/cli-adapters/index.ts +0 -250
  16. package/src/cli-adapters/thinking-budget.ts +0 -23
  17. package/src/commands/check.ts +0 -311
  18. package/src/commands/ci/index.ts +0 -15
  19. package/src/commands/ci/init.ts +0 -96
  20. package/src/commands/ci/list-jobs.ts +0 -90
  21. package/src/commands/clean.ts +0 -54
  22. package/src/commands/detect.ts +0 -173
  23. package/src/commands/health.ts +0 -169
  24. package/src/commands/help.ts +0 -34
  25. package/src/commands/index.ts +0 -13
  26. package/src/commands/init.ts +0 -1878
  27. package/src/commands/list.ts +0 -33
  28. package/src/commands/review.ts +0 -311
  29. package/src/commands/run.ts +0 -29
  30. package/src/commands/shared.ts +0 -267
  31. package/src/commands/stop-hook.ts +0 -567
  32. package/src/commands/validate.ts +0 -20
  33. package/src/commands/wait-ci.ts +0 -518
  34. package/src/config/ci-loader.ts +0 -33
  35. package/src/config/ci-schema.ts +0 -28
  36. package/src/config/global.ts +0 -87
  37. package/src/config/loader.ts +0 -301
  38. package/src/config/schema.ts +0 -165
  39. package/src/config/stop-hook-config.ts +0 -130
  40. package/src/config/types.ts +0 -65
  41. package/src/config/validator.ts +0 -592
  42. package/src/core/change-detector.ts +0 -137
  43. package/src/core/diff-stats.ts +0 -442
  44. package/src/core/entry-point.ts +0 -190
  45. package/src/core/job.ts +0 -96
  46. package/src/core/run-executor.ts +0 -621
  47. package/src/core/runner.ts +0 -290
  48. package/src/gates/check.ts +0 -118
  49. package/src/gates/resolve-check-command.ts +0 -21
  50. package/src/gates/result.ts +0 -54
  51. package/src/gates/review.ts +0 -1333
  52. package/src/hooks/adapters/claude-stop-hook.ts +0 -99
  53. package/src/hooks/adapters/cursor-stop-hook.ts +0 -122
  54. package/src/hooks/adapters/types.ts +0 -94
  55. package/src/hooks/stop-hook-handler.ts +0 -748
  56. package/src/index.ts +0 -47
  57. package/src/output/app-logger.ts +0 -214
  58. package/src/output/console-log.ts +0 -168
  59. package/src/output/console.ts +0 -359
  60. package/src/output/logger.ts +0 -126
  61. package/src/output/sinks/console-sink.ts +0 -59
  62. package/src/output/sinks/file-sink.ts +0 -110
  63. package/src/scripts/status.ts +0 -433
  64. package/src/templates/workflow.yml +0 -79
  65. package/src/types/gauntlet-status.ts +0 -79
  66. package/src/utils/debug-log.ts +0 -392
  67. package/src/utils/diff-parser.ts +0 -103
  68. package/src/utils/execution-state.ts +0 -472
  69. package/src/utils/log-parser.ts +0 -696
  70. package/src/utils/sanitizer.ts +0 -3
  71. package/src/utils/session-ref.ts +0 -91
@@ -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
- }