jinzd-ai-cli 0.4.57 → 0.4.58
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-H7MNK3YO.js → chunk-5CQPX74I.js} +1 -1
- package/dist/{chunk-C2MNNHJ6.js → chunk-7MQXQDVV.js} +1 -1
- package/dist/{chunk-G6K64M6X.js → chunk-HDNVCYD6.js} +32 -11
- package/dist/{chunk-G5REL4FK.js → chunk-ZHURWJEW.js} +2 -2
- package/dist/{hub-P3BR4JB5.js → hub-MRK53S5O.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/{run-tests-XAWG6R73.js → run-tests-DL6HGIK3.js} +1 -1
- package/dist/{run-tests-NVCAP42D.js → run-tests-ZC6WLEE4.js} +1 -1
- package/dist/{server-46J5MXHG.js → server-SFDOVFUN.js} +4 -4
- package/dist/{task-orchestrator-FRF6LTWK.js → task-orchestrator-BWFYT4Q5.js} +2 -2
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
11
11
|
SUBAGENT_MAX_ROUNDS_LIMIT,
|
|
12
12
|
runTestsTool
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7MQXQDVV.js";
|
|
14
14
|
|
|
15
15
|
// src/tools/builtin/bash.ts
|
|
16
16
|
import { execSync } from "child_process";
|
|
@@ -221,7 +221,7 @@ Important rules:
|
|
|
221
221
|
},
|
|
222
222
|
timeout: {
|
|
223
223
|
type: "number",
|
|
224
|
-
description: "Timeout in milliseconds, defaults to
|
|
224
|
+
description: "Timeout in milliseconds, defaults to 120000 (2 min), max 300000 (5 min). For recursive filesystem operations (e.g. Get-ChildItem -Recurse on large trees, find on deep dirs), pass a larger value explicitly (e.g. 240000) \u2014 the default may be too short.",
|
|
225
225
|
required: false
|
|
226
226
|
}
|
|
227
227
|
},
|
|
@@ -229,8 +229,9 @@ Important rules:
|
|
|
229
229
|
},
|
|
230
230
|
async execute(args) {
|
|
231
231
|
const command = String(args["command"] ?? "");
|
|
232
|
+
const DEFAULT_TIMEOUT = 12e4;
|
|
232
233
|
const MAX_TIMEOUT = 3e5;
|
|
233
|
-
const timeout = Math.min(Math.max(Number(args["timeout"] ??
|
|
234
|
+
const timeout = Math.min(Math.max(Number(args["timeout"] ?? DEFAULT_TIMEOUT), 1e3), MAX_TIMEOUT);
|
|
234
235
|
const cwdArg = args["cwd"] ? String(args["cwd"]) : void 0;
|
|
235
236
|
if (!command.trim()) {
|
|
236
237
|
throw new ToolError("bash", "command is required");
|
|
@@ -287,18 +288,38 @@ Important rules:
|
|
|
287
288
|
return result || "(command completed with no output)";
|
|
288
289
|
} catch (err) {
|
|
289
290
|
pushBashUndoEntries(beforeSnapshot, parsedTargetsBefore, effectiveCwd);
|
|
290
|
-
if (err && typeof err === "object"
|
|
291
|
+
if (err && typeof err === "object") {
|
|
291
292
|
const execErr = err;
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
293
|
+
const isTimeout = execErr.code === "ETIMEDOUT" || execErr.status == null && execErr.signal === "SIGTERM" || /ETIMEDOUT/i.test(execErr.message ?? "");
|
|
294
|
+
if (isTimeout) {
|
|
295
|
+
const seconds = Math.round(timeout / 1e3);
|
|
296
|
+
throw new ToolError(
|
|
297
|
+
"bash",
|
|
298
|
+
`Command timed out after ${seconds}s.
|
|
299
|
+
|
|
300
|
+
The previous command ran for longer than the timeout limit and was killed. This usually means it is scanning a large filesystem tree (recursive Get-ChildItem / find), compressing a big archive, or waiting on a network request.
|
|
301
|
+
|
|
302
|
+
How to recover (pick ONE \u2014 do NOT retry the same command):
|
|
303
|
+
1. Pass an explicit longer timeout, e.g. timeout: ${Math.min(timeout * 2, MAX_TIMEOUT)}
|
|
304
|
+
2. Use a non-recursive / narrower alternative (e.g. 'Get-ChildItem -File' without -Recurse, or limit depth with -Depth 1)
|
|
305
|
+
3. Split the work into smaller batches (process subdirectories one at a time)
|
|
306
|
+
4. For size/count queries, use '(Get-ChildItem X).Count' per directory instead of one giant pipeline
|
|
307
|
+
|
|
308
|
+
[Do NOT retry the identical command \u2014 it will time out again.]`
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
if ("status" in execErr && execErr.status !== void 0) {
|
|
312
|
+
const stderr = IS_WINDOWS && Buffer.isBuffer(execErr.stderr) ? execErr.stderr.toString("utf-8").trim() : execErr.stderr?.toString().trim() ?? "";
|
|
313
|
+
const stdout = IS_WINDOWS && Buffer.isBuffer(execErr.stdout) ? execErr.stdout.toString("utf-8").trim() : execErr.stdout?.toString().trim() ?? "";
|
|
314
|
+
const combined = [stdout, stderr].filter(Boolean).join("\n");
|
|
315
|
+
throw new ToolError(
|
|
316
|
+
"bash",
|
|
317
|
+
`Exit code ${execErr.status}:
|
|
298
318
|
${combined || (execErr.message ?? "Unknown error")}
|
|
299
319
|
|
|
300
320
|
[Command failed. Report this error to the user. Do not retry with variant commands.]`
|
|
301
|
-
|
|
321
|
+
);
|
|
322
|
+
}
|
|
302
323
|
}
|
|
303
324
|
throw err;
|
|
304
325
|
}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
ProviderNotFoundError,
|
|
8
8
|
RateLimitError,
|
|
9
9
|
schemaToJsonSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HDNVCYD6.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-7MQXQDVV.js";
|
|
24
24
|
|
|
25
25
|
// src/config/config-manager.ts
|
|
26
26
|
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
@@ -385,7 +385,7 @@ ${content}`);
|
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
388
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
388
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-BWFYT4Q5.js");
|
|
389
389
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
390
390
|
let interrupted = false;
|
|
391
391
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
saveDevState,
|
|
28
28
|
sessionHasMeaningfulContent,
|
|
29
29
|
setupProxy
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZHURWJEW.js";
|
|
31
31
|
import {
|
|
32
32
|
ToolExecutor,
|
|
33
33
|
ToolRegistry,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
spawnAgentContext,
|
|
42
42
|
theme,
|
|
43
43
|
undoStack
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-HDNVCYD6.js";
|
|
45
45
|
import {
|
|
46
46
|
fileCheckpoints
|
|
47
47
|
} from "./chunk-4BKXL7SM.js";
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
SKILLS_DIR_NAME,
|
|
67
67
|
VERSION,
|
|
68
68
|
buildUserIdentityPrompt
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-7MQXQDVV.js";
|
|
70
70
|
|
|
71
71
|
// src/index.ts
|
|
72
72
|
import { program } from "commander";
|
|
@@ -2161,7 +2161,7 @@ ${hint}` : "")
|
|
|
2161
2161
|
usage: "/test [command|filter]",
|
|
2162
2162
|
async execute(args, ctx) {
|
|
2163
2163
|
try {
|
|
2164
|
-
const { executeTests } = await import("./run-tests-
|
|
2164
|
+
const { executeTests } = await import("./run-tests-ZC6WLEE4.js");
|
|
2165
2165
|
const argStr = args.join(" ").trim();
|
|
2166
2166
|
let testArgs = {};
|
|
2167
2167
|
if (argStr) {
|
|
@@ -5609,7 +5609,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5609
5609
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5610
5610
|
process.exit(1);
|
|
5611
5611
|
}
|
|
5612
|
-
const { startWebServer } = await import("./server-
|
|
5612
|
+
const { startWebServer } = await import("./server-SFDOVFUN.js");
|
|
5613
5613
|
await startWebServer({ port, host: options.host });
|
|
5614
5614
|
});
|
|
5615
5615
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -5842,7 +5842,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
5842
5842
|
}),
|
|
5843
5843
|
config.get("customProviders")
|
|
5844
5844
|
);
|
|
5845
|
-
const { startHub } = await import("./hub-
|
|
5845
|
+
const { startHub } = await import("./hub-MRK53S5O.js");
|
|
5846
5846
|
await startHub(
|
|
5847
5847
|
{
|
|
5848
5848
|
topic: topic ?? "",
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
hadPreviousWriteToolCalls,
|
|
18
18
|
loadDevState,
|
|
19
19
|
setupProxy
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZHURWJEW.js";
|
|
21
21
|
import {
|
|
22
22
|
AuthManager
|
|
23
23
|
} from "./chunk-BYNY5JPB.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
spawnAgentContext,
|
|
37
37
|
truncateOutput,
|
|
38
38
|
undoStack
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-HDNVCYD6.js";
|
|
40
40
|
import "./chunk-4BKXL7SM.js";
|
|
41
41
|
import {
|
|
42
42
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
SKILLS_DIR_NAME,
|
|
57
57
|
VERSION,
|
|
58
58
|
buildUserIdentityPrompt
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-7MQXQDVV.js";
|
|
60
60
|
|
|
61
61
|
// src/web/server.ts
|
|
62
62
|
import express from "express";
|
|
@@ -1816,7 +1816,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
1816
1816
|
case "test": {
|
|
1817
1817
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1818
1818
|
try {
|
|
1819
|
-
const { executeTests } = await import("./run-tests-
|
|
1819
|
+
const { executeTests } = await import("./run-tests-ZC6WLEE4.js");
|
|
1820
1820
|
const argStr = args.join(" ").trim();
|
|
1821
1821
|
let testArgs = {};
|
|
1822
1822
|
if (argStr) {
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
getDangerLevel,
|
|
5
5
|
googleSearchContext,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HDNVCYD6.js";
|
|
8
8
|
import "./chunk-4BKXL7SM.js";
|
|
9
9
|
import {
|
|
10
10
|
SUBAGENT_ALLOWED_TOOLS
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7MQXQDVV.js";
|
|
12
12
|
|
|
13
13
|
// src/hub/task-orchestrator.ts
|
|
14
14
|
import { createInterface } from "readline";
|