kantban-cli 0.1.25 → 0.1.27

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-IYKEQZWN.js");
34
+ const { stopPipeline } = await import("./pipeline-TYHC3WQ6.js");
35
35
  await stopPipeline(args.slice(1));
36
36
  } else {
37
- const { runPipeline } = await import("./pipeline-IYKEQZWN.js");
37
+ const { runPipeline } = await import("./pipeline-TYHC3WQ6.js");
38
38
  await runPipeline(client, args);
39
39
  }
40
40
  break;
@@ -3628,7 +3628,7 @@ function resolveHookScriptPath() {
3628
3628
  return null;
3629
3629
  }
3630
3630
  }
3631
- var GeminiProvider = class {
3631
+ var GeminiProvider = class _GeminiProvider {
3632
3632
  id = "gemini";
3633
3633
  displayName = "Gemini CLI";
3634
3634
  capabilities() {
@@ -3743,9 +3743,10 @@ var GeminiProvider = class {
3743
3743
  if (killTimer) clearTimeout(killTimer);
3744
3744
  parser.flush();
3745
3745
  const usage = parser.getUsage();
3746
+ const rawOutput = errorMsg ?? (parser.getLastOutput() || _GeminiProvider.stripCliPreamble(stderr));
3746
3747
  const result = {
3747
3748
  exitCode: (code === 53 ? 0 : code) ?? 1,
3748
- output: errorMsg ?? (parser.getLastOutput() || stderr),
3749
+ output: rawOutput,
3749
3750
  toolCallCount: parser.getToolCallCount(),
3750
3751
  usage,
3751
3752
  durationMs: Date.now() - startTime
@@ -3853,6 +3854,35 @@ cat > "$STDIN_FILE"
3853
3854
  node "${hookScript}" "${event}" "${configFile}" < "$STDIN_FILE"
3854
3855
  `;
3855
3856
  }
3857
+ /** Strip Gemini CLI startup messages from stderr output.
3858
+ * When the JSONL parser finds no result event, the output falls back to stderr
3859
+ * which contains lines like "YOLO mode is enabled..." and "Loaded cached credentials."
3860
+ * that corrupt JSON parsing in downstream consumers (advisor, light-call). */
3861
+ static stripCliPreamble(text) {
3862
+ const lines = text.split("\n");
3863
+ const jsonStart = lines.findIndex((line) => {
3864
+ const trimmed = line.trim();
3865
+ return trimmed.startsWith("{") || trimmed.startsWith("[");
3866
+ });
3867
+ if (jsonStart >= 0) {
3868
+ return lines.slice(jsonStart).join("\n").trim();
3869
+ }
3870
+ const preamblePatterns = [
3871
+ /^YOLO mode is enabled\./,
3872
+ /^Loaded cached credentials\./,
3873
+ /^Sandbox mode: /,
3874
+ /^WARNING:/,
3875
+ /^These hooks will be executed\./,
3876
+ /^please review the project/,
3877
+ /^- \//
3878
+ // indented hook paths
3879
+ ];
3880
+ const filtered = lines.filter((line) => {
3881
+ const trimmed = line.trim();
3882
+ return trimmed !== "" && !preamblePatterns.some((p) => p.test(trimmed));
3883
+ });
3884
+ return filtered.join("\n");
3885
+ }
3856
3886
  copySettingsToDir(settingsDir, targetDir) {
3857
3887
  try {
3858
3888
  const sourceFile = join2(settingsDir, ".gemini", "settings.json");
@@ -4808,4 +4838,4 @@ export {
4808
4838
  runPipeline,
4809
4839
  stopPipeline
4810
4840
  };
4811
- //# sourceMappingURL=pipeline-IYKEQZWN.js.map
4841
+ //# sourceMappingURL=pipeline-TYHC3WQ6.js.map