@gaunt-sloth/review 2.0.0-beta.1 → 2.0.0-beta.10

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/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
- Copyright 2025-present Andrew Kondratev
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
1
+ Copyright 2025-present Andrew Kondratev
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
7
  THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from '@gaunt-sloth/core/config.js';
2
+ export * from '#src/utils/diffPaths.js';
2
3
  export * from '#src/modules/reviewModule.js';
3
4
  export * from '#src/commands/commandUtils.js';
4
5
  export * from '#src/tools/ghReadFileTool.js';
package/dist/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  export * from '@gaunt-sloth/core/config.js';
2
+ // CFG-70 — the diff path extractor lives here rather than in core (it is diff-specific), so unlike
3
+ // the selector it does not arrive through the core config barrel above and needs its own line.
4
+ export * from '#src/utils/diffPaths.js';
2
5
  export * from '#src/modules/reviewModule.js';
3
6
  export * from '#src/commands/commandUtils.js';
4
7
  export * from '#src/tools/ghReadFileTool.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,mGAAmG;AACnG,+FAA+F;AAC/F,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC"}
@@ -34,5 +34,15 @@ export type ReviewRateMiddlewareSettings = RatingConfig & {
34
34
  name?: 'review-rate';
35
35
  };
36
36
  export declare function normalizeRatingConfig(config: RatingConfig | undefined): NormalizedRatingConfig;
37
+ /**
38
+ * GS2-105 — default wall-clock budget for the one rating call, in milliseconds.
39
+ *
40
+ * A healthy rating call against a local `gemma4:12b` was measured at ~50 s; a runaway at ~485 s.
41
+ * 120 s sits above the former with headroom and well below the latter, and below the integration
42
+ * suite's own 300 s per-test ceiling — which matters, because a budget above that ceiling would let
43
+ * the harness give up first and leave the generation running, which is the behaviour this replaces.
44
+ * Override per command with `commands.<review|pr>.rating.timeoutMs`.
45
+ */
46
+ export declare const DEFAULT_REVIEW_RATE_TIMEOUT_MS = 120000;
37
47
  export declare function createReviewRateMiddleware(settings: ReviewRateMiddlewareSettings, gthConfig: GthConfig): Promise<AgentMiddleware>;
38
48
  export {};
@@ -7,11 +7,11 @@
7
7
  */
8
8
  import { HumanMessage } from '@langchain/core/messages';
9
9
  import { tool } from '@langchain/core/tools';
10
- import { createAgent, createMiddleware } from 'langchain';
10
+ import { createMiddleware } from 'langchain';
11
11
  import * as z from 'zod';
12
12
  import { setArtifact, deleteArtifact, getArtifact } from '@gaunt-sloth/core/state/artifactStore.js';
13
13
  import { debugLog, debugLogError } from '@gaunt-sloth/core/utils/debugUtils.js';
14
- import { displayWarning } from '@gaunt-sloth/core/utils/consoleUtils.js';
14
+ import { displayInfo, displayWarning } from '@gaunt-sloth/core/utils/consoleUtils.js';
15
15
  import { getNewRunnableConfig } from '@gaunt-sloth/core/utils/llmUtils.js';
16
16
  /**
17
17
  * Schema describing the result of the review rating step.
@@ -36,6 +36,16 @@ export function normalizeRatingConfig(config) {
36
36
  };
37
37
  }
38
38
  const REVIEW_RATE_TOOL_NAME = 'gth_review_rate';
39
+ /**
40
+ * GS2-105 — default wall-clock budget for the one rating call, in milliseconds.
41
+ *
42
+ * A healthy rating call against a local `gemma4:12b` was measured at ~50 s; a runaway at ~485 s.
43
+ * 120 s sits above the former with headroom and well below the latter, and below the integration
44
+ * suite's own 300 s per-test ceiling — which matters, because a budget above that ceiling would let
45
+ * the harness give up first and leave the generation running, which is the behaviour this replaces.
46
+ * Override per command with `commands.<review|pr>.rating.timeoutMs`.
47
+ */
48
+ export const DEFAULT_REVIEW_RATE_TIMEOUT_MS = 120_000;
39
49
  export function createReviewRateMiddleware(settings, gthConfig) {
40
50
  const normalizedConfig = normalizeRatingConfig(settings);
41
51
  const rateTool = tool((input) => {
@@ -50,10 +60,21 @@ export function createReviewRateMiddleware(settings, gthConfig) {
50
60
  description: 'Stores the final review rating and summary comment.',
51
61
  schema: RateSchema,
52
62
  });
53
- const ratingAgent = createAgent({
54
- model: gthConfig.llm,
55
- tools: [rateTool],
56
- });
63
+ // GS2-105 — ONE bound model call, not an agent loop.
64
+ //
65
+ // Rating is a single round trip by nature: read the conversation, emit one tool call carrying the
66
+ // score. Running it through an agent loop adds turns it has no use for, and a small model exploits
67
+ // every one of them — measured on `gemma4:12b`, the model called the rating tool and the loop fed
68
+ // the result back and asked again, four times, never emitting a final answer. The loop, not the
69
+ // model, is what has no terminating condition here: the score is already stored after the first
70
+ // call, so every later turn is pure cost.
71
+ const boundModel = typeof gthConfig.llm?.bindTools === 'function'
72
+ ? gthConfig.llm.bindTools([rateTool])
73
+ : undefined;
74
+ // The budget is read here, from the caller's own rating config, and NOT folded into
75
+ // `normalizedConfig` — that object is spread into the stored artifact, and adding a field to it
76
+ // would change the artifact's shape for every reader.
77
+ const timeoutMs = settings?.timeoutMs ?? DEFAULT_REVIEW_RATE_TIMEOUT_MS;
57
78
  return Promise.resolve(createMiddleware({
58
79
  name: 'review-rate',
59
80
  afterAgent: async (state) => {
@@ -63,11 +84,60 @@ export function createReviewRateMiddleware(settings, gthConfig) {
63
84
  deleteArtifact(REVIEW_RATE_ARTIFACT_KEY);
64
85
  const ratingPrompt = buildRatingInstructions(normalizedConfig);
65
86
  debugLog('ReviewRateMiddleware: requesting rating evaluation');
87
+ // GS2-105, DL-1 (no action is silent) — this is a SECOND model call, fired after the review
88
+ // prose is already on screen. Without this line the user sees a finished review followed by
89
+ // an unexplained pause, with nothing to say a call is still in flight.
90
+ displayInfo('\nScoring the review…');
91
+ if (!boundModel) {
92
+ displayWarning('ReviewRateMiddleware: the configured model cannot be given tools, so no rating ' +
93
+ 'could be requested.');
94
+ return state;
95
+ }
66
96
  try {
67
97
  const ratingMessages = [...state.messages, new HumanMessage(ratingPrompt)];
68
- await ratingAgent.invoke({
69
- messages: ratingMessages,
70
- }, getNewRunnableConfig());
98
+ // ONE call, bounded TWICE, and the second bound is not redundant.
99
+ //
100
+ // `timeout` on the runnable config is the good bound: it is honoured at this layer (though
101
+ // `ChatOllama` ignores a model-level timeout) and it ABORTS the request rather than
102
+ // abandoning it. But it is someone else's implementation, and a middleware that owns no
103
+ // bound of its own cannot be tested for one — a spec could only assert that the field was
104
+ // passed, which stays green even if the field stops being honoured.
105
+ //
106
+ // So the deadline below is this module's own guarantee: whatever the provider or the
107
+ // runnable layer does, `afterAgent` settles within the budget. It races rather than
108
+ // cancels, so on this path the generation may still be running when we stop waiting —
109
+ // that is why it is the backstop and `timeout` is the primary.
110
+ let deadlineTimer;
111
+ const deadline = new Promise((_resolve, reject) => {
112
+ deadlineTimer = setTimeout(() => reject(Object.assign(new Error('rating budget exhausted'), { name: 'TimeoutError' })), timeoutMs);
113
+ // Never hold the process open for a budget that is only a backstop.
114
+ deadlineTimer.unref?.();
115
+ });
116
+ let answer;
117
+ try {
118
+ answer = await Promise.race([
119
+ boundModel.invoke(ratingMessages, {
120
+ ...getNewRunnableConfig(),
121
+ timeout: timeoutMs,
122
+ }),
123
+ deadline,
124
+ ]);
125
+ }
126
+ finally {
127
+ // Not tidiness — correctness. A losing `Promise.race` entrant still settles, so a
128
+ // deadline left armed after a fast rating would reject into nobody, and an unhandled
129
+ // rejection is fatal on modern Node: the guard against a hang would become a way to
130
+ // crash a healthy run. This runs on the continuation, ahead of any macrotask timer, so
131
+ // the deadline never fires and never rejects.
132
+ clearTimeout(deadlineTimer);
133
+ }
134
+ // Run whichever rating call the model made. Extra calls in one response are ignored
135
+ // rather than replayed — the score is settled by the first, and honouring the rest is
136
+ // how a scoring step turns into an argument with itself.
137
+ const calls = (answer?.tool_calls ?? []).filter((call) => call.name === REVIEW_RATE_TOOL_NAME);
138
+ if (calls[0]) {
139
+ await rateTool.invoke(calls[0].args);
140
+ }
71
141
  const artifact = getArtifact(REVIEW_RATE_ARTIFACT_KEY);
72
142
  if (!artifact) {
73
143
  displayWarning('ReviewRateMiddleware: rating agent completed but did not call the rating tool. ' +
@@ -77,8 +147,14 @@ export function createReviewRateMiddleware(settings, gthConfig) {
77
147
  }
78
148
  }
79
149
  catch (error) {
80
- displayWarning('ReviewRateMiddleware: rating agent failed — ' +
81
- (error instanceof Error ? error.message : String(error)));
150
+ // A budget overrun and a provider error are different events and must read differently:
151
+ // one says the model never answered in time, the other carries the provider's own reason.
152
+ // Collapsing them would make a hung local model look like a broken configuration.
153
+ displayWarning(isAbortError(error)
154
+ ? `ReviewRateMiddleware: the rating call did not finish within ${timeoutMs}ms and was ` +
155
+ 'cancelled. No score was produced.'
156
+ : 'ReviewRateMiddleware: rating agent failed — ' +
157
+ (error instanceof Error ? error.message : String(error)));
82
158
  debugLogError('ReviewRateMiddleware.invoke', error);
83
159
  }
84
160
  return state;
@@ -104,6 +180,20 @@ function buildRatingInstructions(config) {
104
180
  '- Use the comment field of the tool call for a concise summary referencing the code state.',
105
181
  ].join('\n');
106
182
  }
183
+ /**
184
+ * Whether a thrown value is an abort — i.e. our own budget cancelled the call.
185
+ *
186
+ * Deliberately tolerant about the shape. An abort surfaces as a `DOMException` named `AbortError`
187
+ * in some runtimes, as a plain `Error` named `AbortError` or `TimeoutError` in others, and provider
188
+ * SDKs re-wrap it; matching only one of those would silently route a real timeout into the generic
189
+ * branch and report it as a provider failure.
190
+ */
191
+ function isAbortError(error) {
192
+ if (typeof error !== 'object' || error === null)
193
+ return false;
194
+ const name = error.name;
195
+ return name === 'AbortError' || name === 'TimeoutError';
196
+ }
107
197
  function clamp(value, min, max) {
108
198
  return Math.min(Math.max(value, min), max);
109
199
  }
@@ -1 +1 @@
1
- {"version":3,"file":"reviewRateMiddleware.js","sourceRoot":"","sources":["../../src/middleware/reviewRateMiddleware.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAwB,MAAM,WAAW,CAAC;AAChF,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACpG,OAAO,EAAE,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AAqB,kBAAkB,+CAA+C;QACtF,EAAE;QACF,wBAAwB;QACxB,gBAAgB,kBAAkB,IAAI,YAAY,yDAAyD;QAC3G,4BAA4B,YAAY,IAAI,YAAY,EAAE;QAC1D,uCAAuC,MAAM,IAAI,YAAY,EAAE;QAC/D,4FAA4F;KAC7F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,YAAY,CAAC,KAAc;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,IAAI,GAAI,KAA4B,CAAC,IAAI,CAAC;IAChD,OAAO,IAAI,KAAK,YAAY,IAAI,IAAI,KAAK,cAAc,CAAC;AAC1D,CAAC;AAED,SAAS,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;IACpD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC"}
@@ -4,6 +4,19 @@ import type { AgentResolvers } from '@gaunt-sloth/core/core/types.js';
4
4
  export interface ReviewContext {
5
5
  /** PR number under review; undefined in `gth pr` discovery mode (current branch's PR). */
6
6
  prId?: string;
7
+ /**
8
+ * CFG-70 — the paths this run's diff touches, for selecting `prompts.paths` entries.
9
+ *
10
+ * **Extracted from the content-source output alone**, never from the whole message: `review()`
11
+ * is handed requirements + the diff + `--file` contents + stdin + `--message` joined together,
12
+ * and a requirements document that quotes a diff would otherwise inject paths no change went
13
+ * near — attaching one module's guidelines to another module's review, silently.
14
+ *
15
+ * An embedder populates it itself with `extractChangedPathsFromDiff`, exported from this
16
+ * package's barrel for exactly that. An empty array and an absent one are treated alike: both
17
+ * mean no path was found, and both are worth saying out loud when entries are configured.
18
+ */
19
+ changedPaths?: string[];
7
20
  }
8
21
  /**
9
22
  * Run a review of `diff` and print the verdict.
@@ -1,4 +1,5 @@
1
- import { isGhReadFileToolEnabled } from '@gaunt-sloth/core/config.js';
1
+ import { isGhReadFileToolEnabled, selectScopedPrompts } from '@gaunt-sloth/core/config.js';
2
+ import { measureScopedPrompts, SCOPED_PROMPT_BUDGET_BYTES, } from '@gaunt-sloth/core/utils/llmUtils.js';
2
3
  import { defaultStatusCallback, display, displayDebug, displayError, displayInfo, displaySuccess, displayWarning, flushSessionLog, initSessionLogging, stopSessionLogging, } from '@gaunt-sloth/core/utils/consoleUtils.js';
3
4
  import { reviewHeadingBlock } from '#src/modules/reviewHeading.js';
4
5
  import { getCommandOutputFilePath } from '#src/utils/fileUtils.js';
@@ -10,6 +11,7 @@ import { createReviewRateMiddleware, REVIEW_RATE_ARTIFACT_KEY, } from '#src/midd
10
11
  import { deleteArtifact, getArtifact } from '@gaunt-sloth/core/state/artifactStore.js';
11
12
  import { setExitCode, stdout } from '@gaunt-sloth/core/utils/systemUtils.js';
12
13
  import { ApprovalStopError, approvalStopRows } from '@gaunt-sloth/core/core/shell/approvalStop.js';
14
+ import { displayTermination } from '@gaunt-sloth/core/core/terminationNotice.js';
13
15
  import { get as getGhReadFileTool, GTH_GH_READ_FILE_TOOL_NAME } from '#src/tools/ghReadFileTool.js';
14
16
  /**
15
17
  * Run a review of `diff` and print the verdict.
@@ -25,7 +27,7 @@ import { get as getGhReadFileTool, GTH_GH_READ_FILE_TOOL_NAME } from '#src/tools
25
27
  */
26
28
  export async function review(source,
27
29
  // GS2-79: `_preamble` is retained for signature stability but is NO LONGER injected as a leading
28
- // SystemMessage. Both agent backends COMPOSE the full system prompt themselves — backstory +
30
+ // SystemMessage. The agent COMPOSES the full system prompt itself — backstory +
29
31
  // guidelines + the per-command mode prompt + system prompt — and hand it to createAgent as
30
32
  // `systemPrompt`; for `review`/`pr` that mode prompt IS the review instructions (core's
31
33
  // `readModePrompt`). Passing this preamble as well produced TWO system messages, which
@@ -67,8 +69,28 @@ _preamble, diff, config, command = 'review', resolvers, reviewContext) {
67
69
  // deliberately reverses REL-12 for a user who asks for it: a caller piping a review into their
68
70
  // own template or diffing captured stdout needs a byte-clean stream, and nobody loses
69
71
  // attribution without setting this key.
72
+ // CFG-70 — select the path-scoped prompt entries this diff activates, BEFORE the agent below
73
+ // composes its system prompt from the same config object. Mutating the resolved config inside
74
+ // `review()` is the established shape here: `maybeAddGhReadFileTool` above does it too.
75
+ //
76
+ // Placed after `initSessionLogging` so its diagnostics reach the report file as well as the
77
+ // terminal, and before the heading guard so the report line can join the heading inside it.
78
+ const scopedPromptsReport = applyScopedPrompts(config, reviewContext?.changedPaths);
70
79
  if (config.output?.header !== 'none') {
71
80
  display(reviewHeadingBlock(command, config.modelDisplayName, config.modelProviderType));
81
+ // CFG-70 — inside the GS2-93 guard, with the heading, because it is review-document
82
+ // provenance of the same kind: which module guidelines this verdict was formed under. A
83
+ // caller who silenced the header to diff captured stdout byte-for-byte would otherwise find
84
+ // a line they did not ask for at the top of their stream.
85
+ //
86
+ // The WARNINGS `applyScopedPrompts` emits are deliberately NOT in here. They are diagnostics
87
+ // about the run's configuration, not content of the review, and the one situation that most
88
+ // needs them — a misspelled glob matching nothing — is indistinguishable from a working run
89
+ // without them. `output.header: 'none'` asks for a clean document, not for silence about
90
+ // config that did not do what it says.
91
+ if (scopedPromptsReport) {
92
+ display(scopedPromptsReport);
93
+ }
72
94
  }
73
95
  const rateConfig = config.commands?.[command]?.rating;
74
96
  if (rateConfig && rateConfig.enabled !== false) {
@@ -95,6 +117,9 @@ _preamble, diff, config, command = 'review', resolvers, reviewContext) {
95
117
  // this package a dependency on the agent package to reach a backend seam would invert it.
96
118
  const runner = new GthAgentRunner(defaultStatusCallback, effectiveResolvers);
97
119
  try {
120
+ // GS2-20 — considered for the durable saver and deliberately kept in memory. A review is a
121
+ // one-shot run over a diff, not a conversation: it ends with its verdict and there is no next
122
+ // turn to come back to. Its output is already persisted, as the review file.
98
123
  await runner.init(command, config, new MemorySaver());
99
124
  await runner.processMessages(messages);
100
125
  }
@@ -121,6 +146,18 @@ _preamble, diff, config, command = 'review', resolvers, reviewContext) {
121
146
  finally {
122
147
  await runner.cleanup();
123
148
  }
149
+ // [[EXT-159]] — say why the run ended, on the one surface `review` and `pr` have.
150
+ //
151
+ // These verbs write a report and exit; there is no prompt to return to, so this line and the
152
+ // catch above are everything the user gets. Read after `cleanup()` for the reason the runner
153
+ // snapshots at cleanup: the agent is gone by here, and its own sites are the innermost ones.
154
+ // A run that produced a review says nothing — an ordinary completion is not news.
155
+ try {
156
+ displayTermination(runner.getTerminationReason());
157
+ }
158
+ catch {
159
+ /* fail-soft: explaining a run must never be what breaks it */
160
+ }
124
161
  progressIndicator?.stop();
125
162
  handleRatingResult(rateConfig, command);
126
163
  // Close the file AFTER rating is written
@@ -148,6 +185,71 @@ _preamble, diff, config, command = 'review', resolvers, reviewContext) {
148
185
  progressIndicator?.stop();
149
186
  }
150
187
  }
188
+ /**
189
+ * CFG-70 — a count and the noun it governs, agreeing. Every number below is routinely 1: a
190
+ * one-file diff, a project with a single `prompts.paths` entry. "1 changed files" in a line the
191
+ * review document carries reads as a bug in the tool, which is the wrong thing for a line whose
192
+ * whole job is to be believed about what the review ran on.
193
+ */
194
+ function countOf(count, singular, plural = `${singular}s`) {
195
+ return `${count} ${count === 1 ? singular : plural}`;
196
+ }
197
+ const ENTRY_NOUN = ['configured prompts.paths entry', 'configured prompts.paths entries'];
198
+ /**
199
+ * CFG-70 — match this run's changed paths against `prompts.paths`, set the runtime field the
200
+ * prompt-reading layer reads, and say what happened.
201
+ *
202
+ * @returns the one-line report for the review document when at least one entry matched, else
203
+ * `undefined`. Warnings are emitted here directly; the report line is returned so the caller can
204
+ * place it inside the `output.header` guard, which the warnings are not subject to.
205
+ *
206
+ * A misspelled glob (`packages/vue-ui/*` where `/**` was meant), or `--content-source text`,
207
+ * produces zero matches and a review that runs on the root guidelines alone — **indistinguishable
208
+ * from a working run** unless the run says so. Hence three outcomes rather than one:
209
+ *
210
+ * - at least one entry matched → the report line;
211
+ * - paths found, no entry matched → a warning naming how many paths were seen, because the number
212
+ * is what separates "my globs are wrong" from "the diff really is outside every module";
213
+ * - no paths at all → a warning that the content source is not a unified diff, which is the actual
214
+ * cause when `--content-source text` or a file review reaches here.
215
+ *
216
+ * Nothing is said at all when no entries are configured: that is every run of every project not
217
+ * using the feature.
218
+ */
219
+ function applyScopedPrompts(config, changedPaths) {
220
+ const entries = config.prompts?.paths;
221
+ if (!entries?.length) {
222
+ return undefined;
223
+ }
224
+ const paths = changedPaths ?? [];
225
+ if (paths.length === 0) {
226
+ displayWarning(`No "diff --git" header was found in the content under review, so the ` +
227
+ `${countOf(entries.length, ...ENTRY_NOUN)} could not be selected from. Path-scoped ` +
228
+ `prompts need a unified diff — check the content source for this run.`);
229
+ return undefined;
230
+ }
231
+ const selected = selectScopedPrompts(paths, entries);
232
+ if (selected.length === 0) {
233
+ displayWarning(`${countOf(entries.length, ...ENTRY_NOUN)} matched none of the ` +
234
+ `${countOf(paths.length, 'changed path')} in this diff, so no module prompts were ` +
235
+ `attached. Check the match globs against the paths the diff actually touches.`);
236
+ return undefined;
237
+ }
238
+ config.scopedPrompts = selected;
239
+ // The budget check, once per run and from here: this is the only site that knows the final
240
+ // selection, and a "have I warned yet" module flag would misbehave across the several agent
241
+ // inits a single process performs. Warn, never truncate — a guideline cut mid-sentence is worse
242
+ // than a long prompt, because the model then follows a rule whose exception was removed.
243
+ const budget = measureScopedPrompts(selected, config);
244
+ if (budget.overBudget) {
245
+ displayWarning(`Path-scoped prompts add ${budget.totalBytes} bytes to this run's prompt ` +
246
+ `(${budget.entryNames.join(', ')}), over the ${SCOPED_PROMPT_BUDGET_BYTES}-byte guide. ` +
247
+ `Nothing was truncated; consider narrowing the match globs or shortening those files.`);
248
+ }
249
+ return (`Scoped prompts: ${selected.map((entry) => entry.name).join(', ')} ` +
250
+ `(${selected.length} of ${countOf(entries.length, 'entry', 'entries')}, ` +
251
+ `${countOf(paths.length, 'changed file')})`);
252
+ }
151
253
  /**
152
254
  * REL-2: conditionally inject the optional `gh api` file-read tool into the review agent's tools.
153
255
  *
@@ -1 +1 @@
1
- {"version":3,"file":"reviewModule.js","sourceRoot":"","sources":["../../src/modules/reviewModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,cAAc,EACd,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,GAEzB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAEnG,OAAO,EAAE,GAAG,IAAI,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAQpG;;;;;;;;;;;GAWG;AACH,MAAM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;QACZ,cAAc,CAAC,gDAAgD,OAAO,WAAW,CAAC,CAAC;QACnF,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,4EAA4E;QAC5F,OAAO;IACT,CAAC;IAED,MAAM,SAAS,GAAG,UAAU,CAAC,aAAa,IAAI,MAAM,CAAC,aAAa,CAAC;IACnE,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC;IAC3D,MAAM,WAAW,GAAG,GAAG,MAAM,CAAC,IAAI,IAAI,SAAS,gBAAgB,SAAS,GAAG,CAAC;IAC5E,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAE/B,IAAI,MAAM,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,cAAc,CAAC,QAAQ,WAAW,EAAE,CAAC,CAAC;IACxC,CAAC;SAAM,CAAC;QACN,YAAY,CAAC,QAAQ,WAAW,EAAE,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,iBAAiB,IAAI,IAAI,EAAE,CAAC;YACzC,WAAW,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @packageDocumentation
3
+ * CFG-70 — **the paths a unified diff touches**, read from its `diff --git` header lines.
4
+ *
5
+ * It lives in the review package rather than in core because it is diff-specific: nothing else in
6
+ * the product has a unified diff to read, and a "generic path extractor" in core would invite a
7
+ * second, differently-wrong caller.
8
+ *
9
+ * ## Only the `diff --git` line, deliberately
10
+ *
11
+ * The `---` and `+++` lines are NOT read. On an addition the `---` line says `/dev/null`, and on a
12
+ * deletion the `+++` line does; a parser that read them would either emit `/dev/null` as a changed
13
+ * path or need a special case to suppress it. The `diff --git` line names both real paths on every
14
+ * kind of change, additions and deletions included, so reading it alone makes `/dev/null` an
15
+ * absence rather than a case.
16
+ *
17
+ * A **rename** yields two different paths on that one line, and **both count**: the guidelines for
18
+ * the module a file left are as relevant to reviewing the move as the guidelines for the module it
19
+ * arrived in.
20
+ *
21
+ * ## Quoting — measured against real git output, not reasoned out
22
+ *
23
+ * Git quotes a path in the header when it contains a byte outside printable ASCII (under the
24
+ * default `core.quotePath=true`), a double quote, a backslash, or a control character; it then
25
+ * writes it as a C-style quoted string with octal escapes for the individual UTF-8 **bytes**, so
26
+ * decoding has to reassemble bytes before decoding text. **When either side needs quoting, git
27
+ * quotes both**, so a header either opens with a quote or contains none.
28
+ *
29
+ * ## The space case, and what this heuristic cannot do
30
+ *
31
+ * A space does **not** trigger quoting: git writes `diff --git a/pkg/with space.ts b/pkg/with
32
+ * space.ts` unquoted, and the separator between the two paths is itself a space. The two are
33
+ * genuinely indistinguishable in the general case, so this is a heuristic and is documented as one:
34
+ *
35
+ * - **Preferred rule — equal halves.** Among the candidate split points (every occurrence of a
36
+ * space followed by `b/`), one where the `a/` side and the `b/` side are the same path is taken.
37
+ * That resolves *every* non-rename header, however many spaces the path has, including the
38
+ * adversarial `a/pkg/a b/c.ts b/pkg/a b/c.ts` where a directory is literally named `a b`.
39
+ * - **Fallback — the last candidate.** When no split yields equal halves the header is a rename
40
+ * whose two paths differ, and nothing in the line can decide it. The last candidate is taken.
41
+ *
42
+ * **What that cannot resolve:** a rename whose *destination* path contains a literal ` b/` — say
43
+ * `old.ts` renamed into a directory named `x b` — splits in the wrong place and yields two paths
44
+ * that are not the user's. Choosing the first candidate instead would merely move the failure onto
45
+ * the source path; the information to decide is not in the line. It is left as a known limit
46
+ * rather than papered over, and the shape is vanishingly rare: it needs a rename, a space, AND a
47
+ * directory whose name ends in a space-delimited `b`.
48
+ *
49
+ * A header that does not fit the `a/… b/…` shape at all (git's `--no-prefix`, or
50
+ * `diff.mnemonicPrefix`'s `i/`…`w/`) is **skipped**, not guessed at. A fabricated path is worse
51
+ * than a missing one: it can pull in a scoped entry that has nothing to do with the change, and
52
+ * nothing downstream can tell it from a real one.
53
+ */
54
+ /**
55
+ * Extract the repository-relative POSIX paths a unified diff touches, in the order the diff names
56
+ * them and with duplicates removed.
57
+ *
58
+ * De-duplication matters because the overwhelmingly common header names the same path twice (`a/x
59
+ * b/x`), and a caller reporting how many files a review saw would otherwise double every count.
60
+ * A rename's two distinct paths both survive it.
61
+ *
62
+ * Content that is not a unified diff — a requirements document, `--content-source text` output —
63
+ * simply yields an empty list. There is no error here: deciding what an empty result means belongs
64
+ * to the caller, which is the only place that knows whether a diff was expected.
65
+ */
66
+ export declare function extractChangedPathsFromDiff(diff: string): string[];
@@ -0,0 +1,178 @@
1
+ /**
2
+ * @packageDocumentation
3
+ * CFG-70 — **the paths a unified diff touches**, read from its `diff --git` header lines.
4
+ *
5
+ * It lives in the review package rather than in core because it is diff-specific: nothing else in
6
+ * the product has a unified diff to read, and a "generic path extractor" in core would invite a
7
+ * second, differently-wrong caller.
8
+ *
9
+ * ## Only the `diff --git` line, deliberately
10
+ *
11
+ * The `---` and `+++` lines are NOT read. On an addition the `---` line says `/dev/null`, and on a
12
+ * deletion the `+++` line does; a parser that read them would either emit `/dev/null` as a changed
13
+ * path or need a special case to suppress it. The `diff --git` line names both real paths on every
14
+ * kind of change, additions and deletions included, so reading it alone makes `/dev/null` an
15
+ * absence rather than a case.
16
+ *
17
+ * A **rename** yields two different paths on that one line, and **both count**: the guidelines for
18
+ * the module a file left are as relevant to reviewing the move as the guidelines for the module it
19
+ * arrived in.
20
+ *
21
+ * ## Quoting — measured against real git output, not reasoned out
22
+ *
23
+ * Git quotes a path in the header when it contains a byte outside printable ASCII (under the
24
+ * default `core.quotePath=true`), a double quote, a backslash, or a control character; it then
25
+ * writes it as a C-style quoted string with octal escapes for the individual UTF-8 **bytes**, so
26
+ * decoding has to reassemble bytes before decoding text. **When either side needs quoting, git
27
+ * quotes both**, so a header either opens with a quote or contains none.
28
+ *
29
+ * ## The space case, and what this heuristic cannot do
30
+ *
31
+ * A space does **not** trigger quoting: git writes `diff --git a/pkg/with space.ts b/pkg/with
32
+ * space.ts` unquoted, and the separator between the two paths is itself a space. The two are
33
+ * genuinely indistinguishable in the general case, so this is a heuristic and is documented as one:
34
+ *
35
+ * - **Preferred rule — equal halves.** Among the candidate split points (every occurrence of a
36
+ * space followed by `b/`), one where the `a/` side and the `b/` side are the same path is taken.
37
+ * That resolves *every* non-rename header, however many spaces the path has, including the
38
+ * adversarial `a/pkg/a b/c.ts b/pkg/a b/c.ts` where a directory is literally named `a b`.
39
+ * - **Fallback — the last candidate.** When no split yields equal halves the header is a rename
40
+ * whose two paths differ, and nothing in the line can decide it. The last candidate is taken.
41
+ *
42
+ * **What that cannot resolve:** a rename whose *destination* path contains a literal ` b/` — say
43
+ * `old.ts` renamed into a directory named `x b` — splits in the wrong place and yields two paths
44
+ * that are not the user's. Choosing the first candidate instead would merely move the failure onto
45
+ * the source path; the information to decide is not in the line. It is left as a known limit
46
+ * rather than papered over, and the shape is vanishingly rare: it needs a rename, a space, AND a
47
+ * directory whose name ends in a space-delimited `b`.
48
+ *
49
+ * A header that does not fit the `a/… b/…` shape at all (git's `--no-prefix`, or
50
+ * `diff.mnemonicPrefix`'s `i/`…`w/`) is **skipped**, not guessed at. A fabricated path is worse
51
+ * than a missing one: it can pull in a scoped entry that has nothing to do with the change, and
52
+ * nothing downstream can tell it from a real one.
53
+ */
54
+ const DIFF_GIT_PREFIX = 'diff --git ';
55
+ /** git's C-style single-character escapes, as `unquote_c_style` reads them. */
56
+ const C_ESCAPES = {
57
+ a: 0x07,
58
+ b: 0x08,
59
+ t: 0x09,
60
+ n: 0x0a,
61
+ v: 0x0b,
62
+ f: 0x0c,
63
+ r: 0x0d,
64
+ '"': 0x22,
65
+ '\\': 0x5c,
66
+ };
67
+ const utf8Decoder = new TextDecoder('utf-8');
68
+ const utf8Encoder = new TextEncoder();
69
+ /**
70
+ * Read one C-style quoted token starting at the opening quote, returning the decoded path and the
71
+ * index just past the closing quote — or `undefined` when the quote is never closed.
72
+ *
73
+ * Octal escapes are collected as raw bytes and decoded as UTF-8 at the end, because a single
74
+ * non-ASCII character arrives as several `\NNN` escapes that are only meaningful together.
75
+ */
76
+ function readQuotedToken(line, start) {
77
+ const bytes = [];
78
+ let index = start + 1;
79
+ while (index < line.length) {
80
+ const character = line[index];
81
+ if (character === '"') {
82
+ return { value: utf8Decoder.decode(Uint8Array.from(bytes)), end: index + 1 };
83
+ }
84
+ if (character === '\\') {
85
+ const escaped = line[index + 1];
86
+ if (escaped === undefined)
87
+ return undefined;
88
+ if (escaped >= '0' && escaped <= '7') {
89
+ let digits = '';
90
+ let cursor = index + 1;
91
+ while (digits.length < 3 && line[cursor] >= '0' && line[cursor] <= '7') {
92
+ digits += line[cursor];
93
+ cursor++;
94
+ }
95
+ bytes.push(parseInt(digits, 8));
96
+ index = cursor;
97
+ continue;
98
+ }
99
+ const single = C_ESCAPES[escaped];
100
+ if (single === undefined)
101
+ return undefined;
102
+ bytes.push(single);
103
+ index += 2;
104
+ continue;
105
+ }
106
+ for (const byte of utf8Encoder.encode(character))
107
+ bytes.push(byte);
108
+ index++;
109
+ }
110
+ return undefined;
111
+ }
112
+ /**
113
+ * Split the unquoted `a/… b/…` remainder into its two prefixed halves — see the module docblock.
114
+ *
115
+ * The equal-halves rule is deterministic rather than merely first-match: equal strings have equal
116
+ * length, so a candidate whose halves are equal can only be the exact midpoint, and a string has
117
+ * one midpoint. At most one candidate can therefore satisfy it, and which one is found first never
118
+ * matters. The last candidate is the fallback only for a genuine rename, where no split makes the
119
+ * halves equal.
120
+ */
121
+ function splitUnquotedPair(remainder) {
122
+ const candidates = [];
123
+ for (let index = remainder.indexOf(' b/'); index >= 0; index = remainder.indexOf(' b/', index + 1))
124
+ candidates.push(index);
125
+ if (candidates.length === 0)
126
+ return undefined;
127
+ const halves = candidates.map((index) => [remainder.slice(0, index), remainder.slice(index + 1)]);
128
+ return (halves.find(([left, right]) => left.slice(2) === right.slice(2)) ?? halves[halves.length - 1]);
129
+ }
130
+ /** Strip the `a/` or `b/` header prefix, or report that the token never had one. */
131
+ function stripPrefix(token, prefix) {
132
+ return token.startsWith(prefix) ? token.slice(prefix.length) : undefined;
133
+ }
134
+ /**
135
+ * Extract the repository-relative POSIX paths a unified diff touches, in the order the diff names
136
+ * them and with duplicates removed.
137
+ *
138
+ * De-duplication matters because the overwhelmingly common header names the same path twice (`a/x
139
+ * b/x`), and a caller reporting how many files a review saw would otherwise double every count.
140
+ * A rename's two distinct paths both survive it.
141
+ *
142
+ * Content that is not a unified diff — a requirements document, `--content-source text` output —
143
+ * simply yields an empty list. There is no error here: deciding what an empty result means belongs
144
+ * to the caller, which is the only place that knows whether a diff was expected.
145
+ */
146
+ export function extractChangedPathsFromDiff(diff) {
147
+ const paths = new Set();
148
+ for (const rawLine of diff.split(/\r?\n/)) {
149
+ if (!rawLine.startsWith(DIFF_GIT_PREFIX))
150
+ continue;
151
+ const remainder = rawLine.slice(DIFF_GIT_PREFIX.length);
152
+ let left;
153
+ let right;
154
+ if (remainder.startsWith('"')) {
155
+ const first = readQuotedToken(remainder, 0);
156
+ if (!first || remainder[first.end] !== ' ' || remainder[first.end + 1] !== '"')
157
+ continue;
158
+ const second = readQuotedToken(remainder, first.end + 1);
159
+ if (!second)
160
+ continue;
161
+ left = stripPrefix(first.value, 'a/');
162
+ right = stripPrefix(second.value, 'b/');
163
+ }
164
+ else {
165
+ const pair = splitUnquotedPair(remainder);
166
+ if (!pair)
167
+ continue;
168
+ left = stripPrefix(pair[0], 'a/');
169
+ right = stripPrefix(pair[1], 'b/');
170
+ }
171
+ if (left === undefined || right === undefined)
172
+ continue;
173
+ paths.add(left);
174
+ paths.add(right);
175
+ }
176
+ return [...paths];
177
+ }
178
+ //# sourceMappingURL=diffPaths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diffPaths.js","sourceRoot":"","sources":["../../src/utils/diffPaths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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M,GAAG,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;YACzD,IAAI,CAAC,MAAM;gBAAE,SAAS;YACtB,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACtC,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;YAC1C,IAAI,CAAC,IAAI;gBAAE,SAAS;YACpB,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;YAClC,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;QAED,IAAI,IAAI,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QACxD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAED,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;AACpB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaunt-sloth/review",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.10",
4
4
  "description": "Review functionality for Gaunt Sloth",
5
5
  "license": "MIT",
6
6
  "author": "Andrew Kondratev",
@@ -34,11 +34,11 @@
34
34
  "#src/*.js": "./dist/*.js"
35
35
  },
36
36
  "dependencies": {
37
- "@langchain/core": "^1.2.5",
38
- "@langchain/langgraph": "^1.4.9",
39
- "langchain": "^1.5.5",
40
- "zod": "^4.4.3",
41
- "@gaunt-sloth/core": "2.0.0-beta.1"
37
+ "@langchain/core": "^1.2.11",
38
+ "@langchain/langgraph": "^1.4.15",
39
+ "langchain": "^1.5.11",
40
+ "zod": "^4.6.3",
41
+ "@gaunt-sloth/core": "2.0.0-beta.10"
42
42
  },
43
43
  "files": [
44
44
  "./dist/*",