@srobroek/pi-repomix 0.7.0 → 0.8.1

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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## repomix [0.8.1](https://github.com/srobroek/harness-plugins/compare/repomix--v0.8.0...repomix--v0.8.1) (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
+ ## repomix [0.8.0](https://github.com/srobroek/harness-plugins/compare/repomix--v0.7.0...repomix--v0.8.0) (2026-12-02)
8
+
9
+ ### Features
10
+
11
+ * **beads:** add beads-hygiene ledger audit skill and ledger-auditor agents ([611b67a](https://github.com/srobroek/harness-plugins/commit/611b67a0a6e02ec7a1917170843feb946766a4a7))
12
+
1
13
  ## repomix [0.7.0](https://github.com/srobroek/harness-plugins/compare/repomix--v0.6.3...repomix--v0.7.0) (2026-11-26)
2
14
 
3
15
  ### Features
@@ -48,6 +48,8 @@ import { basename, isAbsolute, join, resolve } from "path";
48
48
  import { constants } from "os";
49
49
  var EXIT_GRACE_MS = 2000;
50
50
  var EXIT_POLL_MS = 100;
51
+ var PIPE_DRAIN_MS = 2000;
52
+ var DRAIN_EXTRA_TURNS = 2;
51
53
  function goneWatch(graceMs, pollMs) {
52
54
  const polls = Math.max(1, Math.ceil(graceMs / Math.max(1, pollMs)));
53
55
  let since = null;
@@ -114,6 +116,7 @@ function capture(stream) {
114
116
  }
115
117
  function supervise(child, options = {}) {
116
118
  const grace = Math.max(0, options.graceMs ?? EXIT_GRACE_MS);
119
+ const drainMs = Math.max(0, options.drainMs ?? PIPE_DRAIN_MS);
117
120
  const pollMs = Math.max(1, options.pollMs ?? EXIT_POLL_MS);
118
121
  const alive = options.alive ?? processAlive;
119
122
  const group = options.group ?? false;
@@ -127,6 +130,7 @@ function supervise(child, options = {}) {
127
130
  const gone = goneWatch(grace, pollMs);
128
131
  let deadline;
129
132
  let graceTimer;
133
+ let drainTimer;
130
134
  const settle = (run) => {
131
135
  if (settled)
132
136
  return;
@@ -134,6 +138,7 @@ function supervise(child, options = {}) {
134
138
  clearTimeout(deadline);
135
139
  clearTimeout(graceTimer);
136
140
  clearInterval(poller);
141
+ clearTimeout(drainTimer);
137
142
  signal?.removeEventListener("abort", onAbort);
138
143
  resolve(run);
139
144
  };
@@ -157,7 +162,8 @@ function supervise(child, options = {}) {
157
162
  end("lost");
158
163
  }, pollMs);
159
164
  unref(poller);
160
- if (timeoutMs !== undefined && timeoutMs > 0 && Number.isFinite(timeoutMs)) {
165
+ const bounded = timeoutMs !== undefined && timeoutMs > 0 && Number.isFinite(timeoutMs);
166
+ if (bounded) {
161
167
  deadline = setTimeout(() => end("timeout"), timeoutMs);
162
168
  if (options.unref)
163
169
  unref(deadline);
@@ -165,8 +171,28 @@ function supervise(child, options = {}) {
165
171
  signal?.addEventListener("abort", onAbort, { once: true });
166
172
  if (signal?.aborted)
167
173
  onAbort();
168
- child.exited.then(() => {
174
+ child.exited.then((exitCode) => {
169
175
  exitSeen = true;
176
+ if (bounded || ended !== null || settled)
177
+ return;
178
+ let turns = 0;
179
+ const drain = () => {
180
+ if (ended !== null || settled)
181
+ return;
182
+ if (turns++ < DRAIN_EXTRA_TURNS) {
183
+ drainTimer = setTimeout(drain, 0);
184
+ if (options.unref)
185
+ unref(drainTimer);
186
+ return;
187
+ }
188
+ out.cancel();
189
+ err.cancel();
190
+ const signalCode = signalName(child.signalCode);
191
+ settle({ kind: "incomplete", exitCode, signalCode, stdout: out.snapshot(), stderr: err.snapshot() });
192
+ };
193
+ drainTimer = setTimeout(drain, drainMs);
194
+ if (options.unref)
195
+ unref(drainTimer);
170
196
  }, () => {
171
197
  return;
172
198
  });
@@ -368,7 +394,7 @@ function tail(text) {
368
394
  var fmt = (n) => n === null ? "?" : n.toLocaleString("en-US");
369
395
  function interpretPack(run, output, style, timeoutSeconds, exists) {
370
396
  if (run.kind !== "exited") {
371
- const why = run.kind === "timeout" ? `repomix did not finish within ${timeoutSeconds}s and was killed` : run.kind === "aborted" ? "repomix was cancelled" : "repomix ended without an exit status";
397
+ const why = run.kind === "timeout" ? `repomix did not finish within ${timeoutSeconds}s and was killed` : run.kind === "aborted" ? "repomix was cancelled" : run.kind === "incomplete" ? `repomix exited ${run.exitCode}, but a process it started kept its output open; the output is incomplete` : "repomix ended without an exit status";
372
398
  return { ok: false, status: run.kind, text: [why, tail(run.stderr)].filter(Boolean).join(`
373
399
  `) };
374
400
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srobroek/pi-repomix",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "Pack a local or remote repo into one file with repomix for bulk context: external repos, module packs and version diffs.",
5
5
  "keywords": [
6
6
  "pi-package"