@whittlelabs/sifter 0.21.0 → 0.22.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.
Files changed (3) hide show
  1. package/bin.js +17 -8
  2. package/bin.js.map +2 -2
  3. package/package.json +1 -1
package/bin.js CHANGED
@@ -20051,18 +20051,27 @@ var require_claude_code = __commonJS({
20051
20051
  onResult: () => reporter.flush()
20052
20052
  }) : null;
20053
20053
  const decoder = tap ? new string_decoder_1.StringDecoder("utf8") : null;
20054
+ child.stdin.write(prompt);
20055
+ child.stdin.end();
20056
+ const timeout = this.config.timeout ?? DEFAULT_TIMEOUT;
20057
+ let timer;
20058
+ const armIdleTimer = () => {
20059
+ if (settled)
20060
+ return;
20061
+ if (timer)
20062
+ clearTimeout(timer);
20063
+ timer = setTimeout(() => {
20064
+ child.kill("SIGTERM");
20065
+ settle(() => reject(new Error(`Claude Code produced no output for ${timeout}ms; killed as hung`)));
20066
+ }, timeout);
20067
+ };
20068
+ armIdleTimer();
20054
20069
  child.stdout.on("data", (chunk) => {
20055
20070
  stdoutChunks.push(chunk);
20071
+ armIdleTimer();
20056
20072
  if (tap && decoder)
20057
20073
  tap.push(decoder.write(chunk));
20058
20074
  });
20059
- child.stdin.write(prompt);
20060
- child.stdin.end();
20061
- const timeout = this.config.timeout ?? DEFAULT_TIMEOUT;
20062
- const timer = setTimeout(() => {
20063
- child.kill("SIGTERM");
20064
- settle(() => reject(new Error(`Claude Code timed out after ${timeout}ms`)));
20065
- }, timeout);
20066
20075
  function onAbort() {
20067
20076
  child.kill("SIGTERM");
20068
20077
  settle(() => reject(new Error("Dispatch aborted")));
@@ -22293,7 +22302,7 @@ var import_path = require("path");
22293
22302
  var import_promises = require("fs/promises");
22294
22303
  var import_yaml = __toESM(require_dist());
22295
22304
  var import_shuttle = __toESM(require_dist5());
22296
- var buildVersion = true ? "0.21.0" : pkg.version;
22305
+ var buildVersion = true ? "0.22.1" : pkg.version;
22297
22306
  var sifterBrand = {
22298
22307
  product: {
22299
22308
  id: "sifter",