gaunt-sloth 2.0.0-alpha.17 → 2.0.0-alpha.19

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 (35) hide show
  1. package/dist/cli.js +8 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/askCommand.js +20 -5
  4. package/dist/commands/askCommand.js.map +1 -1
  5. package/dist/commands/batchCommand.d.ts +61 -0
  6. package/dist/commands/batchCommand.js +190 -0
  7. package/dist/commands/batchCommand.js.map +1 -0
  8. package/dist/commands/cliOptionParsers.d.ts +12 -0
  9. package/dist/commands/cliOptionParsers.js +18 -0
  10. package/dist/commands/cliOptionParsers.js.map +1 -0
  11. package/dist/commands/evalCommand.d.ts +23 -0
  12. package/dist/commands/evalCommand.js +102 -0
  13. package/dist/commands/evalCommand.js.map +1 -0
  14. package/dist/commands/execCommand.js +2 -2
  15. package/dist/commands/execCommand.js.map +1 -1
  16. package/dist/commands/reviewCommand.js +5 -0
  17. package/dist/commands/reviewCommand.js.map +1 -1
  18. package/dist/commands/workflowCommand.d.ts +19 -0
  19. package/dist/commands/workflowCommand.js +77 -0
  20. package/dist/commands/workflowCommand.js.map +1 -0
  21. package/dist/tui/components/App.js +5 -0
  22. package/dist/tui/components/App.js.map +1 -1
  23. package/dist/tui/components/PromptInput.d.ts +10 -0
  24. package/dist/tui/components/PromptInput.js +27 -1
  25. package/dist/tui/components/PromptInput.js.map +1 -1
  26. package/dist/tui/pasteParser.d.ts +21 -0
  27. package/dist/tui/pasteParser.js +24 -0
  28. package/dist/tui/pasteParser.js.map +1 -0
  29. package/dist/tui/slashCommands.d.ts +39 -0
  30. package/dist/tui/slashCommands.js +49 -0
  31. package/dist/tui/slashCommands.js.map +1 -1
  32. package/dist/tui/tuiSessionModule.js +23 -2
  33. package/dist/tui/tuiSessionModule.js.map +1 -1
  34. package/dist/tui/types.d.ts +17 -0
  35. package/package.json +5 -4
package/dist/cli.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import { Command, Option } from 'commander';
2
2
  import { askCommand } from '#src/commands/askCommand.js';
3
3
  import { execCommand } from '#src/commands/execCommand.js';
4
+ import { batchCommand } from '#src/commands/batchCommand.js';
5
+ import { evalCommand } from '#src/commands/evalCommand.js';
6
+ import { workflowCommand } from '#src/commands/workflowCommand.js';
4
7
  import { initCommand } from '#src/commands/initCommand.js';
5
8
  import { reviewCommand } from '#src/commands/reviewCommand.js';
6
9
  import { prCommand } from '#src/commands/prCommand.js';
@@ -27,7 +30,8 @@ program
27
30
  .option('-w, --write-output-to-file <value>', 'Write output to file. Accepts true/false or a filename. Shortcuts: -wn or -w0 for false.')
28
31
  .option('--tui', 'Force the interactive Ink TUI for chat/code sessions (overrides CI auto-off)')
29
32
  .option('--no-tui', 'Force the plain readline session for chat/code (disable the TUI)')
30
- .addOption(new Option('--nopipe').hideHelp(true));
33
+ .addOption(new Option('--nopipe').hideHelp(true))
34
+ .addOption(new Option('--no-pipe').hideHelp(true));
31
35
  const cliConfigOverrides = {};
32
36
  // Parse global options before binding any commands
33
37
  program.parseOptions(argv);
@@ -66,6 +70,9 @@ reviewCommand(program, cliConfigOverrides);
66
70
  prCommand(program, cliConfigOverrides);
67
71
  askCommand(program, cliConfigOverrides);
68
72
  execCommand(program, cliConfigOverrides);
73
+ batchCommand(program, cliConfigOverrides);
74
+ evalCommand(program, cliConfigOverrides);
75
+ workflowCommand(program, cliConfigOverrides);
69
76
  chatCommand(program, cliConfigOverrides);
70
77
  codeCommand(program, cliConfigOverrides);
71
78
  apiCommand(program, cliConfigOverrides);
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC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C,WAAW,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACzC,WAAW,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACzC,UAAU,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACxC,UAAU,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACxC,aAAa,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AAC3C,mGAAmG;AACnG,gGAAgG;AAChG,cAAc,CAAC,OAAO,CAAC,CAAC;AACxB,eAAe,CAAC,OAAO,CAAC,CAAC;AACzB,oGAAoG;AACpG,2EAA2E;AAC3E,aAAa,CAAC,OAAO,CAAC,CAAC;AAEvB,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { initConfig } from '@gaunt-sloth/core/config.js';
2
2
  import { getAskSystemPrompt } from '#src/commands/commandIntrospection.js';
3
- import { getStringFromStdin } from '@gaunt-sloth/core/utils/systemUtils.js';
4
- import { displayWarning } from '@gaunt-sloth/core/utils/consoleUtils.js';
3
+ import { getStringFromStdin, setExitCode } from '@gaunt-sloth/core/utils/systemUtils.js';
4
+ import { displayError, displayWarning } from '@gaunt-sloth/core/utils/consoleUtils.js';
5
5
  import { wrapContent } from '@gaunt-sloth/core/utils/llmUtils.js';
6
6
  import { readMultipleFilesFromProjectDir } from '@gaunt-sloth/core/utils/fileUtils.js';
7
7
  /**
@@ -49,6 +49,11 @@ export function askCommand(program, commandLineConfigOverrides) {
49
49
  .option('-f, --file [files...]', 'Input files. Content of these files will be added BEFORE the message')
50
50
  .option('--write', 'Let ask act, not just chat: enable full filesystem + dev tools (like exec/code) so it can ' +
51
51
  'read/write files and run commands. Grants write access — use with care.')
52
+ .addHelpText('after', '\n' +
53
+ 'Examples:\n' +
54
+ ' $ gsloth ask "which types of primitives are available in JavaScript?"\n' +
55
+ ' $ gsloth ask "Please explain this code" -f index.js\n' +
56
+ ' $ cat error.log | gsloth ask "What might be causing these errors?"\n')
52
57
  .action(async (message, options) => {
53
58
  const config = applyAskWriteMode(await initConfig(commandLineConfigOverrides), options);
54
59
  const content = [];
@@ -69,9 +74,19 @@ export function askCommand(program, commandLineConfigOverrides) {
69
74
  const { runSingleShot } = await import('@gaunt-sloth/core/runtime/singleShot.js');
70
75
  const { createResolvers } = await import('@gaunt-sloth/agent/resolvers.js');
71
76
  const { resolveAgentFactory } = await import('@gaunt-sloth/agent/core/resolveAgentFactory.js');
72
- await runSingleShot('ASK', getAskSystemPrompt(config), content.join('\n'), config, createResolvers(), 'ask',
73
- // ask defaults to the lean backend; an explicit config.agent.backend overrides it.
74
- resolveAgentFactory(config, 'lean'));
77
+ let ok = false;
78
+ try {
79
+ ({ ok } = await runSingleShot('ASK', getAskSystemPrompt(config), content.join('\n'), config, createResolvers(), 'ask',
80
+ // ask defaults to the lean backend; an explicit config.agent.backend overrides it.
81
+ resolveAgentFactory(config, 'lean')));
82
+ }
83
+ catch (error) {
84
+ displayError(error instanceof Error ? error.message : String(error));
85
+ ok = false;
86
+ }
87
+ if (!ok) {
88
+ setExitCode(1);
89
+ }
75
90
  });
76
91
  }
77
92
  //# sourceMappingURL=askCommand.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"askCommand.js","sourceRoot":"","sources":["../../src/commands/askCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAYvF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,OAA0B;IAC7E,IAAI,CAAC,OAAO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MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACrE,EAAE,GAAG,KAAK,CAAC;QACb,CAAC;QAED,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,WAAW,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { Command } from 'commander';
2
+ import { CommandLineConfigOverrides } from '@gaunt-sloth/core/config.js';
3
+ import type { GthConfig } from '@gaunt-sloth/core/config.js';
4
+ import type { GthCommand } from '@gaunt-sloth/core/core/types.js';
5
+ import type { RunCellFn } from '@gaunt-sloth/batch';
6
+ /** Options for {@link buildProductionRunCell} — the bits that differ between `batch` (exec-mode,
7
+ * script content) and `eval` (ask-mode, a case's user-message prompt); everything else about the
8
+ * adapter (model-resolver cache, resolver cleanup, error handling) is shared. */
9
+ export interface ProductionRunCellOptions {
10
+ /** The `GthCommand` mode forwarded to `runSingleShot` — selects the agent's mode prompt/behavior
11
+ * (`'exec'` for `batch`, `'ask'` for `eval`). */
12
+ command: GthCommand;
13
+ /** Prefix for `runSingleShot`'s `source` naming (`<prefix>-<cell.id>`), used for output/session
14
+ * file naming — `'BATCH'` for `batch`, `'EVAL'` for `eval`. */
15
+ sourcePrefix: string;
16
+ /** `wrapContent` block-prefix label for the cell's content — `'script'` for `batch`'s
17
+ * prompt-executable scripts, `'message'` for `eval`'s case prompts. */
18
+ wrapBlockPrefix: string;
19
+ /** `wrapContent` human-readable prefix paired with {@link wrapBlockPrefix} (e.g.
20
+ * `'prompt-executable script'` / `'user message'`). */
21
+ wrapPrefix: string;
22
+ }
23
+ /**
24
+ * Build the injectable {@link RunCellFn} that adapts the shared single-shot runtime
25
+ * (`runSingleShot`) to one matrix cell. Isolated in its own function so each cell run gets a fresh
26
+ * `createResolvers()` (its own MCP client instance) — matching batch's "N isolated model calls"
27
+ * contract (docs/batch-mechanism-vs-judgment.md) rather than sharing one resolver/client across
28
+ * concurrent cells.
29
+ *
30
+ * Shared between `gth batch` and `gth eval` (BATCH-2): both run N isolated single-shot calls
31
+ * through this exact `runSingleShot` wiring (model-resolver cache, resolver cleanup-on-every-path,
32
+ * error containment), differing only in which agent mode/prompt they run cells through and how the
33
+ * cell's content is framed — see {@link ProductionRunCellOptions}. `gth eval`'s wiring lives in
34
+ * `evalCommand.ts`, which imports this function rather than re-deriving it.
35
+ *
36
+ * batch/eval each write their own structured JSON per cell/case (`writeBatchOutput`/
37
+ * `writeEvalOutput`), so `writeOutputToFile` is forced off for every cell run — the per-cell `.md`
38
+ * report `runSingleShot` would otherwise write is not wanted here.
39
+ */
40
+ export declare function buildProductionRunCell(baseConfig: GthConfig, preamble: string, commandLineConfigOverrides: CommandLineConfigOverrides, options: ProductionRunCellOptions): Promise<RunCellFn>;
41
+ /** Parse `--models a,b,c` into a trimmed, non-empty list; `undefined` when the flag is absent. */
42
+ export declare function parseModelsOption(models: string | undefined): string[] | undefined;
43
+ /** Default output dir when `-o/--output` is omitted: a timestamped dir next to other gth reports. */
44
+ export declare function defaultBatchOutputDir(): string;
45
+ /**
46
+ * Adds the `batch` command to the program.
47
+ *
48
+ * `gth batch <script.md> --over <csv|jsonl> [--models a,b,c] [-j 8] [--retry 2] [-o out/]` — runs a
49
+ * prompt-executable over a matrix (models × content-bound inputs), the way `exec` runs one. See
50
+ * docs/batch-eval-cli-surface.md and docs/batch-mechanism-vs-judgment.md for the design.
51
+ *
52
+ * Exit-code contract (BATCH-1, decisive design point): `gth batch` exits 0 iff the cells *ran* —
53
+ * it never fails because a cell's answer was poor quality (that is `gth eval`'s job, BATCH-2, not
54
+ * this command). Only a harness-level error (a malformed `--over` file, a missing script, etc.)
55
+ * sets a non-zero exit code; a per-cell failure is recorded in that cell's structured JSON output,
56
+ * never reflected in the process exit code.
57
+ *
58
+ * @param program - The commander program
59
+ * @param commandLineConfigOverrides - command line config overrides
60
+ */
61
+ export declare function batchCommand(program: Command, commandLineConfigOverrides: CommandLineConfigOverrides): void;
@@ -0,0 +1,190 @@
1
+ import { initConfig } from '@gaunt-sloth/core/config.js';
2
+ import { getExecSystemPrompt } from '#src/commands/commandIntrospection.js';
3
+ import { parseIntOption } from '#src/commands/cliOptionParsers.js';
4
+ import { displaySuccess, displayWarning } from '@gaunt-sloth/core/utils/consoleUtils.js';
5
+ import { wrapContent } from '@gaunt-sloth/core/utils/llmUtils.js';
6
+ import { fileSafeLocalDate, getGslothFilePath, readFileFromProjectDir, readMultipleFilesFromProjectDir, } from '@gaunt-sloth/core/utils/fileUtils.js';
7
+ /**
8
+ * Build a per-model {@link GthConfig} cache: one genuinely fresh `initConfig()` call (fresh `.llm`
9
+ * instance included) per DISTINCT `--models` value, not one per cell — a 20-cell matrix over 3
10
+ * models must only construct 3 model instances.
11
+ *
12
+ * BATCH-1 fix (CI review finding, critical): the previous approach gave a cell its own model by
13
+ * structurally cloning the shared `GthConfig.llm` instance (`Object.create` +
14
+ * `getOwnPropertyDescriptors`) and setting `.model` on the clone. That never runs the original
15
+ * class's constructor, so it never gets that instance's private (`#field`) slots — any LangChain
16
+ * chat-model class whose methods touch a `#privateField` internally (not just the public `model`
17
+ * field the old code checked for) would throw `TypeError: Cannot read private member from an
18
+ * object whose class did not declare it` the moment such a method ran on the clone. That risk is
19
+ * not provider-specific and cannot be ruled out by inspecting today's installed provider
20
+ * versions. This replaces cloning with construction: each distinct model gets a real
21
+ * `initConfig({ ...overrides, model })` call, which threads the override through
22
+ * `tryJsonConfig` (`packages/core/src/config/loader.ts`) so the provider's own
23
+ * `processJsonConfig()` builds the instance from scratch — the same supported path every other
24
+ * model comes from, correct for any provider.
25
+ *
26
+ * Cached by `Promise<GthConfig>` (not just by resolved value) so concurrent cells requesting the
27
+ * same not-yet-resolved model share one in-flight `initConfig()` call instead of racing to build
28
+ * the model twice.
29
+ */
30
+ function createCellConfigResolver(baseConfig, commandLineConfigOverrides) {
31
+ const configForModel = new Map();
32
+ return (model) => {
33
+ if (!model) {
34
+ return Promise.resolve(baseConfig);
35
+ }
36
+ let cached = configForModel.get(model);
37
+ if (!cached) {
38
+ cached = initConfig({ ...commandLineConfigOverrides, model });
39
+ configForModel.set(model, cached);
40
+ }
41
+ return cached;
42
+ };
43
+ }
44
+ /**
45
+ * Build the injectable {@link RunCellFn} that adapts the shared single-shot runtime
46
+ * (`runSingleShot`) to one matrix cell. Isolated in its own function so each cell run gets a fresh
47
+ * `createResolvers()` (its own MCP client instance) — matching batch's "N isolated model calls"
48
+ * contract (docs/batch-mechanism-vs-judgment.md) rather than sharing one resolver/client across
49
+ * concurrent cells.
50
+ *
51
+ * Shared between `gth batch` and `gth eval` (BATCH-2): both run N isolated single-shot calls
52
+ * through this exact `runSingleShot` wiring (model-resolver cache, resolver cleanup-on-every-path,
53
+ * error containment), differing only in which agent mode/prompt they run cells through and how the
54
+ * cell's content is framed — see {@link ProductionRunCellOptions}. `gth eval`'s wiring lives in
55
+ * `evalCommand.ts`, which imports this function rather than re-deriving it.
56
+ *
57
+ * batch/eval each write their own structured JSON per cell/case (`writeBatchOutput`/
58
+ * `writeEvalOutput`), so `writeOutputToFile` is forced off for every cell run — the per-cell `.md`
59
+ * report `runSingleShot` would otherwise write is not wanted here.
60
+ */
61
+ export async function buildProductionRunCell(baseConfig, preamble, commandLineConfigOverrides, options) {
62
+ const { runSingleShot } = await import('@gaunt-sloth/core/runtime/singleShot.js');
63
+ const { createResolvers } = await import('@gaunt-sloth/agent/resolvers.js');
64
+ const { resolveAgentFactory } = await import('@gaunt-sloth/agent/core/resolveAgentFactory.js');
65
+ const resolveCellModelConfig = createCellConfigResolver(baseConfig, commandLineConfigOverrides);
66
+ return async (cell) => {
67
+ const modelConfig = await resolveCellModelConfig(cell.model);
68
+ const cellConfig = {
69
+ ...modelConfig,
70
+ canInterruptInferenceWithEsc: false,
71
+ writeOutputToFile: false,
72
+ };
73
+ const content = wrapContent(cell.content, options.wrapBlockPrefix, options.wrapPrefix, true);
74
+ // BATCH-1 fix (CI review finding, critical): keep the resolvers reference and clean it up
75
+ // unconditionally (success or failure) — the previous code passed `createResolvers()` inline
76
+ // into `runSingleShot(...)` and discarded the reference, so `cleanupTools()` (which tears
77
+ // down any MCP-server-backed tools/processes the cell's resolution opened) was never called —
78
+ // an orphaned-process leak, one per cell.
79
+ const resolvers = createResolvers();
80
+ try {
81
+ const { ok, answer, tokensInput, tokensOutput, tools } = await runSingleShot(`${options.sourcePrefix}-${cell.id}`, preamble, content, cellConfig, resolvers, options.command,
82
+ // batch/eval default to the lean backend, same as exec/ask; an explicit
83
+ // config.agent.backend wins.
84
+ resolveAgentFactory(cellConfig, 'lean'));
85
+ return { ok, answer, tokensInput, tokensOutput, tools };
86
+ }
87
+ catch (error) {
88
+ // runSingleShot itself is documented to never throw for a normal LLM/tool failure (it
89
+ // returns false instead); this guards the rare case of a genuinely unexpected exception so
90
+ // one bad cell can never take the whole batch run down.
91
+ return { ok: false, error: error instanceof Error ? error.message : String(error) };
92
+ }
93
+ finally {
94
+ try {
95
+ await resolvers.cleanupTools?.();
96
+ }
97
+ catch (cleanupError) {
98
+ // A cleanup failure must never mask or override the cell's real result (already returned
99
+ // above) — surface it as a warning only.
100
+ displayWarning(`Failed to clean up tools for cell ${cell.id}: ` +
101
+ `${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}`);
102
+ }
103
+ }
104
+ };
105
+ }
106
+ /** Parse `--models a,b,c` into a trimmed, non-empty list; `undefined` when the flag is absent. */
107
+ export function parseModelsOption(models) {
108
+ if (!models)
109
+ return undefined;
110
+ const list = models
111
+ .split(',')
112
+ .map((m) => m.trim())
113
+ .filter((m) => m.length > 0);
114
+ return list.length > 0 ? list : undefined;
115
+ }
116
+ /** Default output dir when `-o/--output` is omitted: a timestamped dir next to other gth reports. */
117
+ export function defaultBatchOutputDir() {
118
+ return getGslothFilePath(`gth_${fileSafeLocalDate()}_BATCH`);
119
+ }
120
+ /**
121
+ * Adds the `batch` command to the program.
122
+ *
123
+ * `gth batch <script.md> --over <csv|jsonl> [--models a,b,c] [-j 8] [--retry 2] [-o out/]` — runs a
124
+ * prompt-executable over a matrix (models × content-bound inputs), the way `exec` runs one. See
125
+ * docs/batch-eval-cli-surface.md and docs/batch-mechanism-vs-judgment.md for the design.
126
+ *
127
+ * Exit-code contract (BATCH-1, decisive design point): `gth batch` exits 0 iff the cells *ran* —
128
+ * it never fails because a cell's answer was poor quality (that is `gth eval`'s job, BATCH-2, not
129
+ * this command). Only a harness-level error (a malformed `--over` file, a missing script, etc.)
130
+ * sets a non-zero exit code; a per-cell failure is recorded in that cell's structured JSON output,
131
+ * never reflected in the process exit code.
132
+ *
133
+ * @param program - The commander program
134
+ * @param commandLineConfigOverrides - command line config overrides
135
+ */
136
+ export function batchCommand(program, commandLineConfigOverrides) {
137
+ program
138
+ .command('batch')
139
+ .description('Run a markdown prompt-executable over a matrix of models and/or content-bound inputs ' +
140
+ '("xargs for prompts"). Exits 0 iff the cells ran — a poor answer is not a harness failure.')
141
+ .argument('<script>', 'Path to the .md prompt-executable script to run over the matrix')
142
+ .option('--over <path>', 'CSV or JSONL file whose rows/records bind into the script content via {{field}} ' +
143
+ 'placeholders — one matrix cell per row (content binding only; a glob-of-files path ' +
144
+ 'binding is not supported by this command)')
145
+ .option('--models <list>', 'Comma-separated list of models to fan out over (omit to use the configured model, no fan-out)')
146
+ .option('-j, --concurrency <n>', 'Max in-flight cells', parseIntOption)
147
+ .option('--retry <n>', 'Retry a failed cell up to n times (default: 0, no retry)', parseIntOption)
148
+ .option('-o, --output <dir>', 'Directory to write structured per-cell JSON + results.json summary to ' +
149
+ '(default: a timestamped dir alongside other gth reports)')
150
+ .action(async (script, options) => {
151
+ const config = await initConfig(commandLineConfigOverrides);
152
+ // Specific `.js` subpaths (not the bare package root) — matches the house convention
153
+ // (`@gaunt-sloth/core/runtime/singleShot.js`, `@gaunt-sloth/review/utils/fileUtils.js`, …)
154
+ // that vitest's workspace-import resolver (vitest.config.ts) recognizes and resolves
155
+ // straight to source, so specs exercise live `packages/batch/src` rather than a `dist/`
156
+ // build that could go stale between an edit and a test run.
157
+ const { buildMatrix } = await import('@gaunt-sloth/batch/matrix.js');
158
+ const { parseOverFile } = await import('@gaunt-sloth/batch/parseOver.js');
159
+ const { runBatchMatrix } = await import('@gaunt-sloth/batch/BatchRunner.js');
160
+ const { writeBatchOutput } = await import('@gaunt-sloth/batch/output.js');
161
+ const scriptContent = readMultipleFilesFromProjectDir([script]);
162
+ const models = parseModelsOption(options.models);
163
+ const rows = options.over
164
+ ? parseOverFile(options.over, readFileFromProjectDir(options.over))
165
+ : undefined;
166
+ const cells = buildMatrix(scriptContent, models, rows);
167
+ const preamble = getExecSystemPrompt(config);
168
+ const runCell = await buildProductionRunCell(config, preamble, commandLineConfigOverrides, {
169
+ command: 'exec',
170
+ sourcePrefix: 'BATCH',
171
+ wrapBlockPrefix: 'script',
172
+ wrapPrefix: 'prompt-executable script',
173
+ });
174
+ const results = await runBatchMatrix(cells, {
175
+ runCell,
176
+ concurrency: options.concurrency,
177
+ retry: options.retry,
178
+ });
179
+ const outputDir = options.output ?? defaultBatchOutputDir();
180
+ const summary = writeBatchOutput(outputDir, results);
181
+ displaySuccess(`Batch complete: ${summary.passed}/${summary.total} cell(s) passed. ` +
182
+ `Results written to ${outputDir}`);
183
+ if (summary.failed > 0) {
184
+ // Visible, but deliberately does NOT set a non-zero exit code — see the exit-code
185
+ // contract above. A poor/failed cell is `eval`'s business, not batch's.
186
+ displayWarning(`${summary.failed} cell(s) failed — see ${outputDir}/results.json for details.`);
187
+ }
188
+ });
189
+ }
190
+ //# sourceMappingURL=batchCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batchCommand.js","sourceRoot":"","sources":["../../src/commands/batchCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,cAA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;SACvC,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,KAAK,EAAE;YAC1C,OAAO;YACP,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,IAAI,qBAAqB,EAAE,CAAC;QAC5D,MAAM,OAAO,GAAG,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAErD,cAAc,CACZ,mBAAmB,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,KAAK,mBAAmB;YACnE,sBAAsB,SAAS,EAAE,CACpC,CAAC;QACF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,kFAAkF;YAClF,wEAAwE;YACxE,cAAc,CACZ,GAAG,OAAO,CAAC,MAAM,yBAAyB,SAAS,4BAA4B,CAChF,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Strict Commander option parser for a non-negative integer CLI flag (`-j/--concurrency`,
3
+ * `--retry`, …). Shared by `batchCommand.ts` and `evalCommand.ts`.
4
+ *
5
+ * Unlike a bare `parseInt(value, 10)`, this rejects trailing-garbage input such as `"10abc"` —
6
+ * `parseInt` stops at the first non-digit and returns `10`, and `Number.isFinite` on that result
7
+ * is still `true`, so the garbage silently passed through undetected. A regex pre-check (only
8
+ * ASCII digits, at least one) rejects that case, plus other loose inputs a bare `Number()`
9
+ * coercion would let through (`""` → `0`, `"1e3"` → `1000`, `" 5 "` → `5`, `"0x10"` → `16`) or
10
+ * that don't make sense for a concurrency/retry count (negative, fractional).
11
+ */
12
+ export declare function parseIntOption(value: string): number;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Strict Commander option parser for a non-negative integer CLI flag (`-j/--concurrency`,
3
+ * `--retry`, …). Shared by `batchCommand.ts` and `evalCommand.ts`.
4
+ *
5
+ * Unlike a bare `parseInt(value, 10)`, this rejects trailing-garbage input such as `"10abc"` —
6
+ * `parseInt` stops at the first non-digit and returns `10`, and `Number.isFinite` on that result
7
+ * is still `true`, so the garbage silently passed through undetected. A regex pre-check (only
8
+ * ASCII digits, at least one) rejects that case, plus other loose inputs a bare `Number()`
9
+ * coercion would let through (`""` → `0`, `"1e3"` → `1000`, `" 5 "` → `5`, `"0x10"` → `16`) or
10
+ * that don't make sense for a concurrency/retry count (negative, fractional).
11
+ */
12
+ export function parseIntOption(value) {
13
+ if (!/^\d+$/.test(value)) {
14
+ throw new Error(`Expected an integer, got "${value}"`);
15
+ }
16
+ return parseInt(value, 10);
17
+ }
18
+ //# sourceMappingURL=cliOptionParsers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cliOptionParsers.js","sourceRoot":"","sources":["../../src/commands/cliOptionParsers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,GAAG,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { Command } from 'commander';
2
+ import { CommandLineConfigOverrides } from '@gaunt-sloth/core/config.js';
3
+ /** Default output dir when `-o/--output` is omitted: a timestamped dir next to other gth reports —
4
+ * same convention as `defaultBatchOutputDir` in `batchCommand.ts`, `_EVAL` suffix instead. */
5
+ export declare function defaultEvalOutputDir(): string;
6
+ /**
7
+ * Adds the `eval` command to the program.
8
+ *
9
+ * `gth eval <suite.yaml> [-j 8] [-o out/]` — grades a suite of cases (deterministic checks and/or
10
+ * an LLM judge) against the SUT agent, the way `review` grades a diff. See
11
+ * docs/batch-eval-cli-surface.md and docs/batch-eval-user-requirements.md for the design; this
12
+ * command implements the single-`prompt`, `gth-agent`-target, `config.llm`-as-judge subset — see
13
+ * the BATCH-2 Task 2 brief's "Not in scope" list for what's deliberately deferred.
14
+ *
15
+ * Exit-code contract (decisive design point, mirrors `review`): `gth eval` exits **0 iff every
16
+ * case passed** — unlike `batch`, which exits 0 regardless of per-cell quality. A suite failure
17
+ * and a harness-level error (a malformed suite file, etc.) are not distinguished in the exit code;
18
+ * the whole contract is "did it pass".
19
+ *
20
+ * @param program - The commander program
21
+ * @param commandLineConfigOverrides - command line config overrides
22
+ */
23
+ export declare function evalCommand(program: Command, commandLineConfigOverrides: CommandLineConfigOverrides): void;
@@ -0,0 +1,102 @@
1
+ import { initConfig } from '@gaunt-sloth/core/config.js';
2
+ import { getAskSystemPrompt } from '#src/commands/commandIntrospection.js';
3
+ import { buildProductionRunCell } from '#src/commands/batchCommand.js';
4
+ import { parseIntOption } from '#src/commands/cliOptionParsers.js';
5
+ import { display, displaySuccess, displayWarning } from '@gaunt-sloth/core/utils/consoleUtils.js';
6
+ import { setExitCode } from '@gaunt-sloth/core/utils/systemUtils.js';
7
+ import { fileSafeLocalDate, getGslothFilePath, readFileFromProjectDir, } from '@gaunt-sloth/core/utils/fileUtils.js';
8
+ /** Default output dir when `-o/--output` is omitted: a timestamped dir next to other gth reports —
9
+ * same convention as `defaultBatchOutputDir` in `batchCommand.ts`, `_EVAL` suffix instead. */
10
+ export function defaultEvalOutputDir() {
11
+ return getGslothFilePath(`gth_${fileSafeLocalDate()}_EVAL`);
12
+ }
13
+ /**
14
+ * Build the production {@link JudgeFn}: grades one case's answer with `judgeEvalCase` against
15
+ * `config.llm` — the SAME model config as the SUT. Per the BATCH-2 Task 2 brief, a separate
16
+ * `--judge <profile>` model is out of scope for this task (identity-matrix/pluggable-target work);
17
+ * this is a known, real simplification for this first slice.
18
+ */
19
+ function buildProductionJudge(config) {
20
+ return async (answer, rubric) => {
21
+ const { judgeEvalCase } = await import('@gaunt-sloth/batch/judge.js');
22
+ return judgeEvalCase(answer, rubric, config.llm);
23
+ };
24
+ }
25
+ /** Print the human-readable, `review`-flavored summary: one PASS/FAIL line per case (failures
26
+ * carry their reasons), then a suite-total line — doesn't replicate `review`'s exact `REVIEW
27
+ * RATING` block format, just its spirit (a scannable verdict, not a wall of JSON). */
28
+ function printSummary(summary, outputDir) {
29
+ for (const caseResult of summary.cases) {
30
+ if (caseResult.verdict === 'PASS') {
31
+ display(`PASS ${caseResult.id}`);
32
+ }
33
+ else {
34
+ displayWarning(`FAIL ${caseResult.id} — ${caseResult.reasons.join('; ') || 'no reason recorded'}`);
35
+ }
36
+ }
37
+ const verdictLine = `EVAL RESULT: ${summary.passed}/${summary.total} case(s) passed`;
38
+ if (summary.failed === 0) {
39
+ displaySuccess(`${verdictLine}. Results written to ${outputDir}`);
40
+ }
41
+ else {
42
+ displayWarning(`${verdictLine}, ${summary.failed} failed. Results written to ${outputDir}`);
43
+ }
44
+ }
45
+ /**
46
+ * Adds the `eval` command to the program.
47
+ *
48
+ * `gth eval <suite.yaml> [-j 8] [-o out/]` — grades a suite of cases (deterministic checks and/or
49
+ * an LLM judge) against the SUT agent, the way `review` grades a diff. See
50
+ * docs/batch-eval-cli-surface.md and docs/batch-eval-user-requirements.md for the design; this
51
+ * command implements the single-`prompt`, `gth-agent`-target, `config.llm`-as-judge subset — see
52
+ * the BATCH-2 Task 2 brief's "Not in scope" list for what's deliberately deferred.
53
+ *
54
+ * Exit-code contract (decisive design point, mirrors `review`): `gth eval` exits **0 iff every
55
+ * case passed** — unlike `batch`, which exits 0 regardless of per-cell quality. A suite failure
56
+ * and a harness-level error (a malformed suite file, etc.) are not distinguished in the exit code;
57
+ * the whole contract is "did it pass".
58
+ *
59
+ * @param program - The commander program
60
+ * @param commandLineConfigOverrides - command line config overrides
61
+ */
62
+ export function evalCommand(program, commandLineConfigOverrides) {
63
+ program
64
+ .command('eval')
65
+ .description('Grade a suite of cases against the SUT agent with deterministic checks and/or an LLM ' +
66
+ 'judge ("pytest for prompts"). Exits 0 iff every case passed.')
67
+ .argument('<suite>', 'Path to the eval suite YAML file')
68
+ .option('-j, --concurrency <n>', 'Max in-flight cases', parseIntOption)
69
+ .option('-o, --output <dir>', 'Directory to write structured per-case JSON + results.json summary to ' +
70
+ '(default: a timestamped dir alongside other gth reports)')
71
+ .action(async (suitePath, options) => {
72
+ const config = await initConfig(commandLineConfigOverrides);
73
+ // Specific `.js` subpaths (not the bare package root), matching batchCommand.ts's
74
+ // convention — vitest's workspace-import resolver recognizes these and resolves straight to
75
+ // source, so specs exercise live `packages/batch/src` rather than a `dist/` build.
76
+ const { parseEvalSuite } = await import('@gaunt-sloth/batch/evalSuite.js');
77
+ const { runEvalSuite } = await import('@gaunt-sloth/batch/evalRunner.js');
78
+ const { writeEvalOutput } = await import('@gaunt-sloth/batch/evalOutput.js');
79
+ const suiteText = readFileFromProjectDir(suitePath);
80
+ const suite = parseEvalSuite(suiteText, suitePath);
81
+ const preamble = getAskSystemPrompt(config);
82
+ const runCell = await buildProductionRunCell(config, preamble, commandLineConfigOverrides, {
83
+ command: 'ask',
84
+ sourcePrefix: 'EVAL',
85
+ wrapBlockPrefix: 'message',
86
+ wrapPrefix: 'user message',
87
+ });
88
+ const judge = buildProductionJudge(config);
89
+ const summary = await runEvalSuite(suite, {
90
+ runCell,
91
+ judge,
92
+ concurrency: options.concurrency,
93
+ });
94
+ const outputDir = options.output ?? defaultEvalOutputDir();
95
+ writeEvalOutput(outputDir, summary);
96
+ printSummary(summary, outputDir);
97
+ if (summary.failed > 0) {
98
+ setExitCode(1);
99
+ }
100
+ });
101
+ }
102
+ //# sourceMappingURL=evalCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evalCommand.js","sourceRoot":"","sources":["../../src/commands/evalCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAA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,KAAK;YACd,YAAY,EAAE,MAAM;YACpB,eAAe,EAAE,SAAS;YAC1B,UAAU,EAAE,cAAc;SAC3B,CAAC,CAAC;QACH,MAAM,KAAK,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;QAE3C,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,KAAK,EAAE;YACxC,OAAO;YACP,KAAK;YACL,WAAW,EAAE,OAAO,CAAC,WAAW;SACjC,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,IAAI,oBAAoB,EAAE,CAAC;QAC3D,eAAe,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAEpC,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAEjC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,WAAW,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -97,9 +97,9 @@ export function execCommand(program, commandLineConfigOverrides) {
97
97
  const { resolveAgentFactory } = await import('@gaunt-sloth/agent/core/resolveAgentFactory.js');
98
98
  let ok = false;
99
99
  try {
100
- ok = await runSingleShot('EXEC', getExecSystemPrompt(execConfig), content.join('\n'), execConfig, createResolvers(), 'exec',
100
+ ({ ok } = await runSingleShot('EXEC', getExecSystemPrompt(execConfig), content.join('\n'), execConfig, createResolvers(), 'exec',
101
101
  // exec defaults to the lean backend; an explicit config.agent.backend overrides it.
102
- resolveAgentFactory(execConfig, 'lean'));
102
+ resolveAgentFactory(execConfig, 'lean')));
103
103
  }
104
104
  catch (error) {
105
105
  displayError(error instanceof Error ? error.message : String(error));
@@ -1 +1 @@
1
- {"version":3,"file":"execCommand.js","sourceRoot":"","sources":["../../src/commands/execCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAErF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,O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AM,EACN,mBAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAClB,UAAU,EACV,eAAe,EAAE,EACjB,MAAM;YACN,oFAAoF;YACpF,mBAAmB,CAAC,UAAU,EAAE,MAAM,CAAC,CACxC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,YAAY,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACrE,EAAE,GAAG,KAAK,CAAC;QACb,CAAC;QAED,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,WAAW,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -17,6 +17,11 @@ export function reviewCommand(program, cliConfigOverrides) {
17
17
  .addOption(new Option('-p, --requirements-source <requirementSource>', 'Requirement source for this review.').choices(Object.keys(REQUIREMENTS_SOURCES)))
18
18
  .addOption(new Option('--content-source <contentSource>', 'Content source').choices(Object.keys(CONTENT_SOURCES)))
19
19
  .option('-m, --message <message>', 'Extra message to provide just before the content')
20
+ .addHelpText('after', '\n' +
21
+ 'Examples:\n' +
22
+ ' $ git --no-pager diff | gsloth review\n' +
23
+ ' $ gsloth review -r requirements.md\n' +
24
+ ' $ git diff | gsloth review -m "Please focus on security implications"\n')
20
25
  .action(async (contentId, options) => {
21
26
  const { initConfig } = await import('@gaunt-sloth/core/config.js');
22
27
  const config = await initConfig(cliConfigOverrides); // Initialize and get config
@@ -1 +1 @@
1
- {"version":3,"file":"reviewCommand.js","sourceRoot":"","sources":["../../src/commands/reviewCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,qBAAqB,EACrB,yBAAy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