kantban-cli 0.1.33 → 0.1.35

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/dist/index.js CHANGED
@@ -31,10 +31,10 @@ async function main() {
31
31
  }
32
32
  case "pipeline": {
33
33
  if (args[0] === "stop") {
34
- const { stopPipeline } = await import("./pipeline-7CMDTEI2.js");
34
+ const { stopPipeline } = await import("./pipeline-ZI7Y25IA.js");
35
35
  await stopPipeline(args.slice(1));
36
36
  } else {
37
- const { runPipeline } = await import("./pipeline-7CMDTEI2.js");
37
+ const { runPipeline } = await import("./pipeline-ZI7Y25IA.js");
38
38
  await runPipeline(client, args);
39
39
  }
40
40
  break;
@@ -3597,6 +3597,7 @@ var GeminiJsonlParser = class {
3597
3597
 
3598
3598
  // src/providers/gemini-provider.ts
3599
3599
  var GEMINI_TIMEOUT_MS = 60 * 60 * 1e3;
3600
+ var GEMINI_STARTUP_TIMEOUT_MS = 120 * 1e3;
3600
3601
  var TOOL_NAME_MAP = {
3601
3602
  Write: "write_file",
3602
3603
  Edit: "replace",
@@ -3714,11 +3715,30 @@ var GeminiProvider = class _GeminiProvider {
3714
3715
  parser.onError = (err) => process.stderr.write(`[gemini-jsonl] ${err.message}
3715
3716
  `);
3716
3717
  let stderr = "";
3717
- child.stdout?.on("data", (chunk) => parser.feed(chunk.toString()));
3718
+ let lastStderrLine = "";
3719
+ let gotStdout = false;
3720
+ child.stdout?.on("data", (chunk) => {
3721
+ gotStdout = true;
3722
+ parser.feed(chunk.toString());
3723
+ });
3718
3724
  child.stderr?.on("data", (chunk) => {
3719
- stderr += chunk.toString();
3725
+ const text = chunk.toString();
3726
+ stderr += text;
3727
+ const lines = text.split("\n").filter((l) => l.trim());
3728
+ if (lines.length) lastStderrLine = lines[lines.length - 1];
3720
3729
  });
3721
3730
  child.stdin?.end();
3731
+ const startupTimer = setTimeout(() => {
3732
+ if (!gotStdout) {
3733
+ const hint = stderr.includes("429") || stderr.includes("RESOURCE_EXHAUSTED") ? "model is rate-limited (429)" : stderr.includes("Attempt") ? "retrying API errors" : "model may be unavailable";
3734
+ process.stderr.write(`[gemini] No output after ${GEMINI_STARTUP_TIMEOUT_MS / 1e3}s \u2014 ${hint}. Last stderr: ${lastStderrLine.slice(0, 200)}
3735
+ `);
3736
+ try {
3737
+ child.kill("SIGTERM");
3738
+ } catch {
3739
+ }
3740
+ }
3741
+ }, GEMINI_STARTUP_TIMEOUT_MS);
3722
3742
  if (request.abortSignal) {
3723
3743
  request.abortSignal.addEventListener("abort", () => {
3724
3744
  try {
@@ -3744,6 +3764,7 @@ var GeminiProvider = class _GeminiProvider {
3744
3764
  const finish = (code, errorMsg) => {
3745
3765
  if (resolved) return;
3746
3766
  resolved = true;
3767
+ clearTimeout(startupTimer);
3747
3768
  clearTimeout(timeoutHandle);
3748
3769
  if (killTimer) clearTimeout(killTimer);
3749
3770
  parser.flush();
@@ -4853,4 +4874,4 @@ export {
4853
4874
  runPipeline,
4854
4875
  stopPipeline
4855
4876
  };
4856
- //# sourceMappingURL=pipeline-7CMDTEI2.js.map
4877
+ //# sourceMappingURL=pipeline-ZI7Y25IA.js.map