kantban-cli 0.1.31 → 0.1.32
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-
|
|
34
|
+
const { stopPipeline } = await import("./pipeline-QBGNH3U6.js");
|
|
35
35
|
await stopPipeline(args.slice(1));
|
|
36
36
|
} else {
|
|
37
|
-
const { runPipeline } = await import("./pipeline-
|
|
37
|
+
const { runPipeline } = await import("./pipeline-QBGNH3U6.js");
|
|
38
38
|
await runPipeline(client, args);
|
|
39
39
|
}
|
|
40
40
|
break;
|
|
@@ -3532,19 +3532,22 @@ var GeminiJsonlParser = class {
|
|
|
3532
3532
|
const eventType = raw.type;
|
|
3533
3533
|
if (eventType === "message") {
|
|
3534
3534
|
if (raw.role === "assistant" && typeof raw.content === "string") {
|
|
3535
|
+
if (raw.delta) this.lastOutput += raw.content;
|
|
3536
|
+
else this.lastOutput = raw.content;
|
|
3535
3537
|
this.onEvent({ type: "text", text: raw.content });
|
|
3536
3538
|
}
|
|
3537
3539
|
} else if (eventType === "tool_use") {
|
|
3538
3540
|
this.toolCallCount++;
|
|
3539
3541
|
this.onEvent({
|
|
3540
3542
|
type: "tool_call",
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
+
// stream-json uses tool_name; json format uses name
|
|
3544
|
+
tool: raw.tool_name ?? raw.name ?? "unknown",
|
|
3545
|
+
input: raw.parameters ?? raw.args ?? raw.input
|
|
3543
3546
|
});
|
|
3544
3547
|
} else if (eventType === "tool_result") {
|
|
3545
3548
|
this.onEvent({
|
|
3546
3549
|
type: "tool_result",
|
|
3547
|
-
tool: raw.name ?? "unknown",
|
|
3550
|
+
tool: raw.tool_name ?? raw.name ?? "unknown",
|
|
3548
3551
|
output: raw.output ?? raw.result
|
|
3549
3552
|
});
|
|
3550
3553
|
} else if (eventType === "result" || raw.session_id && raw.stats) {
|
|
@@ -3554,12 +3557,12 @@ var GeminiJsonlParser = class {
|
|
|
3554
3557
|
if (inTok || outTok) {
|
|
3555
3558
|
this.onEvent({ type: "usage", inputTokens: inTok, outputTokens: outTok });
|
|
3556
3559
|
}
|
|
3557
|
-
const
|
|
3560
|
+
const statsObj = raw.stats;
|
|
3561
|
+
if (statsObj?.tool_calls) this.toolCallCount = Math.max(this.toolCallCount, statsObj.tool_calls);
|
|
3562
|
+
const tools = statsObj?.tools;
|
|
3558
3563
|
if (tools?.totalCalls) this.toolCallCount = Math.max(this.toolCallCount, tools.totalCalls);
|
|
3559
|
-
if (typeof raw.response === "string")
|
|
3560
|
-
|
|
3561
|
-
this.onEvent({ type: "done", result: raw.response });
|
|
3562
|
-
}
|
|
3564
|
+
if (typeof raw.response === "string") this.lastOutput = raw.response;
|
|
3565
|
+
this.onEvent({ type: "done", result: this.lastOutput });
|
|
3563
3566
|
} else if (eventType === "error") {
|
|
3564
3567
|
const msg = raw.message ?? "unknown error";
|
|
3565
3568
|
this.lastOutput = msg;
|
|
@@ -3776,13 +3779,17 @@ var GeminiProvider = class _GeminiProvider {
|
|
|
3776
3779
|
request.prompt,
|
|
3777
3780
|
"--yolo",
|
|
3778
3781
|
"--output-format",
|
|
3779
|
-
"json"
|
|
3782
|
+
"stream-json"
|
|
3780
3783
|
];
|
|
3781
3784
|
if (request.model) args.push("--model", request.model);
|
|
3782
3785
|
if (!request.workingDirectory) {
|
|
3783
3786
|
const projectRoot = process.cwd();
|
|
3784
3787
|
args.push("--include-directories", projectRoot);
|
|
3785
3788
|
}
|
|
3789
|
+
if (request.mcpConfig && Object.keys(request.mcpConfig.servers).length > 0) {
|
|
3790
|
+
const serverNames = Object.keys(request.mcpConfig.servers);
|
|
3791
|
+
args.push("--allowed-mcp-server-names", ...serverNames);
|
|
3792
|
+
}
|
|
3786
3793
|
return args;
|
|
3787
3794
|
}
|
|
3788
3795
|
writeGeminiSettings(request, degraded) {
|
|
@@ -4845,4 +4852,4 @@ export {
|
|
|
4845
4852
|
runPipeline,
|
|
4846
4853
|
stopPipeline
|
|
4847
4854
|
};
|
|
4848
|
-
//# sourceMappingURL=pipeline-
|
|
4855
|
+
//# sourceMappingURL=pipeline-QBGNH3U6.js.map
|