@srobroek/pi-agent-reviewer 0.19.4 → 0.19.6
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/extensions/index.js +29 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## agent-reviewer [0.19.6](https://github.com/srobroek/harness-plugins/compare/agent-reviewer--v0.19.5...agent-reviewer--v0.19.6) (2026-12-05)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **lib:** settle a subprocess whose pipe a descendant holds, and verify cut-off mutations ([#342](https://github.com/srobroek/harness-plugins/issues/342)) ([8fd6bd8](https://github.com/srobroek/harness-plugins/commit/8fd6bd8df1c19fab2618a0965c620093aa1444c6))
|
|
6
|
+
|
|
7
|
+
## agent-reviewer [0.19.5](https://github.com/srobroek/harness-plugins/compare/agent-reviewer--v0.19.4...agent-reviewer--v0.19.5) (2026-12-05)
|
|
8
|
+
|
|
1
9
|
## agent-reviewer [0.19.4](https://github.com/srobroek/harness-plugins/compare/agent-reviewer--v0.19.3...agent-reviewer--v0.19.4) (2026-12-05)
|
|
2
10
|
|
|
3
11
|
## agent-reviewer [0.19.3](https://github.com/srobroek/harness-plugins/compare/agent-reviewer--v0.19.2...agent-reviewer--v0.19.3) (2026-12-05)
|
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ The Pi agents load these required companion packages in their child sessions:
|
|
|
97
97
|
|
|
98
98
|
Install the required Pi packages: `pi-lens`, `pi-web-access`, `@srobroek/pi-code-quality`, `@srobroek/pi-repomix`, `@srobroek/pi-dep-update`, and `@srobroek/pi-whats-new`. Configure the `context7` Pi MCP server in `~/.pi/agent/mcp.json`.
|
|
99
99
|
|
|
100
|
-
Pi-lens keeps `ast_grep_search` and `ast_grep_outline` inactive until `pi_lens_activate_tools` runs; activation takes effect on the next turn. Agents carry no `tools` allowlist, so a child's tool selection is unset (Pi's configured defaults plus the extensions it loads explicitly); `mcp.json` servers such as `context7` reach a child with omitted `tools`, while servers an ambient parent extension registers reach only runner-launched (background) children. `mcp:context7` is no longer selected
|
|
100
|
+
Pi-lens keeps `ast_grep_search` and `ast_grep_outline` inactive until `pi_lens_activate_tools` runs; activation takes effect on the next turn. Agents carry no `tools` allowlist, so a child's tool selection is unset (Pi's configured defaults plus the extensions it loads explicitly); `mcp.json` servers such as `context7` reach a child with omitted `tools`, while servers an ambient parent extension registers reach only runner-launched (background) children. `mcp:context7` is no longer selected. An explicit `tools` override must name `mcp:context7` for the whole server, or `mcp:context7/<tool>` for one tool (verified in harness-plugins-pous.6).
|
|
101
101
|
|
|
102
102
|
These agents are read-only by prompt instruction, not by tool restriction. To get a review or challenge as a file, pass the `output` option of the `subagent` call: pi-subagents saves the agent's final reply to that path. Give an absolute path for a file in the project; pi-subagents puts a relative `output` path under the run's artifact directory.
|
|
103
103
|
|
package/extensions/index.js
CHANGED
|
@@ -118,6 +118,8 @@ function filterDriverOverrides(listing) {
|
|
|
118
118
|
import { constants } from "os";
|
|
119
119
|
var EXIT_GRACE_MS = 2000;
|
|
120
120
|
var EXIT_POLL_MS = 100;
|
|
121
|
+
var PIPE_DRAIN_MS = 2000;
|
|
122
|
+
var DRAIN_EXTRA_TURNS = 2;
|
|
121
123
|
function goneWatch(graceMs, pollMs) {
|
|
122
124
|
const polls = Math.max(1, Math.ceil(graceMs / Math.max(1, pollMs)));
|
|
123
125
|
let since = null;
|
|
@@ -184,6 +186,7 @@ function capture(stream) {
|
|
|
184
186
|
}
|
|
185
187
|
function supervise(child, options = {}) {
|
|
186
188
|
const grace = Math.max(0, options.graceMs ?? EXIT_GRACE_MS);
|
|
189
|
+
const drainMs = Math.max(0, options.drainMs ?? PIPE_DRAIN_MS);
|
|
187
190
|
const pollMs = Math.max(1, options.pollMs ?? EXIT_POLL_MS);
|
|
188
191
|
const alive = options.alive ?? processAlive;
|
|
189
192
|
const group = options.group ?? false;
|
|
@@ -197,6 +200,7 @@ function supervise(child, options = {}) {
|
|
|
197
200
|
const gone = goneWatch(grace, pollMs);
|
|
198
201
|
let deadline;
|
|
199
202
|
let graceTimer;
|
|
203
|
+
let drainTimer;
|
|
200
204
|
const settle = (run) => {
|
|
201
205
|
if (settled)
|
|
202
206
|
return;
|
|
@@ -204,6 +208,7 @@ function supervise(child, options = {}) {
|
|
|
204
208
|
clearTimeout(deadline);
|
|
205
209
|
clearTimeout(graceTimer);
|
|
206
210
|
clearInterval(poller);
|
|
211
|
+
clearTimeout(drainTimer);
|
|
207
212
|
signal?.removeEventListener("abort", onAbort);
|
|
208
213
|
resolve(run);
|
|
209
214
|
};
|
|
@@ -227,7 +232,8 @@ function supervise(child, options = {}) {
|
|
|
227
232
|
end("lost");
|
|
228
233
|
}, pollMs);
|
|
229
234
|
unref(poller);
|
|
230
|
-
|
|
235
|
+
const bounded = timeoutMs !== undefined && timeoutMs > 0 && Number.isFinite(timeoutMs);
|
|
236
|
+
if (bounded) {
|
|
231
237
|
deadline = setTimeout(() => end("timeout"), timeoutMs);
|
|
232
238
|
if (options.unref)
|
|
233
239
|
unref(deadline);
|
|
@@ -235,8 +241,28 @@ function supervise(child, options = {}) {
|
|
|
235
241
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
236
242
|
if (signal?.aborted)
|
|
237
243
|
onAbort();
|
|
238
|
-
child.exited.then(() => {
|
|
244
|
+
child.exited.then((exitCode) => {
|
|
239
245
|
exitSeen = true;
|
|
246
|
+
if (bounded || ended !== null || settled)
|
|
247
|
+
return;
|
|
248
|
+
let turns = 0;
|
|
249
|
+
const drain = () => {
|
|
250
|
+
if (ended !== null || settled)
|
|
251
|
+
return;
|
|
252
|
+
if (turns++ < DRAIN_EXTRA_TURNS) {
|
|
253
|
+
drainTimer = setTimeout(drain, 0);
|
|
254
|
+
if (options.unref)
|
|
255
|
+
unref(drainTimer);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
out.cancel();
|
|
259
|
+
err.cancel();
|
|
260
|
+
const signalCode = signalName(child.signalCode);
|
|
261
|
+
settle({ kind: "incomplete", exitCode, signalCode, stdout: out.snapshot(), stderr: err.snapshot() });
|
|
262
|
+
};
|
|
263
|
+
drainTimer = setTimeout(drain, drainMs);
|
|
264
|
+
if (options.unref)
|
|
265
|
+
unref(drainTimer);
|
|
240
266
|
}, () => {
|
|
241
267
|
return;
|
|
242
268
|
});
|
|
@@ -453,7 +479,7 @@ async function gitRead(params, cwd, signal) {
|
|
|
453
479
|
${note}`, isError: false, details: { args, exitCode: null, truncated: true } };
|
|
454
480
|
}
|
|
455
481
|
if (run.exitCode === undefined) {
|
|
456
|
-
const why = run.ended === "timeout" ? `timed out after ${GIT_READ_TIMEOUT_MS / 1000}s` : "ended without an exit status";
|
|
482
|
+
const why = run.ended === "timeout" ? `timed out after ${GIT_READ_TIMEOUT_MS / 1000}s` : run.ended === "incomplete" ? "exited, but a process it started kept its output open; the output is incomplete" : "ended without an exit status";
|
|
457
483
|
return { text: `git ${args.join(" ")} ${why}.
|
|
458
484
|
${run.stderr}`.trim(), isError: true, details: { args, exitCode: null, truncated: false } };
|
|
459
485
|
}
|
package/package.json
CHANGED