agentlas 1.0.27 → 1.0.28

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.
@@ -644,15 +644,53 @@ function create(ctx, deps = {}) {
644
644
  process.stderr.write("Hephaestus failed: Python 3.9+ was not found.\n");
645
645
  return Promise.resolve(1);
646
646
  }
647
+ // Core writes nothing until its final payload. `hep search` measured 29.7s
648
+ // of complete silence on every stream — indistinguishable from a hang, and
649
+ // the command that takes longest is the one a newcomer tries first.
650
+ // stdout carries machine-readable JSON, so the heartbeat goes to stderr
651
+ // only, and only when stderr is a terminal: piping or redirecting must stay
652
+ // byte-identical for anything parsing this.
653
+ const stopHeartbeat = helpOnly ? null : startQuietChildHeartbeat(args);
647
654
  return new Promise((resolve) => {
648
655
  child.on("error", (e) => {
656
+ if (stopHeartbeat) stopHeartbeat();
649
657
  process.stderr.write(`Hephaestus failed: ${e.message}\n`);
650
658
  resolve(1);
651
659
  });
652
- child.on("close", (code) => resolve(code == null ? 0 : code));
660
+ child.on("close", (code) => {
661
+ if (stopHeartbeat) stopHeartbeat();
662
+ resolve(code == null ? 0 : code);
663
+ });
653
664
  });
654
665
  }
655
666
 
667
+ /**
668
+ * Report elapsed time on stderr while a passthrough child stays quiet.
669
+ * Returns a stop function; returns null when there is nothing safe to write to.
670
+ */
671
+ function startQuietChildHeartbeat(args) {
672
+ if (!process.stderr.isTTY) return null;
673
+ const label = args.filter((a) => !String(a).startsWith("-")).slice(0, 2).join(" ") || "hephaestus";
674
+ const started = Date.now();
675
+ let painted = false;
676
+ const paint = () => {
677
+ const secs = Math.round((Date.now() - started) / 1000);
678
+ process.stderr.write(`\r${label} … ${secs}s`);
679
+ painted = true;
680
+ };
681
+ // Stay silent through the common fast case; only speak once it is slow
682
+ // enough that a user would start wondering.
683
+ const first = setTimeout(() => { paint(); }, 1500);
684
+ const timer = setInterval(paint, 1000);
685
+ if (typeof timer.unref === "function") timer.unref();
686
+ if (typeof first.unref === "function") first.unref();
687
+ return () => {
688
+ clearTimeout(first);
689
+ clearInterval(timer);
690
+ if (painted) process.stderr.write("\r");
691
+ };
692
+ }
693
+
656
694
  const HEP_USAGE = [
657
695
  "agentlas hep <hephaestus 서브커맨드…> — 엔진 전 기능 네이티브 패스스루",
658
696
  "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentlas",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "Agentlas project terminal — run project controllers and task-scoped agent teams from the terminal. Standalone: no desktop app process required.",
5
5
  "bin": {
6
6
  "agentlas": "bin/agentlas.cjs"