jinzd-ai-cli 0.4.260 → 0.4.261
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-LBMJWMMO.js → batch-YUPAC4CK.js} +2 -2
- package/dist/{chunk-KRENSXPC.js → chunk-323S2X5I.js} +1 -1
- package/dist/{chunk-VJP2GLW5.js → chunk-GC4KA5LF.js} +1 -1
- package/dist/{chunk-K6WMQBUP.js → chunk-H6FND2UG.js} +1 -1
- package/dist/{chunk-3TE7ZWO5.js → chunk-HGTDI5ME.js} +1 -1
- package/dist/{chunk-NEYNE6UE.js → chunk-HU3IYBU5.js} +11 -9
- package/dist/{chunk-XTA3LSPQ.js → chunk-KFNQESEG.js} +1 -1
- package/dist/{chunk-HBR33J6J.js → chunk-KQQHMGK7.js} +1 -1
- package/dist/{chunk-63M2ELJS.js → chunk-NOB2OPQI.js} +4 -4
- package/dist/{chunk-U2HN3EW6.js → chunk-OIOTHBDB.js} +1 -1
- package/dist/{chunk-26C6YZ3A.js → chunk-R6DXWVVN.js} +1 -1
- package/dist/{chunk-CLJKNKUN.js → chunk-T7R7ILYT.js} +1 -1
- package/dist/{chunk-Y7UZSFGS.js → chunk-W5XUZYQE.js} +1 -1
- package/dist/{chunk-FCPYMBTA.js → chunk-XZNRZGG2.js} +57 -25
- package/dist/{chunk-AAWV4BP4.js → chunk-YXMBP567.js} +2 -2
- package/dist/{chunk-2BGNEVS5.js → chunk-Z5TCAE4L.js} +4 -4
- package/dist/{ci-PSA7F4EI.js → ci-FX26BNT2.js} +6 -6
- package/dist/{ci-format-WAHEZZMY.js → ci-format-GEWIAIZD.js} +2 -2
- package/dist/{constants-C55LGUR7.js → constants-YN4B6C7B.js} +1 -1
- package/dist/{doctor-cli-YANDJBHC.js → doctor-cli-PXGXZYQB.js} +6 -6
- package/dist/electron-server.js +69 -35
- package/dist/{hub-CBOC3TT3.js → hub-RCANK6SK.js} +1 -1
- package/dist/index.js +86 -39
- package/dist/{persistent-memory-DUFOZTDV.js → persistent-memory-P3COUZZM.js} +2 -2
- package/dist/{persistent-memory-KEYVKD54.js → persistent-memory-UARSSYAA.js} +2 -2
- package/dist/{pr-T6KCK5DT.js → pr-7LQTAUFK.js} +6 -6
- package/dist/{run-tests-S2RLPMCR.js → run-tests-7RYU4BK5.js} +2 -2
- package/dist/{run-tests-K43DLTA3.js → run-tests-YNHESHYY.js} +2 -2
- package/dist/{server-SV3TV5BJ.js → server-SSAWGNT7.js} +13 -13
- package/dist/{server-GTRCCOXN.js → server-YZ37TL46.js} +6 -6
- package/dist/{task-orchestrator-DW5AWW7J.js → task-orchestrator-ZFL4E6NZ.js} +6 -6
- package/dist/{usage-BP442V2Q.js → usage-PDKM7J75.js} +2 -2
- package/package.json +1 -1
|
@@ -154,7 +154,7 @@ ${content}`);
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
157
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
157
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-ZFL4E6NZ.js");
|
|
158
158
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
159
159
|
let interrupted = false;
|
|
160
160
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
scanProject,
|
|
18
18
|
sessionHasMeaningfulContent,
|
|
19
19
|
setupProxy
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YXMBP567.js";
|
|
21
21
|
import {
|
|
22
22
|
computeCost,
|
|
23
23
|
formatCost,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
spawnAgentContext,
|
|
51
51
|
theme,
|
|
52
52
|
undoStack
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-HU3IYBU5.js";
|
|
54
54
|
import {
|
|
55
55
|
addMemoryEntry,
|
|
56
56
|
backupMemoryStore,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
touchMemoryReferences,
|
|
77
77
|
updateMemoryApproval,
|
|
78
78
|
updateMemoryEntry
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-HGTDI5ME.js";
|
|
80
80
|
import "./chunk-GLSR2NR3.js";
|
|
81
81
|
import "./chunk-UUSRWSSX.js";
|
|
82
82
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -90,13 +90,13 @@ import {
|
|
|
90
90
|
formatDoctorReport,
|
|
91
91
|
loadContextFiles,
|
|
92
92
|
writeCrashLog
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-NOB2OPQI.js";
|
|
94
94
|
import {
|
|
95
95
|
ProviderRegistry
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-OIOTHBDB.js";
|
|
97
97
|
import {
|
|
98
98
|
ConfigManager
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-H6FND2UG.js";
|
|
100
100
|
import {
|
|
101
101
|
describePlugin,
|
|
102
102
|
getActivePluginAssets,
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
trustHook,
|
|
114
114
|
trustPlugin,
|
|
115
115
|
untrustHook
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-W5XUZYQE.js";
|
|
117
117
|
import {
|
|
118
118
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
119
119
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -133,7 +133,7 @@ import {
|
|
|
133
133
|
stripOuterCodeFence,
|
|
134
134
|
stripToolCallReminder,
|
|
135
135
|
teeStreamErrorSummary
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-XZNRZGG2.js";
|
|
137
137
|
import {
|
|
138
138
|
AuthError,
|
|
139
139
|
ProviderError,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
import {
|
|
148
148
|
fileCheckpoints
|
|
149
149
|
} from "./chunk-4BKXL7SM.js";
|
|
150
|
-
import "./chunk-
|
|
150
|
+
import "./chunk-KQQHMGK7.js";
|
|
151
151
|
import {
|
|
152
152
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
153
153
|
AUTHOR,
|
|
@@ -166,7 +166,7 @@ import {
|
|
|
166
166
|
SKILLS_DIR_NAME,
|
|
167
167
|
VERSION,
|
|
168
168
|
buildUserIdentityPrompt
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-323S2X5I.js";
|
|
170
170
|
import {
|
|
171
171
|
buildChatIndex,
|
|
172
172
|
clearChatIndex,
|
|
@@ -1398,7 +1398,7 @@ No tools match "${filter}".
|
|
|
1398
1398
|
const { join: join6 } = await import("path");
|
|
1399
1399
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1400
1400
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
|
|
1401
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1401
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-YN4B6C7B.js");
|
|
1402
1402
|
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
1403
1403
|
const cwd = process.cwd();
|
|
1404
1404
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -1602,6 +1602,15 @@ No tools match "${filter}".
|
|
|
1602
1602
|
// src/repl/commands/security-commands.ts
|
|
1603
1603
|
import { platform as platform2 } from "os";
|
|
1604
1604
|
import chalk2 from "chalk";
|
|
1605
|
+
function stripSurroundingQuotes(value) {
|
|
1606
|
+
const pairs = [['"', '"'], ["'", "'"], ["\u201C", "\u201D"], ["\u2018", "\u2019"], ["\u300C", "\u300D"]];
|
|
1607
|
+
for (const [open, close] of pairs) {
|
|
1608
|
+
if (value.length >= 2 && value.startsWith(open) && value.endsWith(close)) {
|
|
1609
|
+
return value.slice(open.length, value.length - close.length).trim();
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
return value;
|
|
1613
|
+
}
|
|
1605
1614
|
function createSecurityCommands() {
|
|
1606
1615
|
return [
|
|
1607
1616
|
{
|
|
@@ -1702,9 +1711,9 @@ function createSecurityCommands() {
|
|
|
1702
1711
|
}
|
|
1703
1712
|
const updated = { ...profile };
|
|
1704
1713
|
if (field === "interests") {
|
|
1705
|
-
updated.interests = value.split(",").map((s) => s.trim()).filter(Boolean);
|
|
1714
|
+
updated.interests = value.split(",").map((s) => stripSurroundingQuotes(s.trim())).filter(Boolean);
|
|
1706
1715
|
} else {
|
|
1707
|
-
updated[field] = value;
|
|
1716
|
+
updated[field] = stripSurroundingQuotes(value);
|
|
1708
1717
|
}
|
|
1709
1718
|
ctx.config.set("userProfile", updated);
|
|
1710
1719
|
ctx.config.save();
|
|
@@ -2377,7 +2386,7 @@ function createReviewCommands() {
|
|
|
2377
2386
|
usage: "/test [command|filter]",
|
|
2378
2387
|
async execute(args, ctx) {
|
|
2379
2388
|
try {
|
|
2380
|
-
const { executeTests } = await import("./run-tests-
|
|
2389
|
+
const { executeTests } = await import("./run-tests-YNHESHYY.js");
|
|
2381
2390
|
const argStr = args.join(" ").trim();
|
|
2382
2391
|
let testArgs = {};
|
|
2383
2392
|
if (argStr) {
|
|
@@ -5206,6 +5215,23 @@ var IMAGE_MIME = {
|
|
|
5206
5215
|
".webp": "image/webp"
|
|
5207
5216
|
};
|
|
5208
5217
|
var MAX_IMAGE_BYTES = 10 * 1024 * 1024;
|
|
5218
|
+
var MAX_PATH_SPACE_TOKENS = 8;
|
|
5219
|
+
function expandUnquotedPath(input2, pathStart, rawPath, cwd) {
|
|
5220
|
+
const plain = { raw: rawPath, consumed: rawPath.length };
|
|
5221
|
+
if (existsSync4(resolve2(cwd, rawPath))) return plain;
|
|
5222
|
+
let acc = rawPath;
|
|
5223
|
+
let consumed = rawPath.length;
|
|
5224
|
+
let rest = input2.slice(pathStart + rawPath.length);
|
|
5225
|
+
for (let i = 0; i < MAX_PATH_SPACE_TOKENS; i++) {
|
|
5226
|
+
const next = /^([ \t]+)(\S+)/.exec(rest);
|
|
5227
|
+
if (!next) break;
|
|
5228
|
+
acc += next[1] + next[2];
|
|
5229
|
+
consumed += next[0].length;
|
|
5230
|
+
rest = rest.slice(next[0].length);
|
|
5231
|
+
if (existsSync4(resolve2(cwd, acc))) return { raw: acc, consumed };
|
|
5232
|
+
}
|
|
5233
|
+
return plain;
|
|
5234
|
+
}
|
|
5209
5235
|
function parseAtReferences(input2, cwd) {
|
|
5210
5236
|
const atPattern = /@(?:"([^"]+)"|'([^']+)'|(\S+))/g;
|
|
5211
5237
|
const refs = [];
|
|
@@ -5213,7 +5239,17 @@ function parseAtReferences(input2, cwd) {
|
|
|
5213
5239
|
let textBody = input2;
|
|
5214
5240
|
let match;
|
|
5215
5241
|
while ((match = atPattern.exec(input2)) !== null) {
|
|
5216
|
-
|
|
5242
|
+
let rawPath = match[1] ?? match[2] ?? match[3] ?? "";
|
|
5243
|
+
let matchedText = match[0];
|
|
5244
|
+
if (match[3] !== void 0) {
|
|
5245
|
+
const pathStart = match.index + 1;
|
|
5246
|
+
const expanded = expandUnquotedPath(input2, pathStart, rawPath, cwd);
|
|
5247
|
+
if (expanded.consumed > rawPath.length) {
|
|
5248
|
+
rawPath = expanded.raw;
|
|
5249
|
+
matchedText = "@" + expanded.raw;
|
|
5250
|
+
atPattern.lastIndex = pathStart + expanded.consumed;
|
|
5251
|
+
}
|
|
5252
|
+
}
|
|
5217
5253
|
const absPath = resolve2(cwd, rawPath);
|
|
5218
5254
|
const ext = extname3(rawPath).toLowerCase();
|
|
5219
5255
|
const mime = IMAGE_MIME[ext];
|
|
@@ -5233,7 +5269,7 @@ function parseAtReferences(input2, cwd) {
|
|
|
5233
5269
|
image_url: { url: `data:${mime};base64,${data}` }
|
|
5234
5270
|
});
|
|
5235
5271
|
refs.push({ path: rawPath, type: "image" });
|
|
5236
|
-
textBody = textBody.replace(
|
|
5272
|
+
textBody = textBody.replace(matchedText, "").trim();
|
|
5237
5273
|
} else {
|
|
5238
5274
|
const content = readFileSync4(absPath, "utf-8");
|
|
5239
5275
|
const inlined = `
|
|
@@ -5242,7 +5278,7 @@ function parseAtReferences(input2, cwd) {
|
|
|
5242
5278
|
\`\`\`
|
|
5243
5279
|
${content}
|
|
5244
5280
|
\`\`\``;
|
|
5245
|
-
textBody = textBody.replace(
|
|
5281
|
+
textBody = textBody.replace(matchedText, inlined);
|
|
5246
5282
|
refs.push({ path: rawPath, type: "text" });
|
|
5247
5283
|
}
|
|
5248
5284
|
}
|
|
@@ -5254,6 +5290,16 @@ ${content}
|
|
|
5254
5290
|
return { parts, hasImage: imageParts.length > 0, refs };
|
|
5255
5291
|
}
|
|
5256
5292
|
|
|
5293
|
+
// src/repl/startup-notice.ts
|
|
5294
|
+
function writeStartupNotice(line, promptShown, redraw) {
|
|
5295
|
+
if (promptShown) {
|
|
5296
|
+
process.stdout.write("\n" + line);
|
|
5297
|
+
redraw();
|
|
5298
|
+
} else {
|
|
5299
|
+
process.stdout.write(line);
|
|
5300
|
+
}
|
|
5301
|
+
}
|
|
5302
|
+
|
|
5257
5303
|
// src/core/model-router.ts
|
|
5258
5304
|
var TAG_REGEX = /(?:^|\s)#([a-zA-Z][\w-]{0,31})\b/g;
|
|
5259
5305
|
function extractTags(message) {
|
|
@@ -5597,6 +5643,8 @@ var Repl = class {
|
|
|
5597
5643
|
config;
|
|
5598
5644
|
events;
|
|
5599
5645
|
rl;
|
|
5646
|
+
/** 第一次 prompt 是否已画出(决定启动期后台横幅要不要重画 prompt)。 */
|
|
5647
|
+
firstPromptShown = false;
|
|
5600
5648
|
currentProvider;
|
|
5601
5649
|
currentModel;
|
|
5602
5650
|
running = false;
|
|
@@ -6063,7 +6111,11 @@ ${ctxLine}` : "")
|
|
|
6063
6111
|
const promptStr = theme.success(`[${this.currentProvider}]`) + skillTag + planTag + thinkTag + chalk5.white(" > ");
|
|
6064
6112
|
this.rl.setPrompt(promptStr);
|
|
6065
6113
|
}
|
|
6114
|
+
notice(line) {
|
|
6115
|
+
writeStartupNotice(line, this.firstPromptShown, () => this.showPrompt());
|
|
6116
|
+
}
|
|
6066
6117
|
showPrompt() {
|
|
6118
|
+
this.firstPromptShown = true;
|
|
6067
6119
|
this.refreshPrompt();
|
|
6068
6120
|
const rlInternal2 = this.rl;
|
|
6069
6121
|
rlInternal2.prevRows = 0;
|
|
@@ -6217,12 +6269,12 @@ Session '${this.resumeSessionId}' not found.
|
|
|
6217
6269
|
const existed = loadIndex(root);
|
|
6218
6270
|
const { stats } = await indexProject(root);
|
|
6219
6271
|
if (!existed) {
|
|
6220
|
-
|
|
6272
|
+
this.notice(
|
|
6221
6273
|
theme.dim(` \u{1F50E} Symbol index built: ${stats.symbols} symbols across ${stats.filesParsed} files
|
|
6222
6274
|
`)
|
|
6223
6275
|
);
|
|
6224
6276
|
} else if (stats.filesParsed > 0) {
|
|
6225
|
-
|
|
6277
|
+
this.notice(
|
|
6226
6278
|
theme.dim(` \u{1F50E} Symbol index refreshed: ${stats.filesParsed} file(s) updated
|
|
6227
6279
|
`)
|
|
6228
6280
|
);
|
|
@@ -6243,7 +6295,7 @@ Session '${this.resumeSessionId}' not found.
|
|
|
6243
6295
|
try {
|
|
6244
6296
|
const sessionCount = this.sessions.listSessions().length;
|
|
6245
6297
|
if (sessionCount >= 5) {
|
|
6246
|
-
|
|
6298
|
+
this.notice(theme.dim(
|
|
6247
6299
|
` \u{1F4A1} ${sessionCount} past sessions have no memory index \u2014 run /memory rebuild to enable cross-session recall (first run downloads ~117 MB)
|
|
6248
6300
|
`
|
|
6249
6301
|
));
|
|
@@ -6260,7 +6312,7 @@ Session '${this.resumeSessionId}' not found.
|
|
|
6260
6312
|
sessions: after.sessions
|
|
6261
6313
|
};
|
|
6262
6314
|
if (stats.sessionsIndexed > 0 || stats.chunksRemoved > 0) {
|
|
6263
|
-
|
|
6315
|
+
this.notice(
|
|
6264
6316
|
theme.dim(
|
|
6265
6317
|
` \u{1F9E0} Chat memory refreshed: ${stats.chunksAdded} new \xB7 ${stats.chunksRemoved} removed \xB7 ${stats.chunksTotal} total
|
|
6266
6318
|
`
|
|
@@ -6309,7 +6361,7 @@ Session '${this.resumeSessionId}' not found.
|
|
|
6309
6361
|
this.mcpManager = new McpManager();
|
|
6310
6362
|
const mcpProjectCount = Object.keys(projectMcpServers).length;
|
|
6311
6363
|
let bannerEmitted = false;
|
|
6312
|
-
const emitBanner = (
|
|
6364
|
+
const emitBanner = () => {
|
|
6313
6365
|
if (bannerEmitted) return;
|
|
6314
6366
|
bannerEmitted = true;
|
|
6315
6367
|
const statuses = this.mcpManager.getStatus();
|
|
@@ -6323,12 +6375,7 @@ Session '${this.resumeSessionId}' not found.
|
|
|
6323
6375
|
const names = failed.map((f) => f.serverId).join(", ");
|
|
6324
6376
|
line += ` \u26A0 failed: ${names}`;
|
|
6325
6377
|
}
|
|
6326
|
-
|
|
6327
|
-
process.stdout.write("\n" + theme.dim(line) + "\n");
|
|
6328
|
-
this.showPrompt();
|
|
6329
|
-
} else {
|
|
6330
|
-
process.stdout.write(theme.dim(line) + "\n");
|
|
6331
|
-
}
|
|
6378
|
+
this.notice(theme.dim(line) + "\n");
|
|
6332
6379
|
};
|
|
6333
6380
|
mcpReadyPromise = this.mcpManager.connectAll(mergedMcpServers, { quiet: true }).then(() => {
|
|
6334
6381
|
const mcpTools = this.mcpManager.getAllTools();
|
|
@@ -6349,9 +6396,9 @@ Session '${this.resumeSessionId}' not found.
|
|
|
6349
6396
|
deadlinePromise
|
|
6350
6397
|
]);
|
|
6351
6398
|
if (winner === "ready") {
|
|
6352
|
-
emitBanner(
|
|
6399
|
+
emitBanner();
|
|
6353
6400
|
} else {
|
|
6354
|
-
void mcpReadyPromise.then(() => emitBanner(
|
|
6401
|
+
void mcpReadyPromise.then(() => emitBanner());
|
|
6355
6402
|
}
|
|
6356
6403
|
}
|
|
6357
6404
|
this.setupClipboardPaste();
|
|
@@ -8066,7 +8113,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
8066
8113
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
8067
8114
|
process.exit(1);
|
|
8068
8115
|
}
|
|
8069
|
-
const { startWebServer } = await import("./server-
|
|
8116
|
+
const { startWebServer } = await import("./server-SSAWGNT7.js");
|
|
8070
8117
|
await startWebServer({ port, host: options.host });
|
|
8071
8118
|
});
|
|
8072
8119
|
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) => {
|
|
@@ -8233,11 +8280,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
8233
8280
|
console.log(footer + "\n");
|
|
8234
8281
|
});
|
|
8235
8282
|
program.command("usage").description("Show token + cost usage grouped by provider/model (cross-session)").option("--days <n>", "Only the last N days (inclusive of today)").option("--month <ym>", "Only a specific month, format YYYY-MM (e.g. 2026-06)").option("--json", "Output as JSON (for scripting)").action(async (options) => {
|
|
8236
|
-
const { runUsageCli } = await import("./usage-
|
|
8283
|
+
const { runUsageCli } = await import("./usage-PDKM7J75.js");
|
|
8237
8284
|
await runUsageCli(options);
|
|
8238
8285
|
});
|
|
8239
8286
|
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) => {
|
|
8240
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
8287
|
+
const { runDoctorCli } = await import("./doctor-cli-PXGXZYQB.js");
|
|
8241
8288
|
const argv = process.argv.slice(2);
|
|
8242
8289
|
await runDoctorCli({
|
|
8243
8290
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -8246,7 +8293,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
8246
8293
|
});
|
|
8247
8294
|
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) => {
|
|
8248
8295
|
try {
|
|
8249
|
-
const batch = await import("./batch-
|
|
8296
|
+
const batch = await import("./batch-YUPAC4CK.js");
|
|
8250
8297
|
switch (action) {
|
|
8251
8298
|
case "submit":
|
|
8252
8299
|
if (!arg) {
|
|
@@ -8289,7 +8336,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
8289
8336
|
}
|
|
8290
8337
|
});
|
|
8291
8338
|
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) => {
|
|
8292
|
-
const { startMcpServer } = await import("./server-
|
|
8339
|
+
const { startMcpServer } = await import("./server-YZ37TL46.js");
|
|
8293
8340
|
await startMcpServer({
|
|
8294
8341
|
allowDestructive: !!options.allowDestructive,
|
|
8295
8342
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -8302,7 +8349,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
8302
8349
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
8303
8350
|
process.exit(1);
|
|
8304
8351
|
}
|
|
8305
|
-
const { runPrCli } = await import("./pr-
|
|
8352
|
+
const { runPrCli } = await import("./pr-7LQTAUFK.js");
|
|
8306
8353
|
const result = await runPrCli({
|
|
8307
8354
|
action,
|
|
8308
8355
|
target,
|
|
@@ -8322,8 +8369,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
8322
8369
|
process.exit(result.exitCode);
|
|
8323
8370
|
});
|
|
8324
8371
|
program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number or URL; diff fetched via gh pr diff <value>", (v) => /^#?\d+$/.test(v) ? parseInt(v.replace(/^#/, ""), 10) : v).option("--base <ref>", "Base ref for git diff <ref>...HEAD (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").option("--json", "Output a structured JSON report").option("--markdown", "Output Markdown report (default)").option("--sarif", "Output SARIF 2.1.0 for code scanning artifacts").option("--fail-on-security-high", "Fail when the security review contains HIGH/CRITICAL findings (default)").option("--no-fail-on-security-high", "Do not fail on security HIGH/CRITICAL findings").option("--fail-on-test-failure", "Fail when the report mentions test failures (default)").option("--no-fail-on-test-failure", "Do not fail on test failure findings").option("--fail-on-lint-failure", "Fail when the report mentions lint/typecheck failures (default)").option("--no-fail-on-lint-failure", "Do not fail on lint/typecheck failure findings").action(async (options) => {
|
|
8325
|
-
const { runCi } = await import("./ci-
|
|
8326
|
-
const { formatCiResult } = await import("./ci-format-
|
|
8372
|
+
const { runCi } = await import("./ci-FX26BNT2.js");
|
|
8373
|
+
const { formatCiResult } = await import("./ci-format-GEWIAIZD.js");
|
|
8327
8374
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
8328
8375
|
if (formats > 1) {
|
|
8329
8376
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -8481,7 +8528,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
8481
8528
|
config.get("customProviders"),
|
|
8482
8529
|
config.getConfigDir()
|
|
8483
8530
|
);
|
|
8484
|
-
const { startHub } = await import("./hub-
|
|
8531
|
+
const { startHub } = await import("./hub-RCANK6SK.js");
|
|
8485
8532
|
await startHub(
|
|
8486
8533
|
{
|
|
8487
8534
|
topic: topic ?? "",
|
|
@@ -27,9 +27,9 @@ import {
|
|
|
27
27
|
touchMemoryReferences,
|
|
28
28
|
updateMemoryApproval,
|
|
29
29
|
updateMemoryEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-T7R7ILYT.js";
|
|
31
31
|
import "./chunk-YVTASHS5.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-R6DXWVVN.js";
|
|
33
33
|
import "./chunk-6BUTA5VW.js";
|
|
34
34
|
export {
|
|
35
35
|
addMemoryEntry,
|
|
@@ -28,9 +28,9 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HGTDI5ME.js";
|
|
32
32
|
import "./chunk-HOSJZMQS.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-323S2X5I.js";
|
|
34
34
|
import "./chunk-B5TYJO7V.js";
|
|
35
35
|
import "./chunk-IW3Q7AE5.js";
|
|
36
36
|
export {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-Z5TCAE4L.js";
|
|
6
|
+
import "./chunk-GC4KA5LF.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -11,15 +11,15 @@ import {
|
|
|
11
11
|
} from "./chunk-HLWUDRBO.js";
|
|
12
12
|
import {
|
|
13
13
|
ProviderRegistry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OIOTHBDB.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigManager
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-H6FND2UG.js";
|
|
18
|
+
import "./chunk-XZNRZGG2.js";
|
|
19
19
|
import "./chunk-TU3L3PW7.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-323S2X5I.js";
|
|
23
23
|
import "./chunk-IW3Q7AE5.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/pr.ts
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
scanDirTree,
|
|
24
24
|
scanProject,
|
|
25
25
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-YXMBP567.js";
|
|
27
27
|
import {
|
|
28
28
|
computeCost,
|
|
29
29
|
formatCost,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
spawnAgentContext,
|
|
65
65
|
truncateOutput,
|
|
66
66
|
undoStack
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-HU3IYBU5.js";
|
|
68
68
|
import {
|
|
69
69
|
addMemoryEntry,
|
|
70
70
|
clearMemoryEntries,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
parseWritableScope,
|
|
79
79
|
updateMemoryApproval,
|
|
80
80
|
updateMemoryEntry
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-HGTDI5ME.js";
|
|
82
82
|
import "./chunk-GLSR2NR3.js";
|
|
83
83
|
import "./chunk-UUSRWSSX.js";
|
|
84
84
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -91,13 +91,13 @@ import {
|
|
|
91
91
|
buildDoctorReport,
|
|
92
92
|
formatDoctorReport,
|
|
93
93
|
loadContextFiles
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-NOB2OPQI.js";
|
|
95
95
|
import {
|
|
96
96
|
ProviderRegistry
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-OIOTHBDB.js";
|
|
98
98
|
import {
|
|
99
99
|
ConfigManager
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-H6FND2UG.js";
|
|
101
101
|
import {
|
|
102
102
|
describePlugin,
|
|
103
103
|
getActivePluginAssets,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
runTool,
|
|
113
113
|
setPluginEnabled,
|
|
114
114
|
trustPlugin
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-W5XUZYQE.js";
|
|
116
116
|
import {
|
|
117
117
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
118
118
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
stripOuterCodeFence,
|
|
130
130
|
stripToolCallReminder,
|
|
131
131
|
teeStreamErrorSummary
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-XZNRZGG2.js";
|
|
133
133
|
import "./chunk-TU3L3PW7.js";
|
|
134
134
|
import {
|
|
135
135
|
formatGitContextForPrompt,
|
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
getGitRoot
|
|
138
138
|
} from "./chunk-HOSJZMQS.js";
|
|
139
139
|
import "./chunk-4BKXL7SM.js";
|
|
140
|
-
import "./chunk-
|
|
140
|
+
import "./chunk-KQQHMGK7.js";
|
|
141
141
|
import {
|
|
142
142
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
143
143
|
AUTHOR,
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
SKILLS_DIR_NAME,
|
|
154
154
|
VERSION,
|
|
155
155
|
buildUserIdentityPrompt
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-323S2X5I.js";
|
|
157
157
|
import "./chunk-6RPGQ5CG.js";
|
|
158
158
|
import "./chunk-KHYD3WXE.js";
|
|
159
159
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -815,7 +815,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
815
815
|
Cost: ${formatCost(cost)}` : "";
|
|
816
816
|
let memoryLine = "";
|
|
817
817
|
try {
|
|
818
|
-
const { countPendingMemories } = await import("./persistent-memory-
|
|
818
|
+
const { countPendingMemories } = await import("./persistent-memory-UARSSYAA.js");
|
|
819
819
|
const pending = countPendingMemories(ctx.config.getConfigDir());
|
|
820
820
|
if (pending > 0) memoryLine = `
|
|
821
821
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -1624,7 +1624,7 @@ async function handleSecurityReview(args, ctx) {
|
|
|
1624
1624
|
async function handleTest(args, ctx) {
|
|
1625
1625
|
ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1626
1626
|
try {
|
|
1627
|
-
const { executeTests } = await import("./run-tests-
|
|
1627
|
+
const { executeTests } = await import("./run-tests-YNHESHYY.js");
|
|
1628
1628
|
const argStr = args.join(" ").trim();
|
|
1629
1629
|
let testArgs = {};
|
|
1630
1630
|
if (argStr) {
|
|
@@ -1888,7 +1888,7 @@ async function handleMemory(args, ctx) {
|
|
|
1888
1888
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
1889
1889
|
} else if (sub === "export") {
|
|
1890
1890
|
if (args[1] === "md") {
|
|
1891
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
1891
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-UARSSYAA.js");
|
|
1892
1892
|
ctx.send({
|
|
1893
1893
|
type: "export_data",
|
|
1894
1894
|
format: "md",
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-HU3IYBU5.js";
|
|
5
|
+
import "./chunk-HGTDI5ME.js";
|
|
6
6
|
import "./chunk-GLSR2NR3.js";
|
|
7
7
|
import "./chunk-UUSRWSSX.js";
|
|
8
8
|
import "./chunk-CKH4KQ4E.js";
|
|
9
9
|
import "./chunk-BXP6YZ2P.js";
|
|
10
10
|
import {
|
|
11
11
|
runTool
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-W5XUZYQE.js";
|
|
13
13
|
import {
|
|
14
14
|
getDangerLevel,
|
|
15
15
|
schemaToJsonSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XZNRZGG2.js";
|
|
17
17
|
import "./chunk-TU3L3PW7.js";
|
|
18
18
|
import "./chunk-HOSJZMQS.js";
|
|
19
19
|
import "./chunk-4BKXL7SM.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-KQQHMGK7.js";
|
|
21
21
|
import {
|
|
22
22
|
VERSION
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-323S2X5I.js";
|
|
24
24
|
import "./chunk-6RPGQ5CG.js";
|
|
25
25
|
import "./chunk-KHYD3WXE.js";
|
|
26
26
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -3,26 +3,26 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-HU3IYBU5.js";
|
|
7
|
+
import "./chunk-HGTDI5ME.js";
|
|
8
8
|
import "./chunk-GLSR2NR3.js";
|
|
9
9
|
import "./chunk-UUSRWSSX.js";
|
|
10
10
|
import "./chunk-CKH4KQ4E.js";
|
|
11
11
|
import "./chunk-BXP6YZ2P.js";
|
|
12
12
|
import {
|
|
13
13
|
runTool
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-W5XUZYQE.js";
|
|
15
15
|
import {
|
|
16
16
|
getDangerLevel,
|
|
17
17
|
runLeanAgentLoop
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XZNRZGG2.js";
|
|
19
19
|
import "./chunk-TU3L3PW7.js";
|
|
20
20
|
import "./chunk-HOSJZMQS.js";
|
|
21
21
|
import "./chunk-4BKXL7SM.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-KQQHMGK7.js";
|
|
23
23
|
import {
|
|
24
24
|
SUBAGENT_ALLOWED_TOOLS
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-323S2X5I.js";
|
|
26
26
|
import "./chunk-6RPGQ5CG.js";
|
|
27
27
|
import "./chunk-KHYD3WXE.js";
|
|
28
28
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
} from "./chunk-EZ6QLHOS.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-H6FND2UG.js";
|
|
12
12
|
import "./chunk-TU3L3PW7.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-323S2X5I.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/usage.ts
|