jinzd-ai-cli 0.4.119 → 0.4.121
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-7QSGU2F3.js → batch-NIKHWGRB.js} +2 -2
- package/dist/{chunk-BS7EUZSO.js → chunk-4FBL3RIZ.js} +1 -1
- package/dist/{chunk-VYTV2VP7.js → chunk-DDHU6VOW.js} +3 -3
- package/dist/{chunk-DIOSW6R4.js → chunk-HV4MMSLT.js} +20 -11
- package/dist/{chunk-SYF3BPZK.js → chunk-J2PDFSAC.js} +1 -1
- package/dist/{chunk-2OMBLQP6.js → chunk-KAEHWVMV.js} +1 -1
- package/dist/{chunk-UVKO7T4I.js → chunk-N6A47HVC.js} +1 -1
- package/dist/{chunk-SWOK6GDC.js → chunk-NRUVVOE2.js} +1 -1
- package/dist/{chunk-M36KRNHE.js → chunk-S7L2M6UP.js} +1 -1
- package/dist/{chunk-4QMGQO4P.js → chunk-TZRYEWXW.js} +1 -1
- package/dist/{constants-QVAT2SUA.js → constants-AEX6CGDO.js} +1 -1
- package/dist/{doctor-cli-RZC5PSDE.js → doctor-cli-VDXQRPNW.js} +5 -5
- package/dist/electron-server.js +26 -21
- package/dist/{hub-SODOTZRX.js → hub-NAZQGJ7O.js} +1 -1
- package/dist/index.js +31 -27
- package/dist/{run-tests-CDY775VC.js → run-tests-2EHQ6R54.js} +2 -2
- package/dist/{run-tests-3ZLFXP7F.js → run-tests-LI6ZDLSH.js} +1 -1
- package/dist/{server-HMJTQCKI.js → server-PZEYYUTG.js} +4 -4
- package/dist/{server-C6Z6TVTZ.js → server-Q2JSHPNK.js} +14 -18
- package/dist/{task-orchestrator-SDFF4CQ7.js → task-orchestrator-DEBD3TIS.js} +4 -4
- 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-N6A47HVC.js";
|
|
5
5
|
import "./chunk-2ZD3YTVM.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-4FBL3RIZ.js";
|
|
7
7
|
import "./chunk-PDX44BCA.js";
|
|
8
8
|
|
|
9
9
|
// src/cli/batch.ts
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
} from "./chunk-3BICTI5M.js";
|
|
6
6
|
import {
|
|
7
7
|
runTestsTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TZRYEWXW.js";
|
|
9
9
|
import {
|
|
10
10
|
getDangerLevel,
|
|
11
11
|
isFileWriteTool,
|
|
12
12
|
runTool
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KAEHWVMV.js";
|
|
14
14
|
import {
|
|
15
15
|
EnvLoader,
|
|
16
16
|
NetworkError,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
SUBAGENT_ALLOWED_TOOLS,
|
|
24
24
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
25
25
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4FBL3RIZ.js";
|
|
27
27
|
import {
|
|
28
28
|
fileCheckpoints
|
|
29
29
|
} from "./chunk-4BKXL7SM.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
truncateForPersist
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DDHU6VOW.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-4FBL3RIZ.js";
|
|
15
15
|
import {
|
|
16
16
|
redactJson
|
|
17
17
|
} from "./chunk-7ZJN4KLV.js";
|
|
@@ -1043,8 +1043,13 @@ var McpManager = class {
|
|
|
1043
1043
|
/**
|
|
1044
1044
|
* 连接所有配置的 MCP 服务器(并发连接,单个失败不阻塞其他)。
|
|
1045
1045
|
* 连接结果通过 getStatus() 查看。
|
|
1046
|
+
*
|
|
1047
|
+
* @param options.quiet 抑制每个 server 的成功/失败 stderr 输出。REPL 在
|
|
1048
|
+
* 后台连接时启用 quiet,避免日志和已绘制的 readline prompt 互相穿插;
|
|
1049
|
+
* 连接完成后调用方自己用 getStatus() 渲染摘要(含失败列表)。
|
|
1050
|
+
* server.ts 等同步启动场景保留默认(详细日志)。
|
|
1046
1051
|
*/
|
|
1047
|
-
async connectAll(servers) {
|
|
1052
|
+
async connectAll(servers, options = {}) {
|
|
1048
1053
|
const entries = Object.entries(servers);
|
|
1049
1054
|
if (entries.length === 0) return;
|
|
1050
1055
|
const promises = entries.map(async ([serverId, config]) => {
|
|
@@ -1052,12 +1057,16 @@ var McpManager = class {
|
|
|
1052
1057
|
this.clients.set(serverId, client);
|
|
1053
1058
|
try {
|
|
1054
1059
|
await client.connect();
|
|
1055
|
-
|
|
1060
|
+
if (!options.quiet) {
|
|
1061
|
+
process.stderr.write(`[mcp] \u2713 ${serverId}: connected (${client.serverName}, ${client.tools.length} tools)
|
|
1056
1062
|
`);
|
|
1063
|
+
}
|
|
1057
1064
|
} catch (err) {
|
|
1058
1065
|
const msg = err instanceof Error ? err.message : String(err);
|
|
1059
|
-
|
|
1066
|
+
if (!options.quiet) {
|
|
1067
|
+
process.stderr.write(`[mcp] \u2717 ${serverId}: ${msg}
|
|
1060
1068
|
`);
|
|
1069
|
+
}
|
|
1061
1070
|
}
|
|
1062
1071
|
});
|
|
1063
1072
|
await Promise.allSettled(promises);
|
|
@@ -1383,12 +1392,6 @@ var SkillManager = class {
|
|
|
1383
1392
|
skill.meta.name = entry;
|
|
1384
1393
|
}
|
|
1385
1394
|
this.skills.set(skill.meta.name, skill);
|
|
1386
|
-
if (this.warnThreshold > 0 && skill.content.length > this.warnThreshold) {
|
|
1387
|
-
process.stderr.write(
|
|
1388
|
-
`\u26A0 Skill '${skill.meta.name}' is ${skill.content.length} chars (>${this.warnThreshold}). Only consumed when activated via /skill. Adjust with: /config set ui.skillSizeWarn <n|0>
|
|
1389
|
-
`
|
|
1390
|
-
);
|
|
1391
|
-
}
|
|
1392
1395
|
}
|
|
1393
1396
|
}
|
|
1394
1397
|
return this.skills.size;
|
|
@@ -1402,6 +1405,12 @@ var SkillManager = class {
|
|
|
1402
1405
|
const skill = this.skills.get(name);
|
|
1403
1406
|
if (!skill) return null;
|
|
1404
1407
|
this.activeSkill = skill;
|
|
1408
|
+
if (this.warnThreshold > 0 && skill.content.length > this.warnThreshold) {
|
|
1409
|
+
process.stderr.write(
|
|
1410
|
+
`\u26A0 Skill '${skill.meta.name}' is ${skill.content.length} chars (>${this.warnThreshold}) \u2014 this will be injected into the system prompt now. Adjust threshold with: /config set ui.skillSizeWarn <n|0>
|
|
1411
|
+
`
|
|
1412
|
+
);
|
|
1413
|
+
}
|
|
1405
1414
|
return skill;
|
|
1406
1415
|
}
|
|
1407
1416
|
/** 停用当前技能 */
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getConfigDirUsage,
|
|
4
4
|
listRecentCrashes
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-J2PDFSAC.js";
|
|
6
6
|
import {
|
|
7
7
|
ProviderRegistry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-S7L2M6UP.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-N6A47HVC.js";
|
|
12
12
|
import {
|
|
13
13
|
getStatsSnapshot,
|
|
14
14
|
getTopFailingTools,
|
|
15
15
|
getTopUsedTools,
|
|
16
16
|
resetStats
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KAEHWVMV.js";
|
|
18
18
|
import "./chunk-2ZD3YTVM.js";
|
|
19
19
|
import {
|
|
20
20
|
DEV_STATE_FILE_NAME,
|
|
21
21
|
MEMORY_FILE_NAME,
|
|
22
22
|
VERSION
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-4FBL3RIZ.js";
|
|
24
24
|
import "./chunk-PDX44BCA.js";
|
|
25
25
|
|
|
26
26
|
// src/diagnostics/doctor-cli.ts
|
package/dist/electron-server.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
VERSION,
|
|
37
37
|
buildUserIdentityPrompt,
|
|
38
38
|
runTestsTool
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-NRUVVOE2.js";
|
|
40
40
|
import {
|
|
41
41
|
hasSemanticIndex,
|
|
42
42
|
semanticSearch
|
|
@@ -9163,8 +9163,13 @@ var McpManager = class {
|
|
|
9163
9163
|
/**
|
|
9164
9164
|
* 连接所有配置的 MCP 服务器(并发连接,单个失败不阻塞其他)。
|
|
9165
9165
|
* 连接结果通过 getStatus() 查看。
|
|
9166
|
+
*
|
|
9167
|
+
* @param options.quiet 抑制每个 server 的成功/失败 stderr 输出。REPL 在
|
|
9168
|
+
* 后台连接时启用 quiet,避免日志和已绘制的 readline prompt 互相穿插;
|
|
9169
|
+
* 连接完成后调用方自己用 getStatus() 渲染摘要(含失败列表)。
|
|
9170
|
+
* server.ts 等同步启动场景保留默认(详细日志)。
|
|
9166
9171
|
*/
|
|
9167
|
-
async connectAll(servers) {
|
|
9172
|
+
async connectAll(servers, options = {}) {
|
|
9168
9173
|
const entries = Object.entries(servers);
|
|
9169
9174
|
if (entries.length === 0) return;
|
|
9170
9175
|
const promises = entries.map(async ([serverId, config]) => {
|
|
@@ -9172,12 +9177,16 @@ var McpManager = class {
|
|
|
9172
9177
|
this.clients.set(serverId, client);
|
|
9173
9178
|
try {
|
|
9174
9179
|
await client.connect();
|
|
9175
|
-
|
|
9180
|
+
if (!options.quiet) {
|
|
9181
|
+
process.stderr.write(`[mcp] \u2713 ${serverId}: connected (${client.serverName}, ${client.tools.length} tools)
|
|
9176
9182
|
`);
|
|
9183
|
+
}
|
|
9177
9184
|
} catch (err) {
|
|
9178
9185
|
const msg = err instanceof Error ? err.message : String(err);
|
|
9179
|
-
|
|
9186
|
+
if (!options.quiet) {
|
|
9187
|
+
process.stderr.write(`[mcp] \u2717 ${serverId}: ${msg}
|
|
9180
9188
|
`);
|
|
9189
|
+
}
|
|
9181
9190
|
}
|
|
9182
9191
|
});
|
|
9183
9192
|
await Promise.allSettled(promises);
|
|
@@ -9503,12 +9512,6 @@ var SkillManager = class {
|
|
|
9503
9512
|
skill.meta.name = entry;
|
|
9504
9513
|
}
|
|
9505
9514
|
this.skills.set(skill.meta.name, skill);
|
|
9506
|
-
if (this.warnThreshold > 0 && skill.content.length > this.warnThreshold) {
|
|
9507
|
-
process.stderr.write(
|
|
9508
|
-
`\u26A0 Skill '${skill.meta.name}' is ${skill.content.length} chars (>${this.warnThreshold}). Only consumed when activated via /skill. Adjust with: /config set ui.skillSizeWarn <n|0>
|
|
9509
|
-
`
|
|
9510
|
-
);
|
|
9511
|
-
}
|
|
9512
9515
|
}
|
|
9513
9516
|
}
|
|
9514
9517
|
return this.skills.size;
|
|
@@ -9522,6 +9525,12 @@ var SkillManager = class {
|
|
|
9522
9525
|
const skill = this.skills.get(name);
|
|
9523
9526
|
if (!skill) return null;
|
|
9524
9527
|
this.activeSkill = skill;
|
|
9528
|
+
if (this.warnThreshold > 0 && skill.content.length > this.warnThreshold) {
|
|
9529
|
+
process.stderr.write(
|
|
9530
|
+
`\u26A0 Skill '${skill.meta.name}' is ${skill.content.length} chars (>${this.warnThreshold}) \u2014 this will be injected into the system prompt now. Adjust threshold with: /config set ui.skillSizeWarn <n|0>
|
|
9531
|
+
`
|
|
9532
|
+
);
|
|
9533
|
+
}
|
|
9525
9534
|
return skill;
|
|
9526
9535
|
}
|
|
9527
9536
|
/** 停用当前技能 */
|
|
@@ -9795,11 +9804,9 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
9795
9804
|
const confirmed = await this.confirm(call, dangerLevel);
|
|
9796
9805
|
if (!confirmed) {
|
|
9797
9806
|
const label = dangerLevel === "destructive" ? "destructive " : "";
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
isError: true
|
|
9802
|
-
};
|
|
9807
|
+
const rejectionMsg = `[User cancelled] The user declined the ${label}${call.name} operation. Do not retry without asking.`;
|
|
9808
|
+
this.sendToolCallResult(call, rejectionMsg, true);
|
|
9809
|
+
return { callId: call.id, content: rejectionMsg, isError: true };
|
|
9803
9810
|
}
|
|
9804
9811
|
}
|
|
9805
9812
|
try {
|
|
@@ -9842,11 +9849,9 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
9842
9849
|
if (decision === "all" || decision instanceof Set && decision.has(i + 1)) {
|
|
9843
9850
|
approvedIndices.push(i);
|
|
9844
9851
|
} else {
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
isError: true
|
|
9849
|
-
};
|
|
9852
|
+
const rejectionMsg = `[User rejected] File write rejected by user. Do not retry without asking.`;
|
|
9853
|
+
this.sendToolCallResult(calls[i], rejectionMsg, true);
|
|
9854
|
+
results[i] = { callId: calls[i].id, content: rejectionMsg, isError: true };
|
|
9850
9855
|
}
|
|
9851
9856
|
}
|
|
9852
9857
|
if (approvedIndices.length >= 2) {
|
|
@@ -12202,7 +12207,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
12202
12207
|
case "test": {
|
|
12203
12208
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
12204
12209
|
try {
|
|
12205
|
-
const { executeTests } = await import("./run-tests-
|
|
12210
|
+
const { executeTests } = await import("./run-tests-LI6ZDLSH.js");
|
|
12206
12211
|
const argStr = args.join(" ").trim();
|
|
12207
12212
|
let testArgs = {};
|
|
12208
12213
|
if (argStr) {
|
|
@@ -386,7 +386,7 @@ ${content}`);
|
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
389
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
389
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-DEBD3TIS.js");
|
|
390
390
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
391
391
|
let interrupted = false;
|
|
392
392
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
saveDevState,
|
|
17
17
|
sessionHasMeaningfulContent,
|
|
18
18
|
setupProxy
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HV4MMSLT.js";
|
|
20
20
|
import {
|
|
21
21
|
getConfigDirUsage,
|
|
22
22
|
listRecentCrashes,
|
|
23
23
|
writeCrashLog
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-J2PDFSAC.js";
|
|
25
25
|
import {
|
|
26
26
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
27
27
|
HALLUCINATION_CORRECTION_MESSAGE,
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
looksLikeDocumentBody,
|
|
40
40
|
stripPseudoToolCalls,
|
|
41
41
|
stripToolCallReminder
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-S7L2M6UP.js";
|
|
43
43
|
import {
|
|
44
44
|
ConfigManager
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-N6A47HVC.js";
|
|
46
46
|
import {
|
|
47
47
|
ToolExecutor,
|
|
48
48
|
ToolRegistry,
|
|
@@ -61,16 +61,16 @@ import {
|
|
|
61
61
|
spawnAgentContext,
|
|
62
62
|
theme,
|
|
63
63
|
undoStack
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-DDHU6VOW.js";
|
|
65
65
|
import "./chunk-3BICTI5M.js";
|
|
66
66
|
import "./chunk-2DXY7UGF.js";
|
|
67
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-TZRYEWXW.js";
|
|
68
68
|
import {
|
|
69
69
|
getStatsSnapshot,
|
|
70
70
|
getTopFailingTools,
|
|
71
71
|
getTopUsedTools,
|
|
72
72
|
installFlushOnExit
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-KAEHWVMV.js";
|
|
74
74
|
import "./chunk-2ZD3YTVM.js";
|
|
75
75
|
import {
|
|
76
76
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
SKILLS_DIR_NAME,
|
|
94
94
|
VERSION,
|
|
95
95
|
buildUserIdentityPrompt
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-4FBL3RIZ.js";
|
|
97
97
|
import {
|
|
98
98
|
formatGitContextForPrompt,
|
|
99
99
|
getGitContext,
|
|
@@ -1661,7 +1661,7 @@ ${text}
|
|
|
1661
1661
|
const { join: join6 } = await import("path");
|
|
1662
1662
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1663
1663
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-7KIP4X2V.js");
|
|
1664
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1664
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-AEX6CGDO.js");
|
|
1665
1665
|
const { approveProject, hashMcpFile } = await import("./project-trust-IFM7FXEV.js");
|
|
1666
1666
|
const cwd = process.cwd();
|
|
1667
1667
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2722,7 +2722,7 @@ ${hint}` : "")
|
|
|
2722
2722
|
usage: "/test [command|filter]",
|
|
2723
2723
|
async execute(args, ctx) {
|
|
2724
2724
|
try {
|
|
2725
|
-
const { executeTests } = await import("./run-tests-
|
|
2725
|
+
const { executeTests } = await import("./run-tests-2EHQ6R54.js");
|
|
2726
2726
|
const argStr = args.join(" ").trim();
|
|
2727
2727
|
let testArgs = {};
|
|
2728
2728
|
if (argStr) {
|
|
@@ -5250,25 +5250,29 @@ Session '${this.resumeSessionId}' not found.
|
|
|
5250
5250
|
if (Object.keys(mergedMcpServers).length > 0) {
|
|
5251
5251
|
this.mcpManager = new McpManager();
|
|
5252
5252
|
const mcpProjectCount = Object.keys(projectMcpServers).length;
|
|
5253
|
-
this.mcpManager.connectAll(mergedMcpServers).then(() => {
|
|
5253
|
+
this.mcpManager.connectAll(mergedMcpServers, { quiet: true }).then(() => {
|
|
5254
5254
|
const mcpTools = this.mcpManager.getAllTools();
|
|
5255
5255
|
for (const tool of mcpTools) {
|
|
5256
5256
|
this.toolRegistry.registerMcpTool(tool);
|
|
5257
5257
|
}
|
|
5258
|
-
const
|
|
5258
|
+
const statuses = this.mcpManager.getStatus();
|
|
5259
|
+
const connectedCount = statuses.filter((s) => s.connected).length;
|
|
5260
|
+
const failed = statuses.filter((s) => !s.connected);
|
|
5259
5261
|
const totalTools = this.mcpManager.getTotalToolCount();
|
|
5260
|
-
if (
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
`
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5262
|
+
if (statuses.length === 0) return;
|
|
5263
|
+
const sourceInfo = mcpProjectCount > 0 ? ` (${mcpProjectCount} from .mcp.json)` : "";
|
|
5264
|
+
let line = ` \u{1F50C} MCP: ${connectedCount}/${statuses.length} server(s), ${totalTools} tool(s)${sourceInfo}`;
|
|
5265
|
+
if (failed.length > 0) {
|
|
5266
|
+
const names = failed.map((f) => f.serverId).join(", ");
|
|
5267
|
+
line += ` \u26A0 failed: ${names}`;
|
|
5268
|
+
}
|
|
5269
|
+
process.stdout.write("\n" + theme.dim(line) + "\n");
|
|
5270
|
+
this.showPrompt();
|
|
5269
5271
|
}).catch((err) => {
|
|
5270
|
-
process.stderr.write(`
|
|
5272
|
+
process.stderr.write(`
|
|
5273
|
+
[mcp] connectAll error: ${err instanceof Error ? err.message : err}
|
|
5271
5274
|
`);
|
|
5275
|
+
this.showPrompt();
|
|
5272
5276
|
});
|
|
5273
5277
|
}
|
|
5274
5278
|
this.setupClipboardPaste();
|
|
@@ -7071,7 +7075,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7071
7075
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7072
7076
|
process.exit(1);
|
|
7073
7077
|
}
|
|
7074
|
-
const { startWebServer } = await import("./server-
|
|
7078
|
+
const { startWebServer } = await import("./server-Q2JSHPNK.js");
|
|
7075
7079
|
await startWebServer({ port, host: options.host });
|
|
7076
7080
|
});
|
|
7077
7081
|
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) => {
|
|
@@ -7206,12 +7210,12 @@ program.command("sessions").description("List recent conversation sessions").act
|
|
|
7206
7210
|
console.log();
|
|
7207
7211
|
});
|
|
7208
7212
|
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) => {
|
|
7209
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7213
|
+
const { runDoctorCli } = await import("./doctor-cli-VDXQRPNW.js");
|
|
7210
7214
|
await runDoctorCli({ json: !!options.json, resetStats: !!options.resetStats });
|
|
7211
7215
|
});
|
|
7212
7216
|
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) => {
|
|
7213
7217
|
try {
|
|
7214
|
-
const batch = await import("./batch-
|
|
7218
|
+
const batch = await import("./batch-NIKHWGRB.js");
|
|
7215
7219
|
switch (action) {
|
|
7216
7220
|
case "submit":
|
|
7217
7221
|
if (!arg) {
|
|
@@ -7254,7 +7258,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7254
7258
|
}
|
|
7255
7259
|
});
|
|
7256
7260
|
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) => {
|
|
7257
|
-
const { startMcpServer } = await import("./server-
|
|
7261
|
+
const { startMcpServer } = await import("./server-PZEYYUTG.js");
|
|
7258
7262
|
await startMcpServer({
|
|
7259
7263
|
allowDestructive: !!options.allowDestructive,
|
|
7260
7264
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7381,7 +7385,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
7381
7385
|
}),
|
|
7382
7386
|
config.get("customProviders")
|
|
7383
7387
|
);
|
|
7384
|
-
const { startHub } = await import("./hub-
|
|
7388
|
+
const { startHub } = await import("./hub-NAZQGJ7O.js");
|
|
7385
7389
|
await startHub(
|
|
7386
7390
|
{
|
|
7387
7391
|
topic: topic ?? "",
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DDHU6VOW.js";
|
|
5
5
|
import "./chunk-3BICTI5M.js";
|
|
6
6
|
import "./chunk-2DXY7UGF.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-TZRYEWXW.js";
|
|
8
8
|
import {
|
|
9
9
|
getDangerLevel,
|
|
10
10
|
runTool,
|
|
11
11
|
schemaToJsonSchema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KAEHWVMV.js";
|
|
13
13
|
import "./chunk-2ZD3YTVM.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4FBL3RIZ.js";
|
|
17
17
|
import "./chunk-4BKXL7SM.js";
|
|
18
18
|
import "./chunk-7ZJN4KLV.js";
|
|
19
19
|
import "./chunk-KHYD3WXE.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
loadDevState,
|
|
15
15
|
persistToolRound,
|
|
16
16
|
setupProxy
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HV4MMSLT.js";
|
|
18
18
|
import {
|
|
19
19
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
20
20
|
HALLUCINATION_CORRECTION_MESSAGE,
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
looksLikeDocumentBody,
|
|
29
29
|
stripPseudoToolCalls,
|
|
30
30
|
stripToolCallReminder
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-S7L2M6UP.js";
|
|
32
32
|
import {
|
|
33
33
|
ConfigManager
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-N6A47HVC.js";
|
|
35
35
|
import {
|
|
36
36
|
ToolExecutor,
|
|
37
37
|
ToolRegistry,
|
|
@@ -49,14 +49,14 @@ import {
|
|
|
49
49
|
spawnAgentContext,
|
|
50
50
|
truncateOutput,
|
|
51
51
|
undoStack
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-DDHU6VOW.js";
|
|
53
53
|
import "./chunk-3BICTI5M.js";
|
|
54
54
|
import "./chunk-2DXY7UGF.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-TZRYEWXW.js";
|
|
56
56
|
import {
|
|
57
57
|
getDangerLevel,
|
|
58
58
|
runTool
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-KAEHWVMV.js";
|
|
60
60
|
import "./chunk-2ZD3YTVM.js";
|
|
61
61
|
import {
|
|
62
62
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
SKILLS_DIR_NAME,
|
|
77
77
|
VERSION,
|
|
78
78
|
buildUserIdentityPrompt
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-4FBL3RIZ.js";
|
|
80
80
|
import {
|
|
81
81
|
formatGitContextForPrompt,
|
|
82
82
|
getGitContext,
|
|
@@ -345,11 +345,9 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
345
345
|
const confirmed = await this.confirm(call, dangerLevel);
|
|
346
346
|
if (!confirmed) {
|
|
347
347
|
const label = dangerLevel === "destructive" ? "destructive " : "";
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
isError: true
|
|
352
|
-
};
|
|
348
|
+
const rejectionMsg = `[User cancelled] The user declined the ${label}${call.name} operation. Do not retry without asking.`;
|
|
349
|
+
this.sendToolCallResult(call, rejectionMsg, true);
|
|
350
|
+
return { callId: call.id, content: rejectionMsg, isError: true };
|
|
353
351
|
}
|
|
354
352
|
}
|
|
355
353
|
try {
|
|
@@ -392,11 +390,9 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
|
|
|
392
390
|
if (decision === "all" || decision instanceof Set && decision.has(i + 1)) {
|
|
393
391
|
approvedIndices.push(i);
|
|
394
392
|
} else {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
isError: true
|
|
399
|
-
};
|
|
393
|
+
const rejectionMsg = `[User rejected] File write rejected by user. Do not retry without asking.`;
|
|
394
|
+
this.sendToolCallResult(calls[i], rejectionMsg, true);
|
|
395
|
+
results[i] = { callId: calls[i].id, content: rejectionMsg, isError: true };
|
|
400
396
|
}
|
|
401
397
|
}
|
|
402
398
|
if (approvedIndices.length >= 2) {
|
|
@@ -2464,7 +2460,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2464
2460
|
case "test": {
|
|
2465
2461
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
2466
2462
|
try {
|
|
2467
|
-
const { executeTests } = await import("./run-tests-
|
|
2463
|
+
const { executeTests } = await import("./run-tests-2EHQ6R54.js");
|
|
2468
2464
|
const argStr = args.join(" ").trim();
|
|
2469
2465
|
let testArgs = {};
|
|
2470
2466
|
if (argStr) {
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DDHU6VOW.js";
|
|
7
7
|
import "./chunk-3BICTI5M.js";
|
|
8
8
|
import "./chunk-2DXY7UGF.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-TZRYEWXW.js";
|
|
10
10
|
import {
|
|
11
11
|
getDangerLevel,
|
|
12
12
|
runTool
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KAEHWVMV.js";
|
|
14
14
|
import "./chunk-2ZD3YTVM.js";
|
|
15
15
|
import {
|
|
16
16
|
SUBAGENT_ALLOWED_TOOLS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4FBL3RIZ.js";
|
|
18
18
|
import "./chunk-4BKXL7SM.js";
|
|
19
19
|
import "./chunk-7ZJN4KLV.js";
|
|
20
20
|
import "./chunk-KHYD3WXE.js";
|