jinzd-ai-cli 0.4.181 → 0.4.182
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-DG5STMLZ.js → batch-ZBKVDSMZ.js} +2 -2
- package/dist/{chunk-ZWQ36YFI.js → chunk-4NPR3MFZ.js} +1 -1
- package/dist/{chunk-6SY45V62.js → chunk-C6UJBTZO.js} +2 -2
- package/dist/{chunk-CPZ7KG3Y.js → chunk-ISO5KVEJ.js} +1 -1
- package/dist/{chunk-4VB6UP4W.js → chunk-LWZ6P73G.js} +1 -1
- package/dist/{chunk-D4ZTYYBU.js → chunk-QUYLXQRU.js} +1 -1
- package/dist/{chunk-D774AWKW.js → chunk-RUUJHLEV.js} +1 -1
- package/dist/{chunk-ORXPLVM7.js → chunk-XI7EUUL7.js} +3 -3
- package/dist/{chunk-P2VFMUR5.js → chunk-YDIR3MXD.js} +1 -1
- package/dist/{ci-UXVUG3LC.js → ci-6WGF6ID6.js} +2 -2
- package/dist/{constants-5DFFSPWI.js → constants-JI7VPTMJ.js} +1 -1
- package/dist/{doctor-cli-GQBR6RI6.js → doctor-cli-KSB3MLFV.js} +4 -4
- package/dist/electron-server.js +2 -2
- package/dist/{hub-N75OQVNY.js → hub-DGEYFJPP.js} +1 -1
- package/dist/index.js +138 -21
- package/dist/{run-tests-673ABQQE.js → run-tests-GFOHEIWM.js} +2 -2
- package/dist/{run-tests-HZVKHQ33.js → run-tests-ZP5TPFTK.js} +1 -1
- package/dist/{server-SLDE3AML.js → server-2CBNRT2W.js} +7 -7
- package/dist/{server-RCUIX4R5.js → server-TXA5VTOS.js} +4 -4
- package/dist/{task-orchestrator-42D5LBAX.js → task-orchestrator-4T457G22.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-YDIR3MXD.js";
|
|
5
5
|
import "./chunk-TZQHYZKT.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-ISO5KVEJ.js";
|
|
7
7
|
import "./chunk-PDX44BCA.js";
|
|
8
8
|
|
|
9
9
|
// src/cli/batch.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
truncateForPersist
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XI7EUUL7.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-ISO5KVEJ.js";
|
|
15
15
|
|
|
16
16
|
// src/mcp/client.ts
|
|
17
17
|
import { spawn } from "child_process";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-HDSKW7Q3.js";
|
|
6
6
|
import {
|
|
7
7
|
runTestsTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QUYLXQRU.js";
|
|
9
9
|
import {
|
|
10
10
|
runTool
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LWZ6P73G.js";
|
|
12
12
|
import {
|
|
13
13
|
getDangerLevel,
|
|
14
14
|
isFileWriteTool
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
SUBAGENT_ALLOWED_TOOLS,
|
|
26
26
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
27
27
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ISO5KVEJ.js";
|
|
29
29
|
import {
|
|
30
30
|
fileCheckpoints
|
|
31
31
|
} from "./chunk-4BKXL7SM.js";
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
import "./chunk-HIU2SH4V.js";
|
|
11
11
|
import {
|
|
12
12
|
ConfigManager
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YDIR3MXD.js";
|
|
14
14
|
import "./chunk-TZQHYZKT.js";
|
|
15
15
|
import {
|
|
16
16
|
VERSION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ISO5KVEJ.js";
|
|
18
18
|
import "./chunk-PDX44BCA.js";
|
|
19
19
|
|
|
20
20
|
// src/cli/ci.ts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getConfigDirUsage,
|
|
4
4
|
listRecentCrashes
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4NPR3MFZ.js";
|
|
6
6
|
import {
|
|
7
7
|
ProviderRegistry
|
|
8
8
|
} from "./chunk-5LK7H45B.js";
|
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
getTopFailingTools,
|
|
12
12
|
getTopUsedTools,
|
|
13
13
|
resetStats
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LWZ6P73G.js";
|
|
15
15
|
import "./chunk-HIU2SH4V.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigManager
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YDIR3MXD.js";
|
|
19
19
|
import "./chunk-TZQHYZKT.js";
|
|
20
20
|
import {
|
|
21
21
|
DEV_STATE_FILE_NAME,
|
|
22
22
|
MEMORY_FILE_NAME,
|
|
23
23
|
VERSION
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ISO5KVEJ.js";
|
|
25
25
|
import "./chunk-PDX44BCA.js";
|
|
26
26
|
|
|
27
27
|
// 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-RUUJHLEV.js";
|
|
40
40
|
import {
|
|
41
41
|
hasSemanticIndex,
|
|
42
42
|
semanticSearch
|
|
@@ -13844,7 +13844,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
13844
13844
|
case "test": {
|
|
13845
13845
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
13846
13846
|
try {
|
|
13847
|
-
const { executeTests } = await import("./run-tests-
|
|
13847
|
+
const { executeTests } = await import("./run-tests-ZP5TPFTK.js");
|
|
13848
13848
|
const argStr = args.join(" ").trim();
|
|
13849
13849
|
let testArgs = {};
|
|
13850
13850
|
if (argStr) {
|
|
@@ -155,7 +155,7 @@ ${content}`);
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
158
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
158
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-4T457G22.js");
|
|
159
159
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
160
160
|
let interrupted = false;
|
|
161
161
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
saveDevState,
|
|
19
19
|
sessionHasMeaningfulContent,
|
|
20
20
|
setupProxy
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-C6UJBTZO.js";
|
|
22
22
|
import {
|
|
23
23
|
ToolExecutor,
|
|
24
24
|
ToolRegistry,
|
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
spawnAgentContext,
|
|
38
38
|
theme,
|
|
39
39
|
undoStack
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XI7EUUL7.js";
|
|
41
41
|
import "./chunk-HDSKW7Q3.js";
|
|
42
42
|
import "./chunk-ZWVIDFGY.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-QUYLXQRU.js";
|
|
44
44
|
import {
|
|
45
45
|
SessionManager,
|
|
46
46
|
getContentText
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
getConfigDirUsage,
|
|
50
50
|
listRecentCrashes,
|
|
51
51
|
writeCrashLog
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-4NPR3MFZ.js";
|
|
53
53
|
import {
|
|
54
54
|
BudgetWarner,
|
|
55
55
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
@@ -85,11 +85,11 @@ import {
|
|
|
85
85
|
getTopFailingTools,
|
|
86
86
|
getTopUsedTools,
|
|
87
87
|
installFlushOnExit
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-LWZ6P73G.js";
|
|
89
89
|
import "./chunk-HIU2SH4V.js";
|
|
90
90
|
import {
|
|
91
91
|
ConfigManager
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-YDIR3MXD.js";
|
|
93
93
|
import {
|
|
94
94
|
AuthError,
|
|
95
95
|
ProviderError,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
SKILLS_DIR_NAME,
|
|
117
117
|
VERSION,
|
|
118
118
|
buildUserIdentityPrompt
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-ISO5KVEJ.js";
|
|
120
120
|
import {
|
|
121
121
|
formatGitContextForPrompt,
|
|
122
122
|
getGitContext,
|
|
@@ -987,6 +987,61 @@ function copyToClipboard(text) {
|
|
|
987
987
|
}
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
|
+
var SESSION_PAGE_SIZE = 20;
|
|
991
|
+
function oneLinePreview(s, max) {
|
|
992
|
+
const flat = s.replace(/\s+/g, " ").trim();
|
|
993
|
+
return flat.length > max ? flat.slice(0, max - 1) + "\u2026" : flat;
|
|
994
|
+
}
|
|
995
|
+
function renderTranscriptMessage(msg, renderer) {
|
|
996
|
+
if (msg.role === "user") {
|
|
997
|
+
const text = getContentText(msg.content);
|
|
998
|
+
console.log(theme.success("You: ") + (text.includes("\n") ? "\n" + text : text));
|
|
999
|
+
console.log();
|
|
1000
|
+
} else if (msg.role === "assistant") {
|
|
1001
|
+
const text = getContentText(msg.content);
|
|
1002
|
+
if (msg.toolCalls && msg.toolCalls.length > 0) {
|
|
1003
|
+
if (text.trim()) {
|
|
1004
|
+
console.log(theme.dim(`Assistant: ${oneLinePreview(text, 100)}`));
|
|
1005
|
+
}
|
|
1006
|
+
for (const tc of msg.toolCalls) {
|
|
1007
|
+
console.log(theme.dim(` \u2699 ${tc.name} ${oneLinePreview(JSON.stringify(tc.arguments ?? {}), 80)}`));
|
|
1008
|
+
}
|
|
1009
|
+
} else if (text.trim()) {
|
|
1010
|
+
renderer.renderResponse(text);
|
|
1011
|
+
console.log();
|
|
1012
|
+
}
|
|
1013
|
+
} else if (msg.role === "tool") {
|
|
1014
|
+
const preview = oneLinePreview(getContentText(msg.content), 80);
|
|
1015
|
+
const paint = msg.isError ? theme.error : theme.dim;
|
|
1016
|
+
console.log(paint(` \u2192 ${msg.toolName ?? "tool"}: ${preview}`));
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
function renderTranscriptPage(messages, renderer, requestedPage) {
|
|
1020
|
+
const total = messages.length;
|
|
1021
|
+
if (total === 0) {
|
|
1022
|
+
renderer.printInfo("Session has no messages yet.");
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
const totalPages = Math.max(1, Math.ceil(total / SESSION_PAGE_SIZE));
|
|
1026
|
+
let page = requestedPage === void 0 || !Number.isFinite(requestedPage) ? totalPages : requestedPage;
|
|
1027
|
+
if (page < 1) page = 1;
|
|
1028
|
+
if (page > totalPages) page = totalPages;
|
|
1029
|
+
const start = (page - 1) * SESSION_PAGE_SIZE;
|
|
1030
|
+
const slice = messages.slice(start, start + SESSION_PAGE_SIZE);
|
|
1031
|
+
console.log();
|
|
1032
|
+
console.log(theme.info(` \u2500\u2500 Transcript page ${page}/${totalPages} (messages ${start + 1}\u2013${start + slice.length} of ${total}) \u2500\u2500`));
|
|
1033
|
+
console.log();
|
|
1034
|
+
for (const msg of slice) {
|
|
1035
|
+
renderTranscriptMessage(msg, renderer);
|
|
1036
|
+
}
|
|
1037
|
+
const hints = [];
|
|
1038
|
+
if (page > 1) hints.push(`/session page ${page - 1} = earlier`);
|
|
1039
|
+
if (page < totalPages) hints.push(`/session page ${page + 1} = later`);
|
|
1040
|
+
if (hints.length > 0) {
|
|
1041
|
+
console.log(theme.dim(` \u2500\u2500 ${hints.join(" \xB7 ")} \u2500\u2500`));
|
|
1042
|
+
}
|
|
1043
|
+
console.log();
|
|
1044
|
+
}
|
|
990
1045
|
var CommandRegistry = class {
|
|
991
1046
|
commands = /* @__PURE__ */ new Map();
|
|
992
1047
|
register(command) {
|
|
@@ -1060,7 +1115,7 @@ function createDefaultCommands() {
|
|
|
1060
1115
|
rows: [
|
|
1061
1116
|
["/clear", "Clear conversation history"],
|
|
1062
1117
|
["/compact [instruction]", "Summarize & compress history"],
|
|
1063
|
-
["/session new|list|load
|
|
1118
|
+
["/session new|list|load|show|page|remove", "Manage saved sessions (show = transcript + continue)"],
|
|
1064
1119
|
["/checkpoint [save|restore|delete] <name>", "Session checkpoints"],
|
|
1065
1120
|
["/fork [checkpoint]", "Fork session from checkpoint or current"],
|
|
1066
1121
|
["/branch [list|new|switch|delete|rename|diff|cherry-pick]", "Conversation branches"],
|
|
@@ -1334,8 +1389,8 @@ No commands match "${filter}".
|
|
|
1334
1389
|
{
|
|
1335
1390
|
name: "session",
|
|
1336
1391
|
description: "Session management",
|
|
1337
|
-
usage: "/session new|list|load <id>",
|
|
1338
|
-
execute(args, ctx) {
|
|
1392
|
+
usage: "/session new|list|load <id>|show <id> [page]|page <n>|remove <id>",
|
|
1393
|
+
async execute(args, ctx) {
|
|
1339
1394
|
const sub = args[0];
|
|
1340
1395
|
if (sub === "new") {
|
|
1341
1396
|
const provider = ctx.getCurrentProvider();
|
|
@@ -1362,10 +1417,10 @@ No commands match "${filter}".
|
|
|
1362
1417
|
s.title ?? "(untitled)"
|
|
1363
1418
|
])
|
|
1364
1419
|
);
|
|
1365
|
-
} else if (sub === "load") {
|
|
1420
|
+
} else if (sub === "load" || sub === "show") {
|
|
1366
1421
|
const id = args[1];
|
|
1367
1422
|
if (!id) {
|
|
1368
|
-
ctx.renderer.renderError(
|
|
1423
|
+
ctx.renderer.renderError(`Usage: /session ${sub} <id>${sub === "show" ? " [page]" : ""}`);
|
|
1369
1424
|
return;
|
|
1370
1425
|
}
|
|
1371
1426
|
const sessions = ctx.sessions.listSessions();
|
|
@@ -1387,8 +1442,70 @@ No commands match "${filter}".
|
|
|
1387
1442
|
ctx.renderer.printSuccess(
|
|
1388
1443
|
`Loaded session ${match.id.slice(0, 8)}: ${match.title ?? "(untitled)"}`
|
|
1389
1444
|
);
|
|
1445
|
+
if (sub === "show") {
|
|
1446
|
+
const pageArg = args[2] !== void 0 ? Number.parseInt(args[2], 10) : void 0;
|
|
1447
|
+
const cur = ctx.sessions.current;
|
|
1448
|
+
if (cur) renderTranscriptPage(cur.messages, ctx.renderer, pageArg);
|
|
1449
|
+
}
|
|
1450
|
+
} else if (sub === "page") {
|
|
1451
|
+
const cur = ctx.sessions.current;
|
|
1452
|
+
if (!cur) {
|
|
1453
|
+
ctx.renderer.renderError("No active session. Use /session show <id> first.");
|
|
1454
|
+
return;
|
|
1455
|
+
}
|
|
1456
|
+
const n = Number.parseInt(args[1] ?? "", 10);
|
|
1457
|
+
if (Number.isNaN(n)) {
|
|
1458
|
+
ctx.renderer.renderError("Usage: /session page <n>");
|
|
1459
|
+
return;
|
|
1460
|
+
}
|
|
1461
|
+
renderTranscriptPage(cur.messages, ctx.renderer, n);
|
|
1462
|
+
} else if (sub === "remove" || sub === "delete") {
|
|
1463
|
+
const id = args[1];
|
|
1464
|
+
if (!id) {
|
|
1465
|
+
ctx.renderer.renderError("Usage: /session remove <id>");
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1468
|
+
const sessions = ctx.sessions.listSessions();
|
|
1469
|
+
const matches2 = sessions.filter((s) => s.id.startsWith(id));
|
|
1470
|
+
if (matches2.length === 0) {
|
|
1471
|
+
ctx.renderer.renderError(`Session '${id}' not found.`);
|
|
1472
|
+
return;
|
|
1473
|
+
}
|
|
1474
|
+
if (matches2.length > 1) {
|
|
1475
|
+
ctx.renderer.renderError(`Ambiguous prefix '${id}' matches ${matches2.length} sessions \u2014 be more specific:`);
|
|
1476
|
+
for (const m of matches2.slice(0, 10)) {
|
|
1477
|
+
console.log(theme.dim(` ${m.id.slice(0, 12)} ${String(m.messageCount).padStart(4)} msgs ${m.updated.toLocaleDateString()} ${m.title ?? "(untitled)"}`));
|
|
1478
|
+
}
|
|
1479
|
+
return;
|
|
1480
|
+
}
|
|
1481
|
+
const match = matches2[0];
|
|
1482
|
+
const isCurrent = ctx.sessions.current?.id === match.id;
|
|
1483
|
+
console.log();
|
|
1484
|
+
console.log(theme.warning(" About to permanently delete session (no undo):"));
|
|
1485
|
+
console.log(` ${theme.info(match.id.slice(0, 12))} ${match.provider}/${match.model} ${match.messageCount} messages ${match.updated.toLocaleDateString()}`);
|
|
1486
|
+
console.log(` ${match.title ?? "(untitled)"}${isCurrent ? theme.warning(" \u2190 current session") : ""}`);
|
|
1487
|
+
console.log();
|
|
1488
|
+
const choice = await ctx.select("Delete this session?", [
|
|
1489
|
+
{ label: "No \u2014 keep it", value: "no" },
|
|
1490
|
+
{ label: "Yes \u2014 delete permanently", value: "yes", hint: "unlinks the history file" }
|
|
1491
|
+
]);
|
|
1492
|
+
if (choice !== "yes") {
|
|
1493
|
+
ctx.renderer.printInfo("Cancelled \u2014 session kept.");
|
|
1494
|
+
return;
|
|
1495
|
+
}
|
|
1496
|
+
if (!ctx.sessions.deleteSession(match.id)) {
|
|
1497
|
+
ctx.renderer.renderError("Delete failed \u2014 session file not found on disk.");
|
|
1498
|
+
return;
|
|
1499
|
+
}
|
|
1500
|
+
ctx.renderer.printSuccess(`Deleted session ${match.id.slice(0, 8)}: ${match.title ?? "(untitled)"}`);
|
|
1501
|
+
if (isCurrent) {
|
|
1502
|
+
ctx.sessions.createSession(ctx.getCurrentProvider(), ctx.getCurrentModel());
|
|
1503
|
+
ctx.resetSessionTokenUsage();
|
|
1504
|
+
ctx.clearDevState();
|
|
1505
|
+
ctx.renderer.printInfo("Current session was deleted \u2014 started a fresh session.");
|
|
1506
|
+
}
|
|
1390
1507
|
} else {
|
|
1391
|
-
ctx.renderer.renderError("Usage: /session new|list|load <id>");
|
|
1508
|
+
ctx.renderer.renderError("Usage: /session new|list|load <id>|show <id> [page]|page <n>|remove <id>");
|
|
1392
1509
|
}
|
|
1393
1510
|
}
|
|
1394
1511
|
},
|
|
@@ -1757,7 +1874,7 @@ No tools match "${filter}".
|
|
|
1757
1874
|
const { join: join6 } = await import("path");
|
|
1758
1875
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1759
1876
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-7KIP4X2V.js");
|
|
1760
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1877
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-JI7VPTMJ.js");
|
|
1761
1878
|
const { approveProject, hashMcpFile } = await import("./project-trust-IFM7FXEV.js");
|
|
1762
1879
|
const cwd = process.cwd();
|
|
1763
1880
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2818,7 +2935,7 @@ ${hint}` : "")
|
|
|
2818
2935
|
usage: "/test [command|filter]",
|
|
2819
2936
|
async execute(args, ctx) {
|
|
2820
2937
|
try {
|
|
2821
|
-
const { executeTests } = await import("./run-tests-
|
|
2938
|
+
const { executeTests } = await import("./run-tests-GFOHEIWM.js");
|
|
2822
2939
|
const argStr = args.join(" ").trim();
|
|
2823
2940
|
let testArgs = {};
|
|
2824
2941
|
if (argStr) {
|
|
@@ -7416,7 +7533,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7416
7533
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7417
7534
|
process.exit(1);
|
|
7418
7535
|
}
|
|
7419
|
-
const { startWebServer } = await import("./server-
|
|
7536
|
+
const { startWebServer } = await import("./server-2CBNRT2W.js");
|
|
7420
7537
|
await startWebServer({ port, host: options.host });
|
|
7421
7538
|
});
|
|
7422
7539
|
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) => {
|
|
@@ -7583,12 +7700,12 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
7583
7700
|
console.log(footer + "\n");
|
|
7584
7701
|
});
|
|
7585
7702
|
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) => {
|
|
7586
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7703
|
+
const { runDoctorCli } = await import("./doctor-cli-KSB3MLFV.js");
|
|
7587
7704
|
await runDoctorCli({ json: !!options.json, resetStats: !!options.resetStats });
|
|
7588
7705
|
});
|
|
7589
7706
|
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) => {
|
|
7590
7707
|
try {
|
|
7591
|
-
const batch = await import("./batch-
|
|
7708
|
+
const batch = await import("./batch-ZBKVDSMZ.js");
|
|
7592
7709
|
switch (action) {
|
|
7593
7710
|
case "submit":
|
|
7594
7711
|
if (!arg) {
|
|
@@ -7631,7 +7748,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7631
7748
|
}
|
|
7632
7749
|
});
|
|
7633
7750
|
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) => {
|
|
7634
|
-
const { startMcpServer } = await import("./server-
|
|
7751
|
+
const { startMcpServer } = await import("./server-TXA5VTOS.js");
|
|
7635
7752
|
await startMcpServer({
|
|
7636
7753
|
allowDestructive: !!options.allowDestructive,
|
|
7637
7754
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7640,7 +7757,7 @@ program.command("mcp-serve").description("Start an MCP server over STDIO, exposi
|
|
|
7640
7757
|
});
|
|
7641
7758
|
});
|
|
7642
7759
|
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; diff fetched via `gh pr diff <num>`", (v) => parseInt(v, 10)).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)").action(async (options) => {
|
|
7643
|
-
const { runCi } = await import("./ci-
|
|
7760
|
+
const { runCi } = await import("./ci-6WGF6ID6.js");
|
|
7644
7761
|
const result = await runCi({
|
|
7645
7762
|
pr: options.pr,
|
|
7646
7763
|
base: options.base,
|
|
@@ -7785,7 +7902,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
7785
7902
|
}),
|
|
7786
7903
|
config.get("customProviders")
|
|
7787
7904
|
);
|
|
7788
|
-
const { startHub } = await import("./hub-
|
|
7905
|
+
const { startHub } = await import("./hub-DGEYFJPP.js");
|
|
7789
7906
|
await startHub(
|
|
7790
7907
|
{
|
|
7791
7908
|
topic: topic ?? "",
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
loadDevState,
|
|
22
22
|
persistToolRound,
|
|
23
23
|
setupProxy
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-C6UJBTZO.js";
|
|
25
25
|
import {
|
|
26
26
|
ToolExecutor,
|
|
27
27
|
ToolRegistry,
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
spawnAgentContext,
|
|
40
40
|
truncateOutput,
|
|
41
41
|
undoStack
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-XI7EUUL7.js";
|
|
43
43
|
import "./chunk-HDSKW7Q3.js";
|
|
44
44
|
import "./chunk-ZWVIDFGY.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-QUYLXQRU.js";
|
|
46
46
|
import {
|
|
47
47
|
SessionManager,
|
|
48
48
|
getContentText
|
|
@@ -74,13 +74,13 @@ import {
|
|
|
74
74
|
} from "./chunk-5LK7H45B.js";
|
|
75
75
|
import {
|
|
76
76
|
runTool
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-LWZ6P73G.js";
|
|
78
78
|
import {
|
|
79
79
|
getDangerLevel
|
|
80
80
|
} from "./chunk-HIU2SH4V.js";
|
|
81
81
|
import {
|
|
82
82
|
ConfigManager
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-YDIR3MXD.js";
|
|
84
84
|
import "./chunk-TZQHYZKT.js";
|
|
85
85
|
import {
|
|
86
86
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
SKILLS_DIR_NAME,
|
|
101
101
|
VERSION,
|
|
102
102
|
buildUserIdentityPrompt
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-ISO5KVEJ.js";
|
|
104
104
|
import {
|
|
105
105
|
formatGitContextForPrompt,
|
|
106
106
|
getGitContext,
|
|
@@ -2487,7 +2487,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2487
2487
|
case "test": {
|
|
2488
2488
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
2489
2489
|
try {
|
|
2490
|
-
const { executeTests } = await import("./run-tests-
|
|
2490
|
+
const { executeTests } = await import("./run-tests-GFOHEIWM.js");
|
|
2491
2491
|
const argStr = args.join(" ").trim();
|
|
2492
2492
|
let testArgs = {};
|
|
2493
2493
|
if (argStr) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XI7EUUL7.js";
|
|
5
5
|
import "./chunk-HDSKW7Q3.js";
|
|
6
6
|
import "./chunk-ZWVIDFGY.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-QUYLXQRU.js";
|
|
8
8
|
import {
|
|
9
9
|
runTool
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LWZ6P73G.js";
|
|
11
11
|
import {
|
|
12
12
|
getDangerLevel,
|
|
13
13
|
schemaToJsonSchema
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import "./chunk-TZQHYZKT.js";
|
|
16
16
|
import {
|
|
17
17
|
VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ISO5KVEJ.js";
|
|
19
19
|
import "./chunk-4BKXL7SM.js";
|
|
20
20
|
import "./chunk-MM3F43H6.js";
|
|
21
21
|
import "./chunk-KHYD3WXE.js";
|
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XI7EUUL7.js";
|
|
7
7
|
import "./chunk-HDSKW7Q3.js";
|
|
8
8
|
import "./chunk-ZWVIDFGY.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-QUYLXQRU.js";
|
|
10
10
|
import {
|
|
11
11
|
runTool
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LWZ6P73G.js";
|
|
13
13
|
import {
|
|
14
14
|
getDangerLevel
|
|
15
15
|
} from "./chunk-HIU2SH4V.js";
|
|
16
16
|
import "./chunk-TZQHYZKT.js";
|
|
17
17
|
import {
|
|
18
18
|
SUBAGENT_ALLOWED_TOOLS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ISO5KVEJ.js";
|
|
20
20
|
import "./chunk-4BKXL7SM.js";
|
|
21
21
|
import "./chunk-MM3F43H6.js";
|
|
22
22
|
import "./chunk-KHYD3WXE.js";
|