jinzd-ai-cli 0.4.95 → 0.4.97
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-EGNBEZ7L.js → batch-EQW2AHNH.js} +2 -2
- package/dist/{chunk-DBNMDRR3.js → chunk-5IGSGHOY.js} +1 -1
- package/dist/{chunk-27KAJTRV.js → chunk-6Y7D5ZH6.js} +2 -2
- package/dist/{chunk-VWJ6UJCF.js → chunk-7ICZMPIK.js} +23 -10
- package/dist/{chunk-64NBIR3O.js → chunk-VYU6KKQG.js} +1 -1
- package/dist/{chunk-KANAVCLY.js → chunk-YX5DCUCX.js} +1 -1
- package/dist/{chunk-3OTYFGZX.js → chunk-ZDEQ6F6I.js} +1 -1
- package/dist/electron-server.js +38 -13
- package/dist/{hub-6NPN7P76.js → hub-PS4HT3YH.js} +1 -1
- package/dist/index.js +18 -12
- package/dist/{run-tests-A3HXYWYK.js → run-tests-FL2UI4A4.js} +1 -1
- package/dist/{run-tests-52NQAWN3.js → run-tests-Q37NBHZI.js} +2 -2
- package/dist/{server-ON3BYV2G.js → server-MVUF5NWA.js} +21 -9
- package/dist/{server-DBJJXHMH.js → server-NGZP6A74.js} +3 -3
- package/dist/{task-orchestrator-3TEU2UXU.js → task-orchestrator-T37RXXJP.js} +3 -3
- 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-ZDEQ6F6I.js";
|
|
5
5
|
import "./chunk-2ZD3YTVM.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-YX5DCUCX.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/batch.ts
|
|
9
9
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-6VRJGH25.js";
|
|
24
24
|
import {
|
|
25
25
|
runTestsTool
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VYU6KKQG.js";
|
|
27
27
|
import {
|
|
28
28
|
CONFIG_DIR_NAME,
|
|
29
29
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
SUBAGENT_ALLOWED_TOOLS,
|
|
32
32
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
33
33
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YX5DCUCX.js";
|
|
35
35
|
|
|
36
36
|
// src/tools/types.ts
|
|
37
37
|
function isFileWriteTool(name) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
schemaToJsonSchema,
|
|
4
4
|
truncateForPersist
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6Y7D5ZH6.js";
|
|
6
6
|
import {
|
|
7
7
|
AuthError,
|
|
8
8
|
ProviderError,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
MCP_PROTOCOL_VERSION,
|
|
22
22
|
MCP_TOOL_PREFIX,
|
|
23
23
|
VERSION
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YX5DCUCX.js";
|
|
25
25
|
|
|
26
26
|
// src/providers/claude.ts
|
|
27
27
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -832,7 +832,14 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
832
832
|
}
|
|
833
833
|
/** 将 systemPrompt + messages 合并为 OpenAI messages 数组(system 消息放首位)。 */
|
|
834
834
|
buildMessages(request) {
|
|
835
|
-
const
|
|
835
|
+
const filtered = request.messages.filter((m) => m.role !== "tool" && !m.toolCalls);
|
|
836
|
+
const msgs = filtered.map((m) => {
|
|
837
|
+
const base = { role: m.role, content: m.content };
|
|
838
|
+
if (m.role === "assistant") {
|
|
839
|
+
base.reasoning_content = m.reasoningContent ?? "";
|
|
840
|
+
}
|
|
841
|
+
return base;
|
|
842
|
+
});
|
|
836
843
|
const systemContent = [request.systemPrompt, request.systemPromptVolatile].filter(Boolean).join("\n\n---\n\n");
|
|
837
844
|
if (systemContent) {
|
|
838
845
|
return [{ role: "system", content: systemContent }, ...msgs];
|
|
@@ -880,6 +887,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
880
887
|
signal: request.signal
|
|
881
888
|
});
|
|
882
889
|
let thinkingStarted = false;
|
|
890
|
+
let reasoningAccumulator = "";
|
|
883
891
|
for await (const chunk of stream) {
|
|
884
892
|
const choice = chunk.choices[0];
|
|
885
893
|
const done = choice?.finish_reason != null;
|
|
@@ -887,7 +895,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
887
895
|
yield {
|
|
888
896
|
delta: "",
|
|
889
897
|
done: true,
|
|
890
|
-
usage: toUsage(chunk.usage)
|
|
898
|
+
usage: toUsage(chunk.usage),
|
|
899
|
+
...reasoningAccumulator ? { reasoningContent: reasoningAccumulator } : {}
|
|
891
900
|
};
|
|
892
901
|
continue;
|
|
893
902
|
}
|
|
@@ -897,6 +906,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
897
906
|
yield { delta: "<think>", done: false };
|
|
898
907
|
thinkingStarted = true;
|
|
899
908
|
}
|
|
909
|
+
reasoningAccumulator += reasoningDelta;
|
|
900
910
|
yield { delta: reasoningDelta, done: false };
|
|
901
911
|
continue;
|
|
902
912
|
}
|
|
@@ -905,7 +915,11 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
905
915
|
thinkingStarted = false;
|
|
906
916
|
yield { delta: "</think>", done: false };
|
|
907
917
|
}
|
|
908
|
-
|
|
918
|
+
if (done) {
|
|
919
|
+
yield { delta, done, ...reasoningAccumulator ? { reasoningContent: reasoningAccumulator } : {} };
|
|
920
|
+
} else {
|
|
921
|
+
yield { delta, done };
|
|
922
|
+
}
|
|
909
923
|
}
|
|
910
924
|
} catch (err) {
|
|
911
925
|
throw this.wrapError(err);
|
|
@@ -1011,7 +1025,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1011
1025
|
});
|
|
1012
1026
|
return { toolCalls, usage, reasoningContent };
|
|
1013
1027
|
}
|
|
1014
|
-
return { content: message.content ?? "", usage };
|
|
1028
|
+
return { content: message.content ?? "", usage, ...reasoningContent ? { reasoningContent } : {} };
|
|
1015
1029
|
} catch (err) {
|
|
1016
1030
|
throw this.wrapError(err);
|
|
1017
1031
|
}
|
|
@@ -1174,9 +1188,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1174
1188
|
}
|
|
1175
1189
|
}))
|
|
1176
1190
|
};
|
|
1177
|
-
|
|
1178
|
-
assistantMsg.reasoning_content = reasoningContent;
|
|
1179
|
-
}
|
|
1191
|
+
assistantMsg.reasoning_content = reasoningContent ?? "";
|
|
1180
1192
|
const resultMsgs = results.map((r) => ({
|
|
1181
1193
|
role: "tool",
|
|
1182
1194
|
tool_call_id: r.callId,
|
|
@@ -1296,7 +1308,8 @@ var DeepSeekProvider = class extends OpenAICompatibleProvider {
|
|
|
1296
1308
|
...request,
|
|
1297
1309
|
_extraMessages: [
|
|
1298
1310
|
...request._extraMessages ?? [],
|
|
1299
|
-
|
|
1311
|
+
// DeepSeek V4 thinking 模式:assistant 消息必须含 reasoning_content(即使为空)
|
|
1312
|
+
{ role: "assistant", content: result.content, reasoning_content: "" },
|
|
1300
1313
|
{ role: "user", content: DEEPSEEK_CODE_BLOCK_CORRECTION }
|
|
1301
1314
|
]
|
|
1302
1315
|
};
|
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-5IGSGHOY.js";
|
|
40
40
|
import {
|
|
41
41
|
hasSemanticIndex,
|
|
42
42
|
semanticSearch
|
|
@@ -1343,7 +1343,14 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
/** 将 systemPrompt + messages 合并为 OpenAI messages 数组(system 消息放首位)。 */
|
|
1345
1345
|
buildMessages(request) {
|
|
1346
|
-
const
|
|
1346
|
+
const filtered = request.messages.filter((m) => m.role !== "tool" && !m.toolCalls);
|
|
1347
|
+
const msgs = filtered.map((m) => {
|
|
1348
|
+
const base = { role: m.role, content: m.content };
|
|
1349
|
+
if (m.role === "assistant") {
|
|
1350
|
+
base.reasoning_content = m.reasoningContent ?? "";
|
|
1351
|
+
}
|
|
1352
|
+
return base;
|
|
1353
|
+
});
|
|
1347
1354
|
const systemContent = [request.systemPrompt, request.systemPromptVolatile].filter(Boolean).join("\n\n---\n\n");
|
|
1348
1355
|
if (systemContent) {
|
|
1349
1356
|
return [{ role: "system", content: systemContent }, ...msgs];
|
|
@@ -1391,6 +1398,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1391
1398
|
signal: request.signal
|
|
1392
1399
|
});
|
|
1393
1400
|
let thinkingStarted = false;
|
|
1401
|
+
let reasoningAccumulator = "";
|
|
1394
1402
|
for await (const chunk of stream) {
|
|
1395
1403
|
const choice = chunk.choices[0];
|
|
1396
1404
|
const done = choice?.finish_reason != null;
|
|
@@ -1398,7 +1406,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1398
1406
|
yield {
|
|
1399
1407
|
delta: "",
|
|
1400
1408
|
done: true,
|
|
1401
|
-
usage: toUsage(chunk.usage)
|
|
1409
|
+
usage: toUsage(chunk.usage),
|
|
1410
|
+
...reasoningAccumulator ? { reasoningContent: reasoningAccumulator } : {}
|
|
1402
1411
|
};
|
|
1403
1412
|
continue;
|
|
1404
1413
|
}
|
|
@@ -1408,6 +1417,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1408
1417
|
yield { delta: "<think>", done: false };
|
|
1409
1418
|
thinkingStarted = true;
|
|
1410
1419
|
}
|
|
1420
|
+
reasoningAccumulator += reasoningDelta;
|
|
1411
1421
|
yield { delta: reasoningDelta, done: false };
|
|
1412
1422
|
continue;
|
|
1413
1423
|
}
|
|
@@ -1416,7 +1426,11 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1416
1426
|
thinkingStarted = false;
|
|
1417
1427
|
yield { delta: "</think>", done: false };
|
|
1418
1428
|
}
|
|
1419
|
-
|
|
1429
|
+
if (done) {
|
|
1430
|
+
yield { delta, done, ...reasoningAccumulator ? { reasoningContent: reasoningAccumulator } : {} };
|
|
1431
|
+
} else {
|
|
1432
|
+
yield { delta, done };
|
|
1433
|
+
}
|
|
1420
1434
|
}
|
|
1421
1435
|
} catch (err) {
|
|
1422
1436
|
throw this.wrapError(err);
|
|
@@ -1522,7 +1536,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1522
1536
|
});
|
|
1523
1537
|
return { toolCalls, usage, reasoningContent };
|
|
1524
1538
|
}
|
|
1525
|
-
return { content: message.content ?? "", usage };
|
|
1539
|
+
return { content: message.content ?? "", usage, ...reasoningContent ? { reasoningContent } : {} };
|
|
1526
1540
|
} catch (err) {
|
|
1527
1541
|
throw this.wrapError(err);
|
|
1528
1542
|
}
|
|
@@ -1685,9 +1699,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1685
1699
|
}
|
|
1686
1700
|
}))
|
|
1687
1701
|
};
|
|
1688
|
-
|
|
1689
|
-
assistantMsg.reasoning_content = reasoningContent;
|
|
1690
|
-
}
|
|
1702
|
+
assistantMsg.reasoning_content = reasoningContent ?? "";
|
|
1691
1703
|
const resultMsgs = results.map((r) => ({
|
|
1692
1704
|
role: "tool",
|
|
1693
1705
|
tool_call_id: r.callId,
|
|
@@ -1807,7 +1819,8 @@ var DeepSeekProvider = class extends OpenAICompatibleProvider {
|
|
|
1807
1819
|
...request,
|
|
1808
1820
|
_extraMessages: [
|
|
1809
1821
|
...request._extraMessages ?? [],
|
|
1810
|
-
|
|
1822
|
+
// DeepSeek V4 thinking 模式:assistant 消息必须含 reasoning_content(即使为空)
|
|
1823
|
+
{ role: "assistant", content: result.content, reasoning_content: "" },
|
|
1811
1824
|
{ role: "user", content: DEEPSEEK_CODE_BLOCK_CORRECTION }
|
|
1812
1825
|
]
|
|
1813
1826
|
};
|
|
@@ -9956,6 +9969,7 @@ var SessionHandler = class _SessionHandler {
|
|
|
9956
9969
|
signal: ac.signal
|
|
9957
9970
|
});
|
|
9958
9971
|
let fullContent = "";
|
|
9972
|
+
let simpleReasoning;
|
|
9959
9973
|
for await (const chunk of stream) {
|
|
9960
9974
|
if (ac.signal.aborted) break;
|
|
9961
9975
|
if (chunk.done) {
|
|
@@ -9964,12 +9978,18 @@ var SessionHandler = class _SessionHandler {
|
|
|
9964
9978
|
this.addWebSessionUsage(chunk.usage);
|
|
9965
9979
|
session.addTokenUsage(chunk.usage);
|
|
9966
9980
|
}
|
|
9981
|
+
if (chunk.reasoningContent) simpleReasoning = chunk.reasoningContent;
|
|
9967
9982
|
break;
|
|
9968
9983
|
}
|
|
9969
9984
|
fullContent += chunk.delta;
|
|
9970
9985
|
this.send({ type: "text_delta", delta: chunk.delta });
|
|
9971
9986
|
}
|
|
9972
|
-
session.addMessage({
|
|
9987
|
+
session.addMessage({
|
|
9988
|
+
role: "assistant",
|
|
9989
|
+
content: fullContent,
|
|
9990
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
9991
|
+
...simpleReasoning ? { reasoningContent: simpleReasoning } : {}
|
|
9992
|
+
});
|
|
9973
9993
|
} catch (err) {
|
|
9974
9994
|
if (err.name === "AbortError") {
|
|
9975
9995
|
this.send({ type: "info", message: "[interrupted]" });
|
|
@@ -10172,7 +10192,12 @@ Details: ${errMsg.split("\n")[0]}
|
|
|
10172
10192
|
continue;
|
|
10173
10193
|
}
|
|
10174
10194
|
this.send({ type: "response_done", content: result.content, usage: roundUsage });
|
|
10175
|
-
session.addMessage({
|
|
10195
|
+
session.addMessage({
|
|
10196
|
+
role: "assistant",
|
|
10197
|
+
content: result.content,
|
|
10198
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
10199
|
+
...result.reasoningContent ? { reasoningContent: result.reasoningContent } : {}
|
|
10200
|
+
});
|
|
10176
10201
|
this.addWebSessionUsage(roundUsage);
|
|
10177
10202
|
session.addTokenUsage(roundUsage);
|
|
10178
10203
|
return;
|
|
@@ -10369,7 +10394,7 @@ ${summaryResult.content}`,
|
|
|
10369
10394
|
}
|
|
10370
10395
|
return { toolCalls, usage, reasoningContent };
|
|
10371
10396
|
}
|
|
10372
|
-
return { content: textContent, usage };
|
|
10397
|
+
return { content: textContent, usage, reasoningContent };
|
|
10373
10398
|
}
|
|
10374
10399
|
// ── Commands ─────────────────────────────────────────────────────
|
|
10375
10400
|
async handleCommand(name, args) {
|
|
@@ -11375,7 +11400,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
11375
11400
|
case "test": {
|
|
11376
11401
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
11377
11402
|
try {
|
|
11378
|
-
const { executeTests } = await import("./run-tests-
|
|
11403
|
+
const { executeTests } = await import("./run-tests-FL2UI4A4.js");
|
|
11379
11404
|
const argStr = args.join(" ").trim();
|
|
11380
11405
|
let testArgs = {};
|
|
11381
11406
|
if (argStr) {
|
|
@@ -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-T37RXXJP.js");
|
|
389
389
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
390
390
|
let interrupted = false;
|
|
391
391
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -30,10 +30,10 @@ import {
|
|
|
30
30
|
saveDevState,
|
|
31
31
|
sessionHasMeaningfulContent,
|
|
32
32
|
setupProxy
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-7ICZMPIK.js";
|
|
34
34
|
import {
|
|
35
35
|
ConfigManager
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-ZDEQ6F6I.js";
|
|
37
37
|
import {
|
|
38
38
|
ToolExecutor,
|
|
39
39
|
ToolRegistry,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
spawnAgentContext,
|
|
53
53
|
theme,
|
|
54
54
|
undoStack
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-6Y7D5ZH6.js";
|
|
56
56
|
import "./chunk-2ZD3YTVM.js";
|
|
57
57
|
import {
|
|
58
58
|
fileCheckpoints
|
|
@@ -70,7 +70,7 @@ import "./chunk-KJLJPUY2.js";
|
|
|
70
70
|
import "./chunk-6VRJGH25.js";
|
|
71
71
|
import "./chunk-2DXY7UGF.js";
|
|
72
72
|
import "./chunk-KHYD3WXE.js";
|
|
73
|
-
import "./chunk-
|
|
73
|
+
import "./chunk-VYU6KKQG.js";
|
|
74
74
|
import {
|
|
75
75
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
76
76
|
AUTHOR,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
SKILLS_DIR_NAME,
|
|
93
93
|
VERSION,
|
|
94
94
|
buildUserIdentityPrompt
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-YX5DCUCX.js";
|
|
96
96
|
|
|
97
97
|
// src/index.ts
|
|
98
98
|
import { program } from "commander";
|
|
@@ -2612,7 +2612,7 @@ ${hint}` : "")
|
|
|
2612
2612
|
usage: "/test [command|filter]",
|
|
2613
2613
|
async execute(args, ctx) {
|
|
2614
2614
|
try {
|
|
2615
|
-
const { executeTests } = await import("./run-tests-
|
|
2615
|
+
const { executeTests } = await import("./run-tests-Q37NBHZI.js");
|
|
2616
2616
|
const argStr = args.join(" ").trim();
|
|
2617
2617
|
let testArgs = {};
|
|
2618
2618
|
if (argStr) {
|
|
@@ -6058,7 +6058,11 @@ ${mcpBudgetNote}` : "");
|
|
|
6058
6058
|
...streamResult.reasoningContent ? { reasoningContent: streamResult.reasoningContent } : {}
|
|
6059
6059
|
};
|
|
6060
6060
|
} else {
|
|
6061
|
-
result = {
|
|
6061
|
+
result = {
|
|
6062
|
+
content: streamResult.textContent,
|
|
6063
|
+
usage: streamResult.usage,
|
|
6064
|
+
...streamResult.reasoningContent ? { reasoningContent: streamResult.reasoningContent } : {}
|
|
6065
|
+
};
|
|
6062
6066
|
alreadyRendered = true;
|
|
6063
6067
|
}
|
|
6064
6068
|
} finally {
|
|
@@ -6160,10 +6164,12 @@ ${mcpBudgetNote}` : "");
|
|
|
6160
6164
|
}
|
|
6161
6165
|
}
|
|
6162
6166
|
lastResponseStore.content = finalContent;
|
|
6167
|
+
const finalReasoning = "reasoningContent" in result ? result.reasoningContent : void 0;
|
|
6163
6168
|
session.addMessage({
|
|
6164
6169
|
role: "assistant",
|
|
6165
6170
|
content: finalContent,
|
|
6166
|
-
timestamp: /* @__PURE__ */ new Date()
|
|
6171
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
6172
|
+
...finalReasoning ? { reasoningContent: finalReasoning } : {}
|
|
6167
6173
|
});
|
|
6168
6174
|
this.events.emit("message.after", { content: finalContent });
|
|
6169
6175
|
if (roundUsage.inputTokens > 0 || roundUsage.outputTokens > 0) {
|
|
@@ -6746,7 +6752,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
6746
6752
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
6747
6753
|
process.exit(1);
|
|
6748
6754
|
}
|
|
6749
|
-
const { startWebServer } = await import("./server-
|
|
6755
|
+
const { startWebServer } = await import("./server-MVUF5NWA.js");
|
|
6750
6756
|
await startWebServer({ port, host: options.host });
|
|
6751
6757
|
});
|
|
6752
6758
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -6869,7 +6875,7 @@ program.command("sessions").description("List recent conversation sessions").act
|
|
|
6869
6875
|
});
|
|
6870
6876
|
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) => {
|
|
6871
6877
|
try {
|
|
6872
|
-
const batch = await import("./batch-
|
|
6878
|
+
const batch = await import("./batch-EQW2AHNH.js");
|
|
6873
6879
|
switch (action) {
|
|
6874
6880
|
case "submit":
|
|
6875
6881
|
if (!arg) {
|
|
@@ -6912,7 +6918,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
6912
6918
|
}
|
|
6913
6919
|
});
|
|
6914
6920
|
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) => {
|
|
6915
|
-
const { startMcpServer } = await import("./server-
|
|
6921
|
+
const { startMcpServer } = await import("./server-NGZP6A74.js");
|
|
6916
6922
|
await startMcpServer({
|
|
6917
6923
|
allowDestructive: !!options.allowDestructive,
|
|
6918
6924
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7039,7 +7045,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
7039
7045
|
}),
|
|
7040
7046
|
config.get("customProviders")
|
|
7041
7047
|
);
|
|
7042
|
-
const { startHub } = await import("./hub-
|
|
7048
|
+
const { startHub } = await import("./hub-PS4HT3YH.js");
|
|
7043
7049
|
await startHub(
|
|
7044
7050
|
{
|
|
7045
7051
|
topic: topic ?? "",
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
persistToolRound,
|
|
24
24
|
rebuildExtraMessages,
|
|
25
25
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7ICZMPIK.js";
|
|
27
27
|
import {
|
|
28
28
|
ConfigManager
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ZDEQ6F6I.js";
|
|
30
30
|
import {
|
|
31
31
|
ToolExecutor,
|
|
32
32
|
ToolRegistry,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
spawnAgentContext,
|
|
45
45
|
truncateOutput,
|
|
46
46
|
undoStack
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-6Y7D5ZH6.js";
|
|
48
48
|
import "./chunk-2ZD3YTVM.js";
|
|
49
49
|
import "./chunk-4BKXL7SM.js";
|
|
50
50
|
import "./chunk-ANYYM4CF.js";
|
|
@@ -53,7 +53,7 @@ import "./chunk-KJLJPUY2.js";
|
|
|
53
53
|
import "./chunk-6VRJGH25.js";
|
|
54
54
|
import "./chunk-2DXY7UGF.js";
|
|
55
55
|
import "./chunk-KHYD3WXE.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-VYU6KKQG.js";
|
|
57
57
|
import {
|
|
58
58
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
59
59
|
AUTHOR,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
SKILLS_DIR_NAME,
|
|
73
73
|
VERSION,
|
|
74
74
|
buildUserIdentityPrompt
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-YX5DCUCX.js";
|
|
76
76
|
|
|
77
77
|
// src/web/server.ts
|
|
78
78
|
import express from "express";
|
|
@@ -820,6 +820,7 @@ var SessionHandler = class _SessionHandler {
|
|
|
820
820
|
signal: ac.signal
|
|
821
821
|
});
|
|
822
822
|
let fullContent = "";
|
|
823
|
+
let simpleReasoning;
|
|
823
824
|
for await (const chunk of stream) {
|
|
824
825
|
if (ac.signal.aborted) break;
|
|
825
826
|
if (chunk.done) {
|
|
@@ -828,12 +829,18 @@ var SessionHandler = class _SessionHandler {
|
|
|
828
829
|
this.addWebSessionUsage(chunk.usage);
|
|
829
830
|
session.addTokenUsage(chunk.usage);
|
|
830
831
|
}
|
|
832
|
+
if (chunk.reasoningContent) simpleReasoning = chunk.reasoningContent;
|
|
831
833
|
break;
|
|
832
834
|
}
|
|
833
835
|
fullContent += chunk.delta;
|
|
834
836
|
this.send({ type: "text_delta", delta: chunk.delta });
|
|
835
837
|
}
|
|
836
|
-
session.addMessage({
|
|
838
|
+
session.addMessage({
|
|
839
|
+
role: "assistant",
|
|
840
|
+
content: fullContent,
|
|
841
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
842
|
+
...simpleReasoning ? { reasoningContent: simpleReasoning } : {}
|
|
843
|
+
});
|
|
837
844
|
} catch (err) {
|
|
838
845
|
if (err.name === "AbortError") {
|
|
839
846
|
this.send({ type: "info", message: "[interrupted]" });
|
|
@@ -1036,7 +1043,12 @@ Details: ${errMsg.split("\n")[0]}
|
|
|
1036
1043
|
continue;
|
|
1037
1044
|
}
|
|
1038
1045
|
this.send({ type: "response_done", content: result.content, usage: roundUsage });
|
|
1039
|
-
session.addMessage({
|
|
1046
|
+
session.addMessage({
|
|
1047
|
+
role: "assistant",
|
|
1048
|
+
content: result.content,
|
|
1049
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
1050
|
+
...result.reasoningContent ? { reasoningContent: result.reasoningContent } : {}
|
|
1051
|
+
});
|
|
1040
1052
|
this.addWebSessionUsage(roundUsage);
|
|
1041
1053
|
session.addTokenUsage(roundUsage);
|
|
1042
1054
|
return;
|
|
@@ -1233,7 +1245,7 @@ ${summaryResult.content}`,
|
|
|
1233
1245
|
}
|
|
1234
1246
|
return { toolCalls, usage, reasoningContent };
|
|
1235
1247
|
}
|
|
1236
|
-
return { content: textContent, usage };
|
|
1248
|
+
return { content: textContent, usage, reasoningContent };
|
|
1237
1249
|
}
|
|
1238
1250
|
// ── Commands ─────────────────────────────────────────────────────
|
|
1239
1251
|
async handleCommand(name, args) {
|
|
@@ -2239,7 +2251,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2239
2251
|
case "test": {
|
|
2240
2252
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
2241
2253
|
try {
|
|
2242
|
-
const { executeTests } = await import("./run-tests-
|
|
2254
|
+
const { executeTests } = await import("./run-tests-Q37NBHZI.js");
|
|
2243
2255
|
const argStr = args.join(" ").trim();
|
|
2244
2256
|
let testArgs = {};
|
|
2245
2257
|
if (argStr) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
getDangerLevel,
|
|
5
5
|
schemaToJsonSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6Y7D5ZH6.js";
|
|
7
7
|
import "./chunk-2ZD3YTVM.js";
|
|
8
8
|
import "./chunk-4BKXL7SM.js";
|
|
9
9
|
import "./chunk-ANYYM4CF.js";
|
|
@@ -12,10 +12,10 @@ import "./chunk-KJLJPUY2.js";
|
|
|
12
12
|
import "./chunk-6VRJGH25.js";
|
|
13
13
|
import "./chunk-2DXY7UGF.js";
|
|
14
14
|
import "./chunk-KHYD3WXE.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-VYU6KKQG.js";
|
|
16
16
|
import {
|
|
17
17
|
VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YX5DCUCX.js";
|
|
19
19
|
|
|
20
20
|
// src/mcp/server.ts
|
|
21
21
|
import { createInterface } from "readline";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getDangerLevel,
|
|
5
5
|
googleSearchContext,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6Y7D5ZH6.js";
|
|
8
8
|
import "./chunk-2ZD3YTVM.js";
|
|
9
9
|
import "./chunk-4BKXL7SM.js";
|
|
10
10
|
import "./chunk-ANYYM4CF.js";
|
|
@@ -13,10 +13,10 @@ import "./chunk-KJLJPUY2.js";
|
|
|
13
13
|
import "./chunk-6VRJGH25.js";
|
|
14
14
|
import "./chunk-2DXY7UGF.js";
|
|
15
15
|
import "./chunk-KHYD3WXE.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-VYU6KKQG.js";
|
|
17
17
|
import {
|
|
18
18
|
SUBAGENT_ALLOWED_TOOLS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YX5DCUCX.js";
|
|
20
20
|
|
|
21
21
|
// src/hub/task-orchestrator.ts
|
|
22
22
|
import { createInterface } from "readline";
|