jinzd-ai-cli 0.4.228 → 0.4.229
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/{batch-K6IRL6TU.js → batch-XZHTNJXJ.js} +2 -2
- package/dist/{chunk-NI34BUBR.js → chunk-AEXWMIRE.js} +1 -1
- package/dist/{chunk-JO2CAKHA.js → chunk-AXIMNQSY.js} +1 -1
- package/dist/{chunk-JZNKM3RV.js → chunk-B3POS7LB.js} +1 -1
- package/dist/{chunk-MQVC7FJH.js → chunk-DMF6UHO6.js} +21 -16
- package/dist/{chunk-JGQ3TULW.js → chunk-FEVOW3NQ.js} +1 -1
- package/dist/{chunk-32LTIQQN.js → chunk-PQLRX7US.js} +3 -3
- package/dist/{chunk-LDWTVCE5.js → chunk-QCGKCNBX.js} +1 -1
- package/dist/{chunk-4GF47FW3.js → chunk-QFOJ4GXC.js} +3 -3
- package/dist/{chunk-VSEXYCEE.js → chunk-SJ36SUG7.js} +2 -2
- package/dist/{chunk-ACO2RJY3.js → chunk-TEXAIWUJ.js} +1 -1
- package/dist/{ci-D35MUGEH.js → ci-ZCVDKFXY.js} +4 -4
- package/dist/{ci-format-EQ4HGHXR.js → ci-format-CKXDFTN3.js} +2 -2
- package/dist/{constants-F2LRIWV2.js → constants-J2MSGNFA.js} +1 -1
- package/dist/{doctor-cli-R3AH5CLF.js → doctor-cli-3VNTECP2.js} +4 -4
- package/dist/electron-server.js +25 -20
- package/dist/{hub-AAYGBUDA.js → hub-LIH5JEI7.js} +1 -1
- package/dist/index.js +18 -18
- package/dist/{pr-HX6V63FO.js → pr-HY2QCVUY.js} +4 -4
- package/dist/{run-tests-7SGHDDHL.js → run-tests-QVXDTJ3O.js} +1 -1
- package/dist/{run-tests-5QHWA4MF.js → run-tests-WBGQI5V7.js} +2 -2
- package/dist/{server-E5XTQG7W.js → server-5RXWIX4I.js} +4 -4
- package/dist/{server-O2YK3VWK.js → server-LYTXYK6Y.js} +13 -13
- package/dist/{task-orchestrator-T2LUS5ZQ.js → task-orchestrator-FA4KOVD2.js} +4 -4
- package/dist/{usage-AIHU5PIY.js → usage-EHV6YVGH.js} +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FEVOW3NQ.js";
|
|
5
5
|
import "./chunk-5ULLIOVC.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-B3POS7LB.js";
|
|
7
7
|
import {
|
|
8
8
|
atomicWriteFileSync
|
|
9
9
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
runHook,
|
|
15
15
|
runLifecycleHooks,
|
|
16
16
|
runTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TEXAIWUJ.js";
|
|
18
18
|
import {
|
|
19
19
|
getDangerLevel,
|
|
20
20
|
isFileWriteTool,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from "./chunk-4BKXL7SM.js";
|
|
34
34
|
import {
|
|
35
35
|
runTestsTool
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-AEXWMIRE.js";
|
|
37
37
|
import {
|
|
38
38
|
CONFIG_DIR_NAME,
|
|
39
39
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
SUBAGENT_ALLOWED_TOOLS,
|
|
44
44
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
45
45
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-B3POS7LB.js";
|
|
47
47
|
import {
|
|
48
48
|
loadChatIndex,
|
|
49
49
|
searchChatMemory
|
|
@@ -558,14 +558,19 @@ Important rules:
|
|
|
558
558
|
);
|
|
559
559
|
}
|
|
560
560
|
if (status !== 0 || timedOut) {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
561
|
+
const poolStdout = (stdout ?? "").trim();
|
|
562
|
+
const poolStderr = (stderr ?? "").trim();
|
|
563
|
+
const combined = [poolStdout, poolStderr].filter(Boolean).join("\n");
|
|
564
|
+
const hint = buildErrorHint(command, combined);
|
|
565
|
+
throw new ToolError(
|
|
566
|
+
"bash",
|
|
567
|
+
`Exit code ${status}:
|
|
568
|
+
${combined || `exit ${status}`}
|
|
569
|
+
|
|
570
|
+
` + (hint ? `${hint}
|
|
571
|
+
|
|
572
|
+
` : "") + `[Command failed. Report this error to the user. Do not retry with variant commands.]`
|
|
573
|
+
);
|
|
569
574
|
}
|
|
570
575
|
pushBashUndoEntries(beforeSnapshot, parsedTargetsBefore, effectiveCwd);
|
|
571
576
|
updateCwdFromCommand(command, effectiveCwd);
|
|
@@ -2264,7 +2269,7 @@ var ToolExecutor = class {
|
|
|
2264
2269
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
2265
2270
|
return { callId: call.id, content, isError: false };
|
|
2266
2271
|
} catch (err) {
|
|
2267
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
2272
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
2268
2273
|
this.printToolResult(call.name, message, true, false);
|
|
2269
2274
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
2270
2275
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -2309,7 +2314,7 @@ var ToolExecutor = class {
|
|
|
2309
2314
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
2310
2315
|
return { callId: call.id, content, isError: false };
|
|
2311
2316
|
} catch (err) {
|
|
2312
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
2317
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
2313
2318
|
this.printToolResult(call.name, message, true, false);
|
|
2314
2319
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
2315
2320
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -2330,7 +2335,7 @@ var ToolExecutor = class {
|
|
|
2330
2335
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
2331
2336
|
return { callId: call.id, content, isError: false };
|
|
2332
2337
|
} catch (err) {
|
|
2333
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
2338
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
2334
2339
|
this.printToolResult(call.name, message, true, false);
|
|
2335
2340
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
2336
2341
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -2370,7 +2375,7 @@ var ToolExecutor = class {
|
|
|
2370
2375
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
2371
2376
|
return { callId: call.id, content, isError: false };
|
|
2372
2377
|
} catch (err) {
|
|
2373
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
2378
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
2374
2379
|
this.printToolResult(call.name, message, true, false);
|
|
2375
2380
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
2376
2381
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -2456,7 +2461,7 @@ var ToolExecutor = class {
|
|
|
2456
2461
|
this.printToolResult(call.name, rawContent, false, wasTruncated);
|
|
2457
2462
|
results[i] = { callId: call.id, content, isError: false };
|
|
2458
2463
|
} catch (err) {
|
|
2459
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
2464
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
2460
2465
|
this.printToolResult(call.name, message, true, false);
|
|
2461
2466
|
results[i] = { callId: call.id, content: message, isError: true };
|
|
2462
2467
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
evaluateCiGate,
|
|
4
4
|
normalizeCiThresholds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AXIMNQSY.js";
|
|
6
6
|
import {
|
|
7
7
|
buildReviewPrompt,
|
|
8
8
|
buildSecurityReviewPrompt,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
} from "./chunk-EEQHP4GK.js";
|
|
14
14
|
import {
|
|
15
15
|
ConfigManager
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FEVOW3NQ.js";
|
|
17
17
|
import {
|
|
18
18
|
VERSION
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-B3POS7LB.js";
|
|
20
20
|
|
|
21
21
|
// src/cli/ci.ts
|
|
22
22
|
import { execFileSync } from "child_process";
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
listHooks,
|
|
12
12
|
listInstalledPlugins,
|
|
13
13
|
resetStats
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TEXAIWUJ.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigManager
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FEVOW3NQ.js";
|
|
18
18
|
import {
|
|
19
19
|
getGitRoot
|
|
20
20
|
} from "./chunk-HOSJZMQS.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
MCP_PROJECT_CONFIG_NAME,
|
|
27
27
|
MEMORY_FILE_NAME,
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-B3POS7LB.js";
|
|
30
30
|
|
|
31
31
|
// src/diagnostics/doctor-report.ts
|
|
32
32
|
import { existsSync as existsSync3, statSync as statSync2 } from "fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
truncateForPersist
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DMF6UHO6.js";
|
|
5
5
|
import {
|
|
6
6
|
APP_NAME,
|
|
7
7
|
CONFIG_DIR_NAME,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
MCP_PROTOCOL_VERSION,
|
|
12
12
|
MCP_TOOL_PREFIX,
|
|
13
13
|
VERSION
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-B3POS7LB.js";
|
|
15
15
|
import {
|
|
16
16
|
atomicWriteFileSync
|
|
17
17
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
CI_COMMENT_MARKER,
|
|
4
4
|
countSeverity,
|
|
5
5
|
runCi
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-PQLRX7US.js";
|
|
7
|
+
import "./chunk-AXIMNQSY.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
9
|
import "./chunk-EEQHP4GK.js";
|
|
10
10
|
import "./chunk-ODYTXQ26.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-FEVOW3NQ.js";
|
|
12
12
|
import "./chunk-5ULLIOVC.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-B3POS7LB.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
export {
|
|
16
16
|
CI_COMMENT_MARKER,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
formatDoctorReport,
|
|
4
4
|
runDoctorCli
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QFOJ4GXC.js";
|
|
6
6
|
import "./chunk-EEQHP4GK.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-TEXAIWUJ.js";
|
|
8
8
|
import "./chunk-ODYTXQ26.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-FEVOW3NQ.js";
|
|
10
10
|
import "./chunk-5ULLIOVC.js";
|
|
11
11
|
import "./chunk-HOSJZMQS.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-B3POS7LB.js";
|
|
13
13
|
import "./chunk-IW3Q7AE5.js";
|
|
14
14
|
export {
|
|
15
15
|
formatDoctorReport,
|
package/dist/electron-server.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
VERSION,
|
|
39
39
|
buildUserIdentityPrompt,
|
|
40
40
|
runTestsTool
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-QCGKCNBX.js";
|
|
42
42
|
import {
|
|
43
43
|
hasSemanticIndex,
|
|
44
44
|
semanticSearch
|
|
@@ -5382,14 +5382,19 @@ Important rules:
|
|
|
5382
5382
|
);
|
|
5383
5383
|
}
|
|
5384
5384
|
if (status !== 0 || timedOut) {
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5385
|
+
const poolStdout = (stdout ?? "").trim();
|
|
5386
|
+
const poolStderr = (stderr ?? "").trim();
|
|
5387
|
+
const combined = [poolStdout, poolStderr].filter(Boolean).join("\n");
|
|
5388
|
+
const hint = buildErrorHint(command, combined);
|
|
5389
|
+
throw new ToolError(
|
|
5390
|
+
"bash",
|
|
5391
|
+
`Exit code ${status}:
|
|
5392
|
+
${combined || `exit ${status}`}
|
|
5393
|
+
|
|
5394
|
+
` + (hint ? `${hint}
|
|
5395
|
+
|
|
5396
|
+
` : "") + `[Command failed. Report this error to the user. Do not retry with variant commands.]`
|
|
5397
|
+
);
|
|
5393
5398
|
}
|
|
5394
5399
|
pushBashUndoEntries(beforeSnapshot, parsedTargetsBefore, effectiveCwd);
|
|
5395
5400
|
updateCwdFromCommand(command, effectiveCwd);
|
|
@@ -7313,7 +7318,7 @@ var ToolExecutor = class {
|
|
|
7313
7318
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
7314
7319
|
return { callId: call.id, content, isError: false };
|
|
7315
7320
|
} catch (err) {
|
|
7316
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
7321
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
7317
7322
|
this.printToolResult(call.name, message, true, false);
|
|
7318
7323
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
7319
7324
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -7358,7 +7363,7 @@ var ToolExecutor = class {
|
|
|
7358
7363
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
7359
7364
|
return { callId: call.id, content, isError: false };
|
|
7360
7365
|
} catch (err) {
|
|
7361
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
7366
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
7362
7367
|
this.printToolResult(call.name, message, true, false);
|
|
7363
7368
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
7364
7369
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -7379,7 +7384,7 @@ var ToolExecutor = class {
|
|
|
7379
7384
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
7380
7385
|
return { callId: call.id, content, isError: false };
|
|
7381
7386
|
} catch (err) {
|
|
7382
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
7387
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
7383
7388
|
this.printToolResult(call.name, message, true, false);
|
|
7384
7389
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
7385
7390
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -7419,7 +7424,7 @@ var ToolExecutor = class {
|
|
|
7419
7424
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
7420
7425
|
return { callId: call.id, content, isError: false };
|
|
7421
7426
|
} catch (err) {
|
|
7422
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
7427
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
7423
7428
|
this.printToolResult(call.name, message, true, false);
|
|
7424
7429
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
7425
7430
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -7505,7 +7510,7 @@ var ToolExecutor = class {
|
|
|
7505
7510
|
this.printToolResult(call.name, rawContent, false, wasTruncated);
|
|
7506
7511
|
results[i] = { callId: call.id, content, isError: false };
|
|
7507
7512
|
} catch (err) {
|
|
7508
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
7513
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
7509
7514
|
this.printToolResult(call.name, message, true, false);
|
|
7510
7515
|
results[i] = { callId: call.id, content: message, isError: true };
|
|
7511
7516
|
}
|
|
@@ -13360,7 +13365,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
13360
13365
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
13361
13366
|
return { callId: call.id, content, isError: false };
|
|
13362
13367
|
} catch (err) {
|
|
13363
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
13368
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
13364
13369
|
this.sendToolCallResult(call, message, true);
|
|
13365
13370
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
13366
13371
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -13399,7 +13404,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
13399
13404
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
13400
13405
|
return { callId: call.id, content, isError: false };
|
|
13401
13406
|
} catch (err) {
|
|
13402
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
13407
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
13403
13408
|
this.sendToolCallResult(call, message, true);
|
|
13404
13409
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
13405
13410
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -13416,7 +13421,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
13416
13421
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
13417
13422
|
return { callId: call.id, content, isError: false };
|
|
13418
13423
|
} catch (err) {
|
|
13419
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
13424
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
13420
13425
|
this.sendToolCallResult(call, message, true);
|
|
13421
13426
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
13422
13427
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -13440,7 +13445,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
13440
13445
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
13441
13446
|
return { callId: call.id, content, isError: false };
|
|
13442
13447
|
} catch (err) {
|
|
13443
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
13448
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
13444
13449
|
this.sendToolCallResult(call, message, true);
|
|
13445
13450
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
13446
13451
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -13503,7 +13508,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
13503
13508
|
this.sendToolCallResult(call, rawContent, false);
|
|
13504
13509
|
results[i] = { callId: call.id, content, isError: false };
|
|
13505
13510
|
} catch (err) {
|
|
13506
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
13511
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
13507
13512
|
this.sendToolCallResult(call, message, true);
|
|
13508
13513
|
results[i] = { callId: call.id, content: message, isError: true };
|
|
13509
13514
|
}
|
|
@@ -16068,7 +16073,7 @@ async function handleSecurityReview(args, ctx) {
|
|
|
16068
16073
|
async function handleTest(args, ctx) {
|
|
16069
16074
|
ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
16070
16075
|
try {
|
|
16071
|
-
const { executeTests } = await import("./run-tests-
|
|
16076
|
+
const { executeTests } = await import("./run-tests-QVXDTJ3O.js");
|
|
16072
16077
|
const argStr = args.join(" ").trim();
|
|
16073
16078
|
let testArgs = {};
|
|
16074
16079
|
if (argStr) {
|
|
@@ -154,7 +154,7 @@ ${content}`);
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
157
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
157
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-FA4KOVD2.js");
|
|
158
158
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
159
159
|
let interrupted = false;
|
|
160
160
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
scanProject,
|
|
15
15
|
sessionHasMeaningfulContent,
|
|
16
16
|
setupProxy
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SJ36SUG7.js";
|
|
18
18
|
import {
|
|
19
19
|
buildReviewPrompt,
|
|
20
20
|
buildSecurityReviewPrompt
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
theme,
|
|
53
53
|
undoStack,
|
|
54
54
|
updateMemoryApproval
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-DMF6UHO6.js";
|
|
56
56
|
import "./chunk-K3CF65QH.js";
|
|
57
57
|
import "./chunk-UUSRWSSX.js";
|
|
58
58
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
formatDoctorReport,
|
|
75
75
|
loadContextFiles,
|
|
76
76
|
writeCrashLog
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-QFOJ4GXC.js";
|
|
78
78
|
import {
|
|
79
79
|
ProviderRegistry
|
|
80
80
|
} from "./chunk-EEQHP4GK.js";
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
trustHook,
|
|
95
95
|
trustPlugin,
|
|
96
96
|
untrustHook
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-TEXAIWUJ.js";
|
|
98
98
|
import {
|
|
99
99
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
100
100
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
} from "./chunk-ODYTXQ26.js";
|
|
117
117
|
import {
|
|
118
118
|
ConfigManager
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-FEVOW3NQ.js";
|
|
120
120
|
import {
|
|
121
121
|
AuthError,
|
|
122
122
|
ProviderError,
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
import {
|
|
131
131
|
fileCheckpoints
|
|
132
132
|
} from "./chunk-4BKXL7SM.js";
|
|
133
|
-
import "./chunk-
|
|
133
|
+
import "./chunk-AEXWMIRE.js";
|
|
134
134
|
import {
|
|
135
135
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
136
136
|
AUTHOR,
|
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
SKILLS_DIR_NAME,
|
|
150
150
|
VERSION,
|
|
151
151
|
buildUserIdentityPrompt
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-B3POS7LB.js";
|
|
153
153
|
import {
|
|
154
154
|
buildChatIndex,
|
|
155
155
|
clearChatIndex,
|
|
@@ -1834,7 +1834,7 @@ No tools match "${filter}".
|
|
|
1834
1834
|
const { join: join7 } = await import("path");
|
|
1835
1835
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1836
1836
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
|
|
1837
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1837
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-J2MSGNFA.js");
|
|
1838
1838
|
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
1839
1839
|
const cwd = process.cwd();
|
|
1840
1840
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2813,7 +2813,7 @@ function createReviewCommands() {
|
|
|
2813
2813
|
usage: "/test [command|filter]",
|
|
2814
2814
|
async execute(args, ctx) {
|
|
2815
2815
|
try {
|
|
2816
|
-
const { executeTests } = await import("./run-tests-
|
|
2816
|
+
const { executeTests } = await import("./run-tests-WBGQI5V7.js");
|
|
2817
2817
|
const argStr = args.join(" ").trim();
|
|
2818
2818
|
let testArgs = {};
|
|
2819
2819
|
if (argStr) {
|
|
@@ -7758,7 +7758,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7758
7758
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7759
7759
|
process.exit(1);
|
|
7760
7760
|
}
|
|
7761
|
-
const { startWebServer } = await import("./server-
|
|
7761
|
+
const { startWebServer } = await import("./server-LYTXYK6Y.js");
|
|
7762
7762
|
await startWebServer({ port, host: options.host });
|
|
7763
7763
|
});
|
|
7764
7764
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | logout-all <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -7925,11 +7925,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
7925
7925
|
console.log(footer + "\n");
|
|
7926
7926
|
});
|
|
7927
7927
|
program.command("usage").description("Show token + cost usage grouped by provider/model (cross-session)").option("--days <n>", "Only the last N days (inclusive of today)").option("--month <ym>", "Only a specific month, format YYYY-MM (e.g. 2026-06)").option("--json", "Output as JSON (for scripting)").action(async (options) => {
|
|
7928
|
-
const { runUsageCli } = await import("./usage-
|
|
7928
|
+
const { runUsageCli } = await import("./usage-EHV6YVGH.js");
|
|
7929
7929
|
await runUsageCli(options);
|
|
7930
7930
|
});
|
|
7931
7931
|
program.command("doctor").description("Health check: API keys, config, MCP, recent crashes, tool usage, disk usage").option("--json", "Output as JSON (for scripting)").option("--reset-stats", "Reset accumulated tool usage statistics").action(async (options) => {
|
|
7932
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7932
|
+
const { runDoctorCli } = await import("./doctor-cli-3VNTECP2.js");
|
|
7933
7933
|
const argv = process.argv.slice(2);
|
|
7934
7934
|
await runDoctorCli({
|
|
7935
7935
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -7938,7 +7938,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
7938
7938
|
});
|
|
7939
7939
|
program.command("batch <action> [arg] [arg2]").description("Anthropic Message Batches: submit | list | status <id> | results <id> [out] | cancel <id>").option("--dry-run", "Parse and validate input without submitting (submit only)").action(async (action, arg, arg2, options) => {
|
|
7940
7940
|
try {
|
|
7941
|
-
const batch = await import("./batch-
|
|
7941
|
+
const batch = await import("./batch-XZHTNJXJ.js");
|
|
7942
7942
|
switch (action) {
|
|
7943
7943
|
case "submit":
|
|
7944
7944
|
if (!arg) {
|
|
@@ -7981,7 +7981,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7981
7981
|
}
|
|
7982
7982
|
});
|
|
7983
7983
|
program.command("mcp-serve").description("Start an MCP server over STDIO, exposing aicli's built-in tools to Claude Desktop / Cursor / other MCP clients").option("--allow-destructive", "Allow bash / run_interactive / task_create (always destructive in MCP mode)").option("--allow-outside-cwd", "Allow tool path arguments to escape the sandbox root \u2014 disabled by default").option("--tools <list>", "Comma-separated whitelist of tools to expose (default: all eligible tools)").option("--cwd <path>", "Working directory AND sandbox root (default: current directory)").action(async (options) => {
|
|
7984
|
-
const { startMcpServer } = await import("./server-
|
|
7984
|
+
const { startMcpServer } = await import("./server-5RXWIX4I.js");
|
|
7985
7985
|
await startMcpServer({
|
|
7986
7986
|
allowDestructive: !!options.allowDestructive,
|
|
7987
7987
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7994,7 +7994,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
7994
7994
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
7995
7995
|
process.exit(1);
|
|
7996
7996
|
}
|
|
7997
|
-
const { runPrCli } = await import("./pr-
|
|
7997
|
+
const { runPrCli } = await import("./pr-HY2QCVUY.js");
|
|
7998
7998
|
const result = await runPrCli({
|
|
7999
7999
|
action,
|
|
8000
8000
|
target,
|
|
@@ -8014,8 +8014,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
8014
8014
|
process.exit(result.exitCode);
|
|
8015
8015
|
});
|
|
8016
8016
|
program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number or URL; diff fetched via gh pr diff <value>", (v) => /^#?\d+$/.test(v) ? parseInt(v.replace(/^#/, ""), 10) : v).option("--base <ref>", "Base ref for git diff <ref>...HEAD (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").option("--json", "Output a structured JSON report").option("--markdown", "Output Markdown report (default)").option("--sarif", "Output SARIF 2.1.0 for code scanning artifacts").option("--fail-on-security-high", "Fail when the security review contains HIGH/CRITICAL findings (default)").option("--no-fail-on-security-high", "Do not fail on security HIGH/CRITICAL findings").option("--fail-on-test-failure", "Fail when the report mentions test failures (default)").option("--no-fail-on-test-failure", "Do not fail on test failure findings").option("--fail-on-lint-failure", "Fail when the report mentions lint/typecheck failures (default)").option("--no-fail-on-lint-failure", "Do not fail on lint/typecheck failure findings").action(async (options) => {
|
|
8017
|
-
const { runCi } = await import("./ci-
|
|
8018
|
-
const { formatCiResult } = await import("./ci-format-
|
|
8017
|
+
const { runCi } = await import("./ci-ZCVDKFXY.js");
|
|
8018
|
+
const { formatCiResult } = await import("./ci-format-CKXDFTN3.js");
|
|
8019
8019
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
8020
8020
|
if (formats > 1) {
|
|
8021
8021
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -8173,7 +8173,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
8173
8173
|
config.get("customProviders"),
|
|
8174
8174
|
config.getConfigDir()
|
|
8175
8175
|
);
|
|
8176
|
-
const { startHub } = await import("./hub-
|
|
8176
|
+
const { startHub } = await import("./hub-LIH5JEI7.js");
|
|
8177
8177
|
await startHub(
|
|
8178
8178
|
{
|
|
8179
8179
|
topic: topic ?? "",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-PQLRX7US.js";
|
|
6
|
+
import "./chunk-AXIMNQSY.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
import "./chunk-ODYTXQ26.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigManager
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FEVOW3NQ.js";
|
|
19
19
|
import "./chunk-5ULLIOVC.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-B3POS7LB.js";
|
|
23
23
|
import "./chunk-IW3Q7AE5.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/pr.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DMF6UHO6.js";
|
|
5
5
|
import "./chunk-K3CF65QH.js";
|
|
6
6
|
import "./chunk-UUSRWSSX.js";
|
|
7
7
|
import "./chunk-CKH4KQ4E.js";
|
|
8
8
|
import "./chunk-BXP6YZ2P.js";
|
|
9
9
|
import {
|
|
10
10
|
runTool
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TEXAIWUJ.js";
|
|
12
12
|
import {
|
|
13
13
|
getDangerLevel,
|
|
14
14
|
schemaToJsonSchema
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
import "./chunk-5ULLIOVC.js";
|
|
17
17
|
import "./chunk-HOSJZMQS.js";
|
|
18
18
|
import "./chunk-4BKXL7SM.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-AEXWMIRE.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-B3POS7LB.js";
|
|
23
23
|
import "./chunk-NVUCDUXE.js";
|
|
24
24
|
import "./chunk-KHYD3WXE.js";
|
|
25
25
|
import "./chunk-B5TYJO7V.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
scanDirTree,
|
|
24
24
|
scanProject,
|
|
25
25
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-SJ36SUG7.js";
|
|
27
27
|
import {
|
|
28
28
|
buildReviewPrompt,
|
|
29
29
|
buildSecurityReviewPrompt
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
truncateOutput,
|
|
68
68
|
undoStack,
|
|
69
69
|
updateMemoryApproval
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-DMF6UHO6.js";
|
|
71
71
|
import "./chunk-K3CF65QH.js";
|
|
72
72
|
import "./chunk-UUSRWSSX.js";
|
|
73
73
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
buildDoctorReport,
|
|
85
85
|
formatDoctorReport,
|
|
86
86
|
loadContextFiles
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-QFOJ4GXC.js";
|
|
88
88
|
import {
|
|
89
89
|
ProviderRegistry
|
|
90
90
|
} from "./chunk-EEQHP4GK.js";
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
runTool,
|
|
103
103
|
setPluginEnabled,
|
|
104
104
|
trustPlugin
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-TEXAIWUJ.js";
|
|
106
106
|
import {
|
|
107
107
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
108
108
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -121,7 +121,7 @@ import {
|
|
|
121
121
|
} from "./chunk-ODYTXQ26.js";
|
|
122
122
|
import {
|
|
123
123
|
ConfigManager
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-FEVOW3NQ.js";
|
|
125
125
|
import "./chunk-5ULLIOVC.js";
|
|
126
126
|
import {
|
|
127
127
|
formatGitContextForPrompt,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
getGitRoot
|
|
130
130
|
} from "./chunk-HOSJZMQS.js";
|
|
131
131
|
import "./chunk-4BKXL7SM.js";
|
|
132
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-AEXWMIRE.js";
|
|
133
133
|
import {
|
|
134
134
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
135
135
|
AUTHOR,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
SKILLS_DIR_NAME,
|
|
147
147
|
VERSION,
|
|
148
148
|
buildUserIdentityPrompt
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-B3POS7LB.js";
|
|
150
150
|
import "./chunk-NVUCDUXE.js";
|
|
151
151
|
import "./chunk-KHYD3WXE.js";
|
|
152
152
|
import {
|
|
@@ -457,7 +457,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
457
457
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
458
458
|
return { callId: call.id, content, isError: false };
|
|
459
459
|
} catch (err) {
|
|
460
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
460
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
461
461
|
this.sendToolCallResult(call, message, true);
|
|
462
462
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
463
463
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -496,7 +496,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
496
496
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
497
497
|
return { callId: call.id, content, isError: false };
|
|
498
498
|
} catch (err) {
|
|
499
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
499
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
500
500
|
this.sendToolCallResult(call, message, true);
|
|
501
501
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
502
502
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -513,7 +513,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
513
513
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
514
514
|
return { callId: call.id, content, isError: false };
|
|
515
515
|
} catch (err) {
|
|
516
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
516
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
517
517
|
this.sendToolCallResult(call, message, true);
|
|
518
518
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
519
519
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -537,7 +537,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
537
537
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
538
538
|
return { callId: call.id, content, isError: false };
|
|
539
539
|
} catch (err) {
|
|
540
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
540
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
541
541
|
this.sendToolCallResult(call, message, true);
|
|
542
542
|
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
543
543
|
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
@@ -600,7 +600,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
600
600
|
this.sendToolCallResult(call, rawContent, false);
|
|
601
601
|
results[i] = { callId: call.id, content, isError: false };
|
|
602
602
|
} catch (err) {
|
|
603
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
603
|
+
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
604
604
|
this.sendToolCallResult(call, message, true);
|
|
605
605
|
results[i] = { callId: call.id, content: message, isError: true };
|
|
606
606
|
}
|
|
@@ -1598,7 +1598,7 @@ async function handleSecurityReview(args, ctx) {
|
|
|
1598
1598
|
async function handleTest(args, ctx) {
|
|
1599
1599
|
ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1600
1600
|
try {
|
|
1601
|
-
const { executeTests } = await import("./run-tests-
|
|
1601
|
+
const { executeTests } = await import("./run-tests-WBGQI5V7.js");
|
|
1602
1602
|
const argStr = args.join(" ").trim();
|
|
1603
1603
|
let testArgs = {};
|
|
1604
1604
|
if (argStr) {
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DMF6UHO6.js";
|
|
7
7
|
import "./chunk-K3CF65QH.js";
|
|
8
8
|
import "./chunk-UUSRWSSX.js";
|
|
9
9
|
import "./chunk-CKH4KQ4E.js";
|
|
10
10
|
import "./chunk-BXP6YZ2P.js";
|
|
11
11
|
import {
|
|
12
12
|
runTool
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TEXAIWUJ.js";
|
|
14
14
|
import {
|
|
15
15
|
getDangerLevel,
|
|
16
16
|
runLeanAgentLoop
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
import "./chunk-5ULLIOVC.js";
|
|
19
19
|
import "./chunk-HOSJZMQS.js";
|
|
20
20
|
import "./chunk-4BKXL7SM.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-AEXWMIRE.js";
|
|
22
22
|
import {
|
|
23
23
|
SUBAGENT_ALLOWED_TOOLS
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-B3POS7LB.js";
|
|
25
25
|
import "./chunk-NVUCDUXE.js";
|
|
26
26
|
import "./chunk-KHYD3WXE.js";
|
|
27
27
|
import "./chunk-B5TYJO7V.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
} from "./chunk-E44DTERW.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FEVOW3NQ.js";
|
|
12
12
|
import "./chunk-5ULLIOVC.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-B3POS7LB.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/usage.ts
|