jinzd-ai-cli 0.4.39 → 0.4.41
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/{chunk-E7OZDXCK.js → chunk-6D2OOASL.js} +1 -1
- package/dist/{chunk-NCY3EPA6.js → chunk-BR2XO6Q3.js} +3 -3
- package/dist/{chunk-NP3647PM.js → chunk-QJLPKZYB.js} +1 -1
- package/dist/{chunk-XRWQAZAC.js → chunk-VHX5XAXQ.js} +8 -8
- package/dist/{hub-PIWTW5RI.js → hub-JTS2YUO3.js} +1 -1
- package/dist/index.js +12 -11
- package/dist/{run-tests-6MNCHVPH.js → run-tests-KNAG64KY.js} +1 -1
- package/dist/{run-tests-E6KEK7CK.js → run-tests-LLX7ZVEA.js} +1 -1
- package/dist/{server-4NK3UFNS.js → server-QF7CMZE4.js} +9 -9
- package/dist/{task-orchestrator-XFQD6X5A.js → task-orchestrator-7PHMEPCO.js} +2 -2
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
10
10
|
SUBAGENT_MAX_ROUNDS_LIMIT,
|
|
11
11
|
runTestsTool
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6D2OOASL.js";
|
|
13
13
|
|
|
14
14
|
// src/tools/builtin/bash.ts
|
|
15
15
|
import { execSync } from "child_process";
|
|
@@ -2386,13 +2386,13 @@ var runInteractiveTool = {
|
|
|
2386
2386
|
args: {
|
|
2387
2387
|
type: "array",
|
|
2388
2388
|
description: 'Arguments array for the executable, e.g. ["workspace/guess.py"] or ["-c", "print(1)"]',
|
|
2389
|
-
items: { type: "string" },
|
|
2389
|
+
items: { type: "string", description: "A single argument string" },
|
|
2390
2390
|
required: true
|
|
2391
2391
|
},
|
|
2392
2392
|
stdin_lines: {
|
|
2393
2393
|
type: "array",
|
|
2394
2394
|
description: `Input lines to feed to the program's stdin in order. E.g. for a guessing game: ["50", "25", "37"]. Each line gets a newline appended automatically.`,
|
|
2395
|
-
items: { type: "string" },
|
|
2395
|
+
items: { type: "string", description: "A single stdin input line" },
|
|
2396
2396
|
required: true
|
|
2397
2397
|
},
|
|
2398
2398
|
timeout: {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
ProviderNotFoundError,
|
|
8
8
|
RateLimitError,
|
|
9
9
|
schemaToJsonSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BR2XO6Q3.js";
|
|
11
11
|
import {
|
|
12
12
|
APP_NAME,
|
|
13
13
|
CONFIG_DIR_NAME,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
MCP_TOOL_PREFIX,
|
|
21
21
|
PLUGINS_DIR_NAME,
|
|
22
22
|
VERSION
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-6D2OOASL.js";
|
|
24
24
|
|
|
25
25
|
// src/config/config-manager.ts
|
|
26
26
|
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
@@ -555,6 +555,8 @@ var ClaudeProvider = class extends BaseProvider {
|
|
|
555
555
|
const extraMessages = request._extraMessages ?? [];
|
|
556
556
|
const allMessages = [...baseMessages, ...extraMessages];
|
|
557
557
|
const { thinking, temperature } = this.buildThinkingParams(request);
|
|
558
|
+
let doneEmitted = false;
|
|
559
|
+
const rawContentBlocks = [];
|
|
558
560
|
try {
|
|
559
561
|
const stream = this.client.messages.stream({
|
|
560
562
|
model: request.model,
|
|
@@ -567,8 +569,6 @@ var ClaudeProvider = class extends BaseProvider {
|
|
|
567
569
|
}, { signal: request.signal });
|
|
568
570
|
let currentBlockType = null;
|
|
569
571
|
let currentToolIndex = 0;
|
|
570
|
-
let doneEmitted2 = false;
|
|
571
|
-
const rawContentBlocks2 = [];
|
|
572
572
|
let currentBlockData = {};
|
|
573
573
|
for await (const event of stream) {
|
|
574
574
|
if (event.type === "content_block_start") {
|
|
@@ -627,20 +627,20 @@ var ClaudeProvider = class extends BaseProvider {
|
|
|
627
627
|
}
|
|
628
628
|
delete currentBlockData._inputJson;
|
|
629
629
|
}
|
|
630
|
-
|
|
630
|
+
rawContentBlocks.push(currentBlockData);
|
|
631
631
|
currentBlockType = null;
|
|
632
632
|
currentBlockData = {};
|
|
633
633
|
} else if (event.type === "message_delta") {
|
|
634
634
|
const usage = event.usage;
|
|
635
635
|
if (usage) {
|
|
636
|
-
|
|
636
|
+
doneEmitted = true;
|
|
637
637
|
yield {
|
|
638
638
|
type: "done",
|
|
639
639
|
usage: {
|
|
640
640
|
inputTokens: usage.input_tokens ?? 0,
|
|
641
641
|
outputTokens: usage.output_tokens ?? 0
|
|
642
642
|
},
|
|
643
|
-
rawContent:
|
|
643
|
+
rawContent: rawContentBlocks
|
|
644
644
|
};
|
|
645
645
|
}
|
|
646
646
|
}
|
|
@@ -1073,7 +1073,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1073
1073
|
let thinkingStarted = false;
|
|
1074
1074
|
for await (const chunk of stream) {
|
|
1075
1075
|
const choice = chunk.choices[0];
|
|
1076
|
-
const done = choice?.finish_reason != null
|
|
1076
|
+
const done = choice?.finish_reason != null;
|
|
1077
1077
|
if (!choice && chunk.usage) {
|
|
1078
1078
|
yield {
|
|
1079
1079
|
delta: "",
|
|
@@ -387,7 +387,7 @@ ${content}`);
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
390
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
390
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-7PHMEPCO.js");
|
|
391
391
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
392
392
|
let interrupted = false;
|
|
393
393
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
saveDevState,
|
|
25
25
|
sessionHasMeaningfulContent,
|
|
26
26
|
setupProxy
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-VHX5XAXQ.js";
|
|
28
28
|
import {
|
|
29
29
|
ToolExecutor,
|
|
30
30
|
ToolRegistry,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
spawnAgentContext,
|
|
38
38
|
theme,
|
|
39
39
|
undoStack
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-BR2XO6Q3.js";
|
|
41
41
|
import {
|
|
42
42
|
fileCheckpoints
|
|
43
43
|
} from "./chunk-4BKXL7SM.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
SKILLS_DIR_NAME,
|
|
62
62
|
VERSION,
|
|
63
63
|
buildUserIdentityPrompt
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-6D2OOASL.js";
|
|
65
65
|
|
|
66
66
|
// src/index.ts
|
|
67
67
|
import { program } from "commander";
|
|
@@ -2022,7 +2022,7 @@ ${hint}` : "")
|
|
|
2022
2022
|
const sub = args[0];
|
|
2023
2023
|
if (sub === "list" || !sub) {
|
|
2024
2024
|
const msgs = session.messages;
|
|
2025
|
-
console.log(theme.
|
|
2025
|
+
console.log(theme.heading(`
|
|
2026
2026
|
Conversation messages (${msgs.length} total):
|
|
2027
2027
|
`));
|
|
2028
2028
|
for (let i = 0; i < msgs.length; i++) {
|
|
@@ -2099,7 +2099,7 @@ ${hint}` : "")
|
|
|
2099
2099
|
usage: "/test [command|filter]",
|
|
2100
2100
|
async execute(args, ctx) {
|
|
2101
2101
|
try {
|
|
2102
|
-
const { executeTests } = await import("./run-tests-
|
|
2102
|
+
const { executeTests } = await import("./run-tests-LLX7ZVEA.js");
|
|
2103
2103
|
const argStr = args.join(" ").trim();
|
|
2104
2104
|
let testArgs = {};
|
|
2105
2105
|
if (argStr) {
|
|
@@ -5115,10 +5115,11 @@ You have a maximum of ${MAX_TOOL_ROUNDS} tool call rounds for this task. Plan ef
|
|
|
5115
5115
|
process.stdout.write(theme.dim(" (Press ") + theme.info("n") + theme.dim(" or ") + theme.info("Esc") + theme.dim(" to stop)\n"));
|
|
5116
5116
|
this.teardownInterjectionListener();
|
|
5117
5117
|
const pauseResponse = await new Promise((resolve3) => {
|
|
5118
|
-
const
|
|
5119
|
-
|
|
5118
|
+
const rlWithOutput = this.rl;
|
|
5119
|
+
const savedOutput = rlWithOutput.output;
|
|
5120
|
+
rlWithOutput.output = process.stdout;
|
|
5120
5121
|
this.rl.question(theme.warning(" \u25B8 "), (answer) => {
|
|
5121
|
-
|
|
5122
|
+
rlWithOutput.output = savedOutput;
|
|
5122
5123
|
resolve3(answer.trim());
|
|
5123
5124
|
});
|
|
5124
5125
|
});
|
|
@@ -5470,7 +5471,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5470
5471
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5471
5472
|
process.exit(1);
|
|
5472
5473
|
}
|
|
5473
|
-
const { startWebServer } = await import("./server-
|
|
5474
|
+
const { startWebServer } = await import("./server-QF7CMZE4.js");
|
|
5474
5475
|
await startWebServer({ port, host: options.host });
|
|
5475
5476
|
});
|
|
5476
5477
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -5703,7 +5704,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
5703
5704
|
}),
|
|
5704
5705
|
config.get("customProviders")
|
|
5705
5706
|
);
|
|
5706
|
-
const { startHub } = await import("./hub-
|
|
5707
|
+
const { startHub } = await import("./hub-JTS2YUO3.js");
|
|
5707
5708
|
await startHub(
|
|
5708
5709
|
{
|
|
5709
5710
|
topic: topic ?? "",
|
|
@@ -5714,7 +5715,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
5714
5715
|
mode: options.task === true ? "task" : void 0,
|
|
5715
5716
|
maxRounds: options.maxRounds ? parseInt(options.maxRounds, 10) : void 0,
|
|
5716
5717
|
listPresets: options.presets === true,
|
|
5717
|
-
contextFiles: options.context
|
|
5718
|
+
contextFiles: Array.isArray(options.context) && options.context.length > 0 ? options.context : void 0,
|
|
5718
5719
|
distributed: options.distributed === true,
|
|
5719
5720
|
taskRounds: options.taskRounds ? parseInt(options.taskRounds, 10) : void 0,
|
|
5720
5721
|
port: options.port ? parseInt(options.port, 10) : void 0
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
hadPreviousWriteToolCalls,
|
|
16
16
|
loadDevState,
|
|
17
17
|
setupProxy
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VHX5XAXQ.js";
|
|
19
19
|
import {
|
|
20
20
|
AuthManager
|
|
21
21
|
} from "./chunk-BYNY5JPB.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
spawnAgentContext,
|
|
34
34
|
truncateOutput,
|
|
35
35
|
undoStack
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-BR2XO6Q3.js";
|
|
37
37
|
import "./chunk-4BKXL7SM.js";
|
|
38
38
|
import {
|
|
39
39
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
SKILLS_DIR_NAME,
|
|
53
53
|
VERSION,
|
|
54
54
|
buildUserIdentityPrompt
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-6D2OOASL.js";
|
|
56
56
|
|
|
57
57
|
// src/web/server.ts
|
|
58
58
|
import express from "express";
|
|
@@ -180,7 +180,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
180
180
|
if (filePath && existsSync(filePath)) {
|
|
181
181
|
try {
|
|
182
182
|
const old = readFileSync(filePath, "utf-8");
|
|
183
|
-
return renderDiff(old, newContent, filePath);
|
|
183
|
+
return renderDiff(old, newContent, { filePath });
|
|
184
184
|
} catch {
|
|
185
185
|
}
|
|
186
186
|
}
|
|
@@ -192,7 +192,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
192
192
|
const oldStr = String(call.arguments["old_str"] ?? "");
|
|
193
193
|
const newStr = String(call.arguments["new_str"] ?? "");
|
|
194
194
|
if (oldStr || newStr) {
|
|
195
|
-
return renderDiff(oldStr, newStr, String(call.arguments["path"] ?? "file"));
|
|
195
|
+
return renderDiff(oldStr, newStr, { filePath: String(call.arguments["path"] ?? "file") });
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
return void 0;
|
|
@@ -535,7 +535,7 @@ var SessionHandler = class _SessionHandler {
|
|
|
535
535
|
const providerList = this.providers.listAvailable().map((p) => ({
|
|
536
536
|
id: p.info.id,
|
|
537
537
|
displayName: p.info.displayName,
|
|
538
|
-
models: p.info.models.map((m) => ({ id: m.id, name: m.
|
|
538
|
+
models: p.info.models.map((m) => ({ id: m.id, name: m.displayName ?? m.id }))
|
|
539
539
|
}));
|
|
540
540
|
this.send({
|
|
541
541
|
type: "status",
|
|
@@ -1606,7 +1606,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
1606
1606
|
case "test": {
|
|
1607
1607
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1608
1608
|
try {
|
|
1609
|
-
const { executeTests } = await import("./run-tests-
|
|
1609
|
+
const { executeTests } = await import("./run-tests-LLX7ZVEA.js");
|
|
1610
1610
|
const argStr = args.join(" ").trim();
|
|
1611
1611
|
let testArgs = {};
|
|
1612
1612
|
if (argStr) {
|
|
@@ -1915,7 +1915,7 @@ Add .md files to create commands.` });
|
|
|
1915
1915
|
lines.push("Add .js files to the plugins directory and set allowPlugins:true in config.");
|
|
1916
1916
|
} else {
|
|
1917
1917
|
for (const t of pluginTools) {
|
|
1918
|
-
lines.push(` \u2022 ${t.name} \u2014 ${t.description}`);
|
|
1918
|
+
lines.push(` \u2022 ${t.definition.name} \u2014 ${t.definition.description}`);
|
|
1919
1919
|
}
|
|
1920
1920
|
}
|
|
1921
1921
|
this.send({ type: "info", message: lines.join("\n") });
|
|
@@ -2578,7 +2578,7 @@ async function startWebServer(options = {}) {
|
|
|
2578
2578
|
providers: availableProviders.map((p) => ({
|
|
2579
2579
|
id: p.info.id,
|
|
2580
2580
|
displayName: p.info.displayName,
|
|
2581
|
-
models: p.info.models.map((m) => ({ id: m.id, name: m.
|
|
2581
|
+
models: p.info.models.map((m) => ({ id: m.id, name: m.displayName ?? m.id }))
|
|
2582
2582
|
})),
|
|
2583
2583
|
tools: toolRegistry.getDefinitions().length,
|
|
2584
2584
|
cwd: process.cwd(),
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
getDangerLevel,
|
|
5
5
|
googleSearchContext,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BR2XO6Q3.js";
|
|
8
8
|
import "./chunk-4BKXL7SM.js";
|
|
9
9
|
import {
|
|
10
10
|
SUBAGENT_ALLOWED_TOOLS
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6D2OOASL.js";
|
|
12
12
|
|
|
13
13
|
// src/hub/task-orchestrator.ts
|
|
14
14
|
import { createInterface } from "readline";
|