@gaunt-sloth/review 2.0.0-alpha.24 → 2.0.0-alpha.26
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
CHANGED
|
@@ -71,7 +71,7 @@ The review text is written to stdout. With rating enabled, `review()` sets `proc
|
|
|
71
71
|
when the rating comes back below `passThreshold` (or when the model fails to produce a rating),
|
|
72
72
|
so the script exits non-zero exactly when `gth review` would — that is the whole embed contract.
|
|
73
73
|
Configuration (provider, prompts, rating thresholds) is the standard Gaunt Sloth config, see
|
|
74
|
-
[
|
|
74
|
+
[the configuration guide](https://github.com/pukeko-robotics/gaunt-sloth/blob/main/docs/configuration/index.md).
|
|
75
75
|
|
|
76
76
|
This exact flow is verified by the workspace embed e2e (`pnpm run test:embed`), which packs the
|
|
77
77
|
published tarballs and runs the snippet above from a temp-dir consumer against a stub model.
|
|
@@ -10,64 +10,78 @@ import { setExitCode } from '@gaunt-sloth/core/utils/systemUtils.js';
|
|
|
10
10
|
import { get as getGhReadFileTool, GTH_GH_READ_FILE_TOOL_NAME } from '#src/tools/ghReadFileTool.js';
|
|
11
11
|
export async function review(source, preamble, diff, config, command = 'review', resolvers, reviewContext) {
|
|
12
12
|
const progressIndicator = config.streamOutput ? undefined : new ProgressIndicator('Reviewing.');
|
|
13
|
-
const messages = [new SystemMessage(preamble), new HumanMessage(diff)];
|
|
14
|
-
// REL-2: optionally give the review agent a `gh api` file-read tool so it can fetch the FULL
|
|
15
|
-
// contents of a file when the PR diff truncates large changes. Only added in a GitHub PR
|
|
16
|
-
// context (the content source resolves to GitHub); a graceful no-op otherwise. Reads through
|
|
17
|
-
// the GitHub API rather than the workspace filesystem, so it is safe under pull_request_target.
|
|
18
|
-
maybeAddGhReadFileTool(config, command, reviewContext?.prId);
|
|
19
|
-
// Prepare logging path (if enabled by config)
|
|
20
|
-
const filePath = getCommandOutputFilePath(config, source);
|
|
21
|
-
if (filePath) {
|
|
22
|
-
initSessionLogging(filePath, config.streamSessionInferenceLog);
|
|
23
|
-
}
|
|
24
|
-
const rateConfig = config.commands?.[command]?.rating;
|
|
25
|
-
if (rateConfig && rateConfig.enabled !== false) {
|
|
26
|
-
const confMiddleware = config.middleware || [];
|
|
27
|
-
const middlewareWithoutReviewRate = confMiddleware.filter((mw) => {
|
|
28
|
-
return !(typeof mw === 'object' &&
|
|
29
|
-
mw !== null &&
|
|
30
|
-
'name' in mw &&
|
|
31
|
-
mw.name === 'review-rate');
|
|
32
|
-
});
|
|
33
|
-
// Resolve review-rate middleware directly rather than going through the registry
|
|
34
|
-
const reviewRateMiddleware = await createReviewRateMiddleware(rateConfig, config);
|
|
35
|
-
config.middleware = [...middlewareWithoutReviewRate, reviewRateMiddleware];
|
|
36
|
-
}
|
|
37
|
-
// When no resolvers are provided (e.g. standalone review CLI, without @gaunt-sloth/agent's
|
|
38
|
-
// resolvers), supply a minimal middleware resolver that passes through already-resolved
|
|
39
|
-
// middleware. The full `gaunt-sloth` CLI injects @gaunt-sloth/agent's resolvers instead.
|
|
40
|
-
const effectiveResolvers = resolvers ?? {
|
|
41
|
-
resolveMiddleware: async (middleware) => middleware ?? [],
|
|
42
|
-
};
|
|
43
|
-
const runner = new GthAgentRunner(defaultStatusCallback, effectiveResolvers);
|
|
44
13
|
try {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
14
|
+
const messages = [new SystemMessage(preamble), new HumanMessage(diff)];
|
|
15
|
+
// REL-2: optionally give the review agent a `gh api` file-read tool so it can fetch the FULL
|
|
16
|
+
// contents of a file when the PR diff truncates large changes. Only added in a GitHub PR
|
|
17
|
+
// context (the content source resolves to GitHub); a graceful no-op otherwise. Reads through
|
|
18
|
+
// the GitHub API rather than the workspace filesystem, so it is safe under pull_request_target.
|
|
19
|
+
maybeAddGhReadFileTool(config, command, reviewContext?.prId);
|
|
20
|
+
// Prepare logging path (if enabled by config)
|
|
21
|
+
const filePath = getCommandOutputFilePath(config, source);
|
|
22
|
+
if (filePath) {
|
|
23
|
+
initSessionLogging(filePath, config.streamSessionInferenceLog);
|
|
24
|
+
}
|
|
25
|
+
const rateConfig = config.commands?.[command]?.rating;
|
|
26
|
+
if (rateConfig && rateConfig.enabled !== false) {
|
|
27
|
+
const confMiddleware = config.middleware || [];
|
|
28
|
+
const middlewareWithoutReviewRate = confMiddleware.filter((mw) => {
|
|
29
|
+
return !(typeof mw === 'object' &&
|
|
30
|
+
mw !== null &&
|
|
31
|
+
'name' in mw &&
|
|
32
|
+
mw.name === 'review-rate');
|
|
33
|
+
});
|
|
34
|
+
// Resolve review-rate middleware directly rather than going through the registry
|
|
35
|
+
const reviewRateMiddleware = await createReviewRateMiddleware(rateConfig, config);
|
|
36
|
+
config.middleware = [...middlewareWithoutReviewRate, reviewRateMiddleware];
|
|
37
|
+
}
|
|
38
|
+
// When no resolvers are provided (e.g. standalone review CLI, without @gaunt-sloth/agent's
|
|
39
|
+
// resolvers), supply a minimal middleware resolver that passes through already-resolved
|
|
40
|
+
// middleware. The full `gaunt-sloth` CLI injects @gaunt-sloth/agent's resolvers instead.
|
|
41
|
+
const effectiveResolvers = resolvers ?? {
|
|
42
|
+
resolveMiddleware: async (middleware) => middleware ?? [],
|
|
43
|
+
};
|
|
44
|
+
const runner = new GthAgentRunner(defaultStatusCallback, effectiveResolvers);
|
|
60
45
|
try {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
displaySuccess(`\n\nThis report can be found in ${filePath}`);
|
|
46
|
+
await runner.init(command, config, new MemorySaver());
|
|
47
|
+
await runner.processMessages(messages);
|
|
64
48
|
}
|
|
65
49
|
catch (error) {
|
|
66
50
|
displayDebug(error instanceof Error ? error : String(error));
|
|
67
|
-
|
|
51
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
52
|
+
displayError(reason
|
|
53
|
+
? `Failed to run review with agent.\n\n${reason}`
|
|
54
|
+
: 'Failed to run review with agent.');
|
|
55
|
+
}
|
|
56
|
+
finally {
|
|
57
|
+
await runner.cleanup();
|
|
68
58
|
}
|
|
59
|
+
progressIndicator?.stop();
|
|
60
|
+
handleRatingResult(rateConfig, command);
|
|
61
|
+
// Close the file AFTER rating is written
|
|
62
|
+
if (filePath) {
|
|
63
|
+
try {
|
|
64
|
+
flushSessionLog();
|
|
65
|
+
stopSessionLogging();
|
|
66
|
+
displaySuccess(`\n\nThis report can be found in ${filePath}`);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
displayDebug(error instanceof Error ? error : String(error));
|
|
70
|
+
displayError(`Failed to write review to file: ${filePath}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
deleteArtifact(REVIEW_RATE_ARTIFACT_KEY);
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
// EXT-53: the indicator owns a 1s setInterval — an active libuv handle that keeps Node's event
|
|
77
|
+
// loop from ever draining, so leaking it hangs the CLI forever after the work is done. The
|
|
78
|
+
// `stop()` above sits where it does for output ordering (before the rating result / the
|
|
79
|
+
// "report can be found in …" line); this `finally` guarantees the handle is also released when
|
|
80
|
+
// anything above throws — notably `createReviewRateMiddleware()`, which is awaited outside any
|
|
81
|
+
// catch, and `runner.cleanup()`, whose own `finally` rethrows straight past the `stop()`.
|
|
82
|
+
// `stop()` is idempotent, so the normal path's second call is a no-op.
|
|
83
|
+
progressIndicator?.stop();
|
|
69
84
|
}
|
|
70
|
-
deleteArtifact(REVIEW_RATE_ARTIFACT_KEY);
|
|
71
85
|
}
|
|
72
86
|
/**
|
|
73
87
|
* REL-2: conditionally inject the optional `gh api` file-read tool into the review agent's tools.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewModule.js","sourceRoot":"","sources":["../../src/modules/reviewModule.ts"],"names":[],"mappings":"AAEA,OAAO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,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"}
|
|
@@ -21,16 +21,16 @@ export async function get(_, issueId) {
|
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
const issueLabel = /^\d+$/.test(issueId) ? `#${issueId}` : issueId;
|
|
24
|
+
// EXT-53: the indicator is constructed OUTSIDE the try and cleared in a `finally`. It owns a 1s
|
|
25
|
+
// setInterval — an active libuv handle — so a `stop()` reachable only on the success path leaves
|
|
26
|
+
// the event loop un-drainable and the process never exits. This is especially nasty here because
|
|
27
|
+
// a failed issue fetch is a SOFT failure (returns null, the review proceeds), so the hang is
|
|
28
|
+
// invisible: the command succeeds and then simply never returns.
|
|
29
|
+
const progress = new ProgressIndicator(`Fetching GitHub issue ${issueLabel}`);
|
|
30
|
+
let issueContent;
|
|
24
31
|
try {
|
|
25
32
|
// Use the GitHub CLI to fetch issue details
|
|
26
|
-
|
|
27
|
-
const issueContent = await execAsync(`gh issue view ${issueId}`);
|
|
28
|
-
progress.stop();
|
|
29
|
-
if (!issueContent) {
|
|
30
|
-
displayWarning(`No content found for GitHub issue ${issueLabel}`);
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
return `GitHub Issue: ${issueLabel}\n\n${issueContent}`;
|
|
33
|
+
issueContent = await execAsync(`gh issue view ${issueId}`);
|
|
34
34
|
}
|
|
35
35
|
catch (error) {
|
|
36
36
|
displayWarning(`
|
|
@@ -39,5 +39,13 @@ Consider checking if gh cli (https://cli.github.com/) is installed and authentic
|
|
|
39
39
|
`);
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
|
+
finally {
|
|
43
|
+
progress.stop();
|
|
44
|
+
}
|
|
45
|
+
if (!issueContent) {
|
|
46
|
+
displayWarning(`No content found for GitHub issue ${issueLabel}`);
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return `GitHub Issue: ${issueLabel}\n\n${issueContent}`;
|
|
42
50
|
}
|
|
43
51
|
//# sourceMappingURL=ghIssueSource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ghIssueSource.js","sourceRoot":"","sources":["../../src/sources/ghIssueSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAEjF,6FAA6F;AAC7F,sFAAsF;AACtF,kFAAkF;AAClF,MAAM,iBAAiB,GAAG,gEAAgE,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,GAAG,CACvB,CAAwB,EACxB,OAA2B;IAE3B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,cAAc,CAAC,iCAAiC,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACrC,cAAc,CACZ,mCAAmC,OAAO,8FAA8F,CACzI,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,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BACU,UAAU,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;;KAE7F,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,QAAQ,CAAC,IAAI,EAAE,CAAC;IAClB,CAAC;IAED,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,cAAc,CAAC,qCAAqC,UAAU,EAAE,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,iBAAiB,UAAU,OAAO,YAAY,EAAE,CAAC;AAC1D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gaunt-sloth/review",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.26",
|
|
4
4
|
"description": "Review functionality for Gaunt Sloth",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Andrew Kondratev",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@langchain/core": "^1.2.3",
|
|
38
38
|
"@langchain/langgraph": "^1.4.8",
|
|
39
|
-
"langchain": "^1.5.
|
|
39
|
+
"langchain": "^1.5.4",
|
|
40
40
|
"zod": "^4.4.3",
|
|
41
|
-
"@gaunt-sloth/core": "2.0.0-alpha.
|
|
41
|
+
"@gaunt-sloth/core": "2.0.0-alpha.26"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"./dist/*",
|