jinzd-ai-cli 0.4.127 → 0.4.129
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-RAJMYTUL.js → batch-QQVEIO66.js} +2 -2
- package/dist/{chunk-QNGN5IFK.js → chunk-4GGFJ6PM.js} +2 -2
- package/dist/{chunk-4MI7WCPV.js → chunk-7OOI6HW3.js} +1 -1
- package/dist/{chunk-KE7O7Y24.js → chunk-ACNOWRIH.js} +1 -1
- package/dist/{chunk-BA5OHDRY.js → chunk-I3WL5KNV.js} +1 -1
- package/dist/{chunk-ZCARD5BR.js → chunk-NWQDJMXZ.js} +3 -3
- package/dist/{chunk-SHP2ARZL.js → chunk-RGO5ID2L.js} +1 -1
- package/dist/{chunk-4QTXJBH3.js → chunk-VGSNZS2W.js} +1 -1
- package/dist/{chunk-M6NJAJFE.js → chunk-WA7MTVDV.js} +1 -1
- package/dist/{chunk-ENVOODPW.js → chunk-WT2NPBJK.js} +1 -1
- package/dist/{constants-ASHQ3TNS.js → constants-TXSFY5JG.js} +1 -1
- package/dist/{doctor-cli-L3OA2GYS.js → doctor-cli-GXRMSWKQ.js} +5 -5
- package/dist/electron-server.js +2 -2
- package/dist/{hub-QXDG246X.js → hub-XKYA6MXH.js} +1 -1
- package/dist/index.js +91 -82
- package/dist/{run-tests-L5JPWMTU.js → run-tests-FYVO5PHC.js} +2 -2
- package/dist/{run-tests-NTQOVARA.js → run-tests-Y6IHV5KW.js} +1 -1
- package/dist/{server-C5LPEJVE.js → server-A7FJBICT.js} +8 -8
- package/dist/{server-QLH3F7HF.js → server-YETDY2PW.js} +4 -4
- package/dist/{task-orchestrator-QHOYTOVN.js → task-orchestrator-ORLZ2N3P.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-RGO5ID2L.js";
|
|
5
5
|
import "./chunk-2ZD3YTVM.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-WT2NPBJK.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-NWQDJMXZ.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-WT2NPBJK.js";
|
|
15
15
|
import {
|
|
16
16
|
redactJson
|
|
17
17
|
} from "./chunk-7ZJN4KLV.js";
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
} from "./chunk-3BICTI5M.js";
|
|
6
6
|
import {
|
|
7
7
|
runTestsTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WA7MTVDV.js";
|
|
9
9
|
import {
|
|
10
10
|
getDangerLevel,
|
|
11
11
|
isFileWriteTool,
|
|
12
12
|
runTool
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ACNOWRIH.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-WT2NPBJK.js";
|
|
27
27
|
import {
|
|
28
28
|
fileCheckpoints
|
|
29
29
|
} from "./chunk-4BKXL7SM.js";
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getConfigDirUsage,
|
|
4
4
|
listRecentCrashes
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7OOI6HW3.js";
|
|
6
6
|
import {
|
|
7
7
|
ProviderRegistry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-I3WL5KNV.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RGO5ID2L.js";
|
|
12
12
|
import {
|
|
13
13
|
getStatsSnapshot,
|
|
14
14
|
getTopFailingTools,
|
|
15
15
|
getTopUsedTools,
|
|
16
16
|
resetStats
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ACNOWRIH.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-WT2NPBJK.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-VGSNZS2W.js";
|
|
40
40
|
import {
|
|
41
41
|
hasSemanticIndex,
|
|
42
42
|
semanticSearch
|
|
@@ -12219,7 +12219,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
12219
12219
|
case "test": {
|
|
12220
12220
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
12221
12221
|
try {
|
|
12222
|
-
const { executeTests } = await import("./run-tests-
|
|
12222
|
+
const { executeTests } = await import("./run-tests-Y6IHV5KW.js");
|
|
12223
12223
|
const argStr = args.join(" ").trim();
|
|
12224
12224
|
let testArgs = {};
|
|
12225
12225
|
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-ORLZ2N3P.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-4GGFJ6PM.js";
|
|
20
20
|
import {
|
|
21
21
|
getConfigDirUsage,
|
|
22
22
|
listRecentCrashes,
|
|
23
23
|
writeCrashLog
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7OOI6HW3.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-I3WL5KNV.js";
|
|
43
43
|
import {
|
|
44
44
|
ConfigManager
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-RGO5ID2L.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-NWQDJMXZ.js";
|
|
65
65
|
import "./chunk-3BICTI5M.js";
|
|
66
66
|
import "./chunk-2DXY7UGF.js";
|
|
67
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-WA7MTVDV.js";
|
|
68
68
|
import {
|
|
69
69
|
getStatsSnapshot,
|
|
70
70
|
getTopFailingTools,
|
|
71
71
|
getTopUsedTools,
|
|
72
72
|
installFlushOnExit
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-ACNOWRIH.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-WT2NPBJK.js";
|
|
97
97
|
import {
|
|
98
98
|
formatGitContextForPrompt,
|
|
99
99
|
getGitContext,
|
|
@@ -124,6 +124,72 @@ import { existsSync as existsSync5, readFileSync as readFileSync4, readdirSync a
|
|
|
124
124
|
import { join as join5, resolve as resolve2, extname as extname2, dirname as dirname3, basename as basename2 } from "path";
|
|
125
125
|
import chalk4 from "chalk";
|
|
126
126
|
|
|
127
|
+
// src/session/title-generator.ts
|
|
128
|
+
var SYSTEM_PROMPT = 'You generate a very short title for a conversation. Rules: output ONLY the title (no quotes, no prefix like "Title:", no trailing punctuation). Length: \u2264 12 Chinese characters, or \u2264 6 English words. Match the language the user used. Capture the topic, not generic words like "question" or "help".';
|
|
129
|
+
function sanitizeTitle(raw) {
|
|
130
|
+
let t = (raw ?? "").trim();
|
|
131
|
+
t = t.replace(/^["'`「『《【\[]+|["'`」』》】\]]+$/g, "").trim();
|
|
132
|
+
t = t.replace(/^(title|标题)\s*[::]\s*/i, "").trim();
|
|
133
|
+
t = t.split(/\r?\n/)[0].trim();
|
|
134
|
+
if (t.length > 40) t = t.slice(0, 40);
|
|
135
|
+
return t;
|
|
136
|
+
}
|
|
137
|
+
function shouldGenerateTitle(session) {
|
|
138
|
+
if (session.titleAiGenerated) return false;
|
|
139
|
+
const hasUser = session.messages.some((m) => m.role === "user");
|
|
140
|
+
const hasAssistantText = session.messages.some(
|
|
141
|
+
(m) => m.role === "assistant" && getContentText(m.content).trim().length > 0
|
|
142
|
+
);
|
|
143
|
+
return hasUser && hasAssistantText;
|
|
144
|
+
}
|
|
145
|
+
async function maybeGenerateSessionTitle(session, provider, model, onSave) {
|
|
146
|
+
try {
|
|
147
|
+
if (!shouldGenerateTitle(session)) return;
|
|
148
|
+
const userMsg = session.messages.find((m) => m.role === "user");
|
|
149
|
+
const firstAssistantText = session.messages.find(
|
|
150
|
+
(m) => m.role === "assistant" && getContentText(m.content).trim().length > 0
|
|
151
|
+
);
|
|
152
|
+
const userText = userMsg ? getContentText(userMsg.content).slice(0, 800) : "";
|
|
153
|
+
const aiText = getContentText(firstAssistantText.content).slice(0, 800);
|
|
154
|
+
const promptMessages = [
|
|
155
|
+
{
|
|
156
|
+
role: "user",
|
|
157
|
+
content: `User: ${userText}
|
|
158
|
+
|
|
159
|
+
Assistant: ${aiText}
|
|
160
|
+
|
|
161
|
+
Now produce the title (\u2264 12 Chinese chars or \u2264 6 English words):`,
|
|
162
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
163
|
+
}
|
|
164
|
+
];
|
|
165
|
+
const resp = await provider.chat({
|
|
166
|
+
messages: promptMessages,
|
|
167
|
+
model,
|
|
168
|
+
systemPrompt: SYSTEM_PROMPT,
|
|
169
|
+
stream: false,
|
|
170
|
+
maxTokens: 40,
|
|
171
|
+
temperature: 0.3
|
|
172
|
+
});
|
|
173
|
+
const title = sanitizeTitle(resp.content);
|
|
174
|
+
if (!title) return;
|
|
175
|
+
session.title = title;
|
|
176
|
+
session.titleAiGenerated = true;
|
|
177
|
+
if (onSave) await onSave();
|
|
178
|
+
} catch {
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// src/session/interrupt-detector.ts
|
|
183
|
+
function isInterruptedSession(messages) {
|
|
184
|
+
if (messages.length === 0) return false;
|
|
185
|
+
const last = messages[messages.length - 1];
|
|
186
|
+
if (last.role === "tool") return true;
|
|
187
|
+
if (last.role === "assistant" && last.toolCalls && last.toolCalls.length > 0) {
|
|
188
|
+
return true;
|
|
189
|
+
}
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
|
|
127
193
|
// src/repl/renderer.ts
|
|
128
194
|
import chalk from "chalk";
|
|
129
195
|
import { createWriteStream, mkdirSync } from "fs";
|
|
@@ -1748,7 +1814,7 @@ No tools match "${filter}".
|
|
|
1748
1814
|
const { join: join6 } = await import("path");
|
|
1749
1815
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1750
1816
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-7KIP4X2V.js");
|
|
1751
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1817
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-TXSFY5JG.js");
|
|
1752
1818
|
const { approveProject, hashMcpFile } = await import("./project-trust-IFM7FXEV.js");
|
|
1753
1819
|
const cwd = process.cwd();
|
|
1754
1820
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2809,7 +2875,7 @@ ${hint}` : "")
|
|
|
2809
2875
|
usage: "/test [command|filter]",
|
|
2810
2876
|
async execute(args, ctx) {
|
|
2811
2877
|
try {
|
|
2812
|
-
const { executeTests } = await import("./run-tests-
|
|
2878
|
+
const { executeTests } = await import("./run-tests-FYVO5PHC.js");
|
|
2813
2879
|
const argStr = args.join(" ").trim();
|
|
2814
2880
|
let testArgs = {};
|
|
2815
2881
|
if (argStr) {
|
|
@@ -5246,15 +5312,10 @@ Session '${this.resumeSessionId}' not found.
|
|
|
5246
5312
|
process.stdout.write(
|
|
5247
5313
|
theme.dim(` \u{1F4C2} Resumed session: ${session.id.slice(0, 8)} `) + theme.dim(`(${session.messages.length} messages`) + (session.title ? theme.dim(`, "${session.title}"`) : "") + theme.dim(")\n")
|
|
5248
5314
|
);
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
if (isIncomplete) {
|
|
5254
|
-
process.stdout.write(
|
|
5255
|
-
theme.warning(" \u26A0 Session appears to have been interrupted mid-task (last message is tool output).\n") + theme.dim(" The AI will see the tool history and can continue where it left off.\n") + theme.dim(' Tip: type "continue where you left off" or describe what to do next.\n')
|
|
5256
|
-
);
|
|
5257
|
-
}
|
|
5315
|
+
if (isInterruptedSession(session.messages)) {
|
|
5316
|
+
process.stdout.write(
|
|
5317
|
+
theme.warning(" \u26A0 Session appears to have been interrupted mid-task (last message is tool output).\n") + theme.dim(" The AI will see the tool history and can continue where it left off.\n") + theme.dim(' Tip: type "continue where you left off" or describe what to do next.\n')
|
|
5318
|
+
);
|
|
5258
5319
|
}
|
|
5259
5320
|
}
|
|
5260
5321
|
if (layers.length > 0) {
|
|
@@ -5583,7 +5644,12 @@ Session '${this.resumeSessionId}' not found.
|
|
|
5583
5644
|
}
|
|
5584
5645
|
await this.sessions.save();
|
|
5585
5646
|
}
|
|
5586
|
-
void
|
|
5647
|
+
void maybeGenerateSessionTitle(
|
|
5648
|
+
session,
|
|
5649
|
+
this.providers.get(this.currentProvider),
|
|
5650
|
+
routingDecision.model,
|
|
5651
|
+
this.config.get("session").autoSave ? () => this.sessions.save() : void 0
|
|
5652
|
+
);
|
|
5587
5653
|
this.costTracker.save();
|
|
5588
5654
|
const budgetWarning = this.costTracker.checkBudget(this.config.get("monthlyBudget"));
|
|
5589
5655
|
if (budgetWarning) {
|
|
@@ -6165,63 +6231,6 @@ Session '${this.resumeSessionId}' not found.
|
|
|
6165
6231
|
finishReason
|
|
6166
6232
|
};
|
|
6167
6233
|
}
|
|
6168
|
-
/**
|
|
6169
|
-
* 首轮 AI 回复后异步生成简短摘要标题,替换 addMessage 的截断 heuristic(v0.4.126+)。
|
|
6170
|
-
*
|
|
6171
|
-
* 触发条件:
|
|
6172
|
-
* - session 尚未有 AI 生成的标题(titleAiGenerated !== true)
|
|
6173
|
-
* - 有至少一条用户消息 + 一条带文本的 assistant 消息
|
|
6174
|
-
*
|
|
6175
|
-
* 用当前 provider 的 chat() 接口做一次轻量调用,最多 ~30 tokens。
|
|
6176
|
-
* 失败静默回退到现有截断标题(已经写在 session.title 上),不打扰用户。
|
|
6177
|
-
* 完成后再 save() 一次以持久化新标题。
|
|
6178
|
-
*/
|
|
6179
|
-
async maybeGenerateSessionTitle(session, model) {
|
|
6180
|
-
try {
|
|
6181
|
-
if (session.titleAiGenerated) return;
|
|
6182
|
-
const hasUser = session.messages.some((m) => m.role === "user");
|
|
6183
|
-
const firstAssistantText = session.messages.find(
|
|
6184
|
-
(m) => m.role === "assistant" && getContentText(m.content).trim().length > 0
|
|
6185
|
-
);
|
|
6186
|
-
if (!hasUser || !firstAssistantText) return;
|
|
6187
|
-
const provider = this.providers.get(this.currentProvider);
|
|
6188
|
-
const userMsg = session.messages.find((m) => m.role === "user");
|
|
6189
|
-
const userText = userMsg ? getContentText(userMsg.content).slice(0, 800) : "";
|
|
6190
|
-
const aiText = getContentText(firstAssistantText.content).slice(0, 800);
|
|
6191
|
-
const systemPrompt = 'You generate a very short title for a conversation. Rules: output ONLY the title (no quotes, no prefix like "Title:", no trailing punctuation). Length: \u2264 12 Chinese characters, or \u2264 6 English words. Match the language the user used. Capture the topic, not generic words like "question" or "help".';
|
|
6192
|
-
const promptMessages = [
|
|
6193
|
-
{
|
|
6194
|
-
role: "user",
|
|
6195
|
-
content: `User: ${userText}
|
|
6196
|
-
|
|
6197
|
-
Assistant: ${aiText}
|
|
6198
|
-
|
|
6199
|
-
Now produce the title (\u2264 12 Chinese chars or \u2264 6 English words):`,
|
|
6200
|
-
timestamp: /* @__PURE__ */ new Date()
|
|
6201
|
-
}
|
|
6202
|
-
];
|
|
6203
|
-
const resp = await provider.chat({
|
|
6204
|
-
messages: promptMessages,
|
|
6205
|
-
model,
|
|
6206
|
-
systemPrompt,
|
|
6207
|
-
stream: false,
|
|
6208
|
-
maxTokens: 40,
|
|
6209
|
-
temperature: 0.3
|
|
6210
|
-
});
|
|
6211
|
-
let title = (resp.content ?? "").trim();
|
|
6212
|
-
title = title.replace(/^["'`「『《【\[]+|["'`」』》】\]]+$/g, "").trim();
|
|
6213
|
-
title = title.replace(/^(title|标题)\s*[::]\s*/i, "").trim();
|
|
6214
|
-
title = title.split(/\r?\n/)[0].trim();
|
|
6215
|
-
if (title.length > 40) title = title.slice(0, 40);
|
|
6216
|
-
if (!title) return;
|
|
6217
|
-
session.title = title;
|
|
6218
|
-
session.titleAiGenerated = true;
|
|
6219
|
-
if (this.config.get("session").autoSave) {
|
|
6220
|
-
await this.sessions.save();
|
|
6221
|
-
}
|
|
6222
|
-
} catch {
|
|
6223
|
-
}
|
|
6224
|
-
}
|
|
6225
6234
|
async handleChatWithTools(provider, messages, modelOverride) {
|
|
6226
6235
|
const session = this.sessions.current;
|
|
6227
6236
|
const effectiveModel = modelOverride ?? this.currentModel;
|
|
@@ -7273,7 +7282,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7273
7282
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7274
7283
|
process.exit(1);
|
|
7275
7284
|
}
|
|
7276
|
-
const { startWebServer } = await import("./server-
|
|
7285
|
+
const { startWebServer } = await import("./server-A7FJBICT.js");
|
|
7277
7286
|
await startWebServer({ port, host: options.host });
|
|
7278
7287
|
});
|
|
7279
7288
|
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) => {
|
|
@@ -7440,12 +7449,12 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
7440
7449
|
console.log(footer + "\n");
|
|
7441
7450
|
});
|
|
7442
7451
|
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) => {
|
|
7443
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7452
|
+
const { runDoctorCli } = await import("./doctor-cli-GXRMSWKQ.js");
|
|
7444
7453
|
await runDoctorCli({ json: !!options.json, resetStats: !!options.resetStats });
|
|
7445
7454
|
});
|
|
7446
7455
|
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) => {
|
|
7447
7456
|
try {
|
|
7448
|
-
const batch = await import("./batch-
|
|
7457
|
+
const batch = await import("./batch-QQVEIO66.js");
|
|
7449
7458
|
switch (action) {
|
|
7450
7459
|
case "submit":
|
|
7451
7460
|
if (!arg) {
|
|
@@ -7488,7 +7497,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7488
7497
|
}
|
|
7489
7498
|
});
|
|
7490
7499
|
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) => {
|
|
7491
|
-
const { startMcpServer } = await import("./server-
|
|
7500
|
+
const { startMcpServer } = await import("./server-YETDY2PW.js");
|
|
7492
7501
|
await startMcpServer({
|
|
7493
7502
|
allowDestructive: !!options.allowDestructive,
|
|
7494
7503
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7615,7 +7624,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
7615
7624
|
}),
|
|
7616
7625
|
config.get("customProviders")
|
|
7617
7626
|
);
|
|
7618
|
-
const { startHub } = await import("./hub-
|
|
7627
|
+
const { startHub } = await import("./hub-XKYA6MXH.js");
|
|
7619
7628
|
await startHub(
|
|
7620
7629
|
{
|
|
7621
7630
|
topic: topic ?? "",
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
loadDevState,
|
|
15
15
|
persistToolRound,
|
|
16
16
|
setupProxy
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4GGFJ6PM.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-I3WL5KNV.js";
|
|
32
32
|
import {
|
|
33
33
|
ConfigManager
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-RGO5ID2L.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-NWQDJMXZ.js";
|
|
53
53
|
import "./chunk-3BICTI5M.js";
|
|
54
54
|
import "./chunk-2DXY7UGF.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-WA7MTVDV.js";
|
|
56
56
|
import {
|
|
57
57
|
getDangerLevel,
|
|
58
58
|
runTool
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-ACNOWRIH.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-WT2NPBJK.js";
|
|
80
80
|
import {
|
|
81
81
|
formatGitContextForPrompt,
|
|
82
82
|
getGitContext,
|
|
@@ -2460,7 +2460,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2460
2460
|
case "test": {
|
|
2461
2461
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
2462
2462
|
try {
|
|
2463
|
-
const { executeTests } = await import("./run-tests-
|
|
2463
|
+
const { executeTests } = await import("./run-tests-FYVO5PHC.js");
|
|
2464
2464
|
const argStr = args.join(" ").trim();
|
|
2465
2465
|
let testArgs = {};
|
|
2466
2466
|
if (argStr) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NWQDJMXZ.js";
|
|
5
5
|
import "./chunk-3BICTI5M.js";
|
|
6
6
|
import "./chunk-2DXY7UGF.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-WA7MTVDV.js";
|
|
8
8
|
import {
|
|
9
9
|
getDangerLevel,
|
|
10
10
|
runTool,
|
|
11
11
|
schemaToJsonSchema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ACNOWRIH.js";
|
|
13
13
|
import "./chunk-2ZD3YTVM.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WT2NPBJK.js";
|
|
17
17
|
import "./chunk-4BKXL7SM.js";
|
|
18
18
|
import "./chunk-7ZJN4KLV.js";
|
|
19
19
|
import "./chunk-KHYD3WXE.js";
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NWQDJMXZ.js";
|
|
7
7
|
import "./chunk-3BICTI5M.js";
|
|
8
8
|
import "./chunk-2DXY7UGF.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-WA7MTVDV.js";
|
|
10
10
|
import {
|
|
11
11
|
getDangerLevel,
|
|
12
12
|
runTool
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ACNOWRIH.js";
|
|
14
14
|
import "./chunk-2ZD3YTVM.js";
|
|
15
15
|
import {
|
|
16
16
|
SUBAGENT_ALLOWED_TOOLS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WT2NPBJK.js";
|
|
18
18
|
import "./chunk-4BKXL7SM.js";
|
|
19
19
|
import "./chunk-7ZJN4KLV.js";
|
|
20
20
|
import "./chunk-KHYD3WXE.js";
|