jinzd-ai-cli 0.4.267 → 0.4.268
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-GY5MAN5F.js → batch-2N2YMRX2.js} +2 -2
- package/dist/{chunk-WPN7LDLM.js → chunk-2FQGMR34.js} +1 -1
- package/dist/{chunk-5AEOIETL.js → chunk-74BK22BM.js} +4 -4
- package/dist/{chunk-6C6FLDGH.js → chunk-7US7K3CD.js} +1 -1
- package/dist/{chunk-7HECI3U5.js → chunk-EPVJS4F6.js} +3 -1
- package/dist/{chunk-FI6IWUXW.js → chunk-RRQZRSXW.js} +1 -1
- package/dist/{chunk-THHPKZJ3.js → chunk-UT2WAJJG.js} +1 -1
- package/dist/{chunk-EWRZMIQE.js → chunk-VGVKJTHF.js} +1 -1
- package/dist/{chunk-JH343BDI.js → chunk-VNCBY4KY.js} +153 -2
- package/dist/{chunk-RVNL7MQG.js → chunk-WNG3YVZX.js} +1 -1
- package/dist/{chunk-XLLUQEGO.js → chunk-WWLXW4SY.js} +1 -1
- package/dist/{chunk-ARYCWJN6.js → chunk-XDITAGE5.js} +1 -1
- package/dist/{chunk-QN7WD2SM.js → chunk-YLSM7RF6.js} +3 -3
- package/dist/{chunk-5CU72V6P.js → chunk-Z7CZ72RP.js} +3 -3
- package/dist/{ci-MUEQSNKU.js → ci-3RWVJSZ3.js} +4 -4
- package/dist/{ci-format-2ZGGSOFK.js → ci-format-M6HVCXCG.js} +2 -2
- package/dist/{constants-SZTJESDF.js → constants-G6VN7SJL.js} +1 -1
- package/dist/{doctor-cli-Z272364P.js → doctor-cli-Y3SVVJBO.js} +4 -4
- package/dist/electron-server.js +216 -16
- package/dist/{hub-MRLGKMRI.js → hub-5T5HKOAR.js} +1 -1
- package/dist/index.js +72 -111
- package/dist/{persistent-memory-HZASMDJQ.js → persistent-memory-XVSSR277.js} +2 -2
- package/dist/{persistent-memory-3FTOC7QT.js → persistent-memory-YBWIZWQP.js} +2 -2
- package/dist/{pr-VLLIALRK.js → pr-NF5IWLH3.js} +4 -4
- package/dist/{run-tests-NTDZ6DDU.js → run-tests-33X3D7PV.js} +2 -2
- package/dist/{run-tests-6MWE6D5S.js → run-tests-Y44SCLIO.js} +2 -2
- package/dist/{server-SP3AEHRQ.js → server-3LERX42X.js} +5 -5
- package/dist/{server-IALCWKSU.js → server-NJ3ZNPQW.js} +79 -21
- package/dist/{task-orchestrator-Q6WFFI4J.js → task-orchestrator-JN2WFZSF.js} +5 -5
- package/dist/{usage-DJDLHICZ.js → usage-IFTNXTWC.js} +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
AUTO_COMPACT_INSTRUCTION,
|
|
3
4
|
McpManager,
|
|
4
5
|
SNAPSHOT_PROMPT,
|
|
5
6
|
SkillManager,
|
|
7
|
+
applyProfileCommand,
|
|
6
8
|
applyThinkCommand,
|
|
7
9
|
autoTrimSessionIfNeeded,
|
|
8
10
|
buildInitPrompt,
|
|
9
11
|
buildSessionCostReport,
|
|
10
12
|
clearDevState,
|
|
11
13
|
costSourceNote,
|
|
14
|
+
estimateConversationTokens,
|
|
15
|
+
evaluateContextPressure,
|
|
12
16
|
loadDevState,
|
|
13
17
|
parseSimpleYaml,
|
|
14
18
|
persistToolRound,
|
|
@@ -17,7 +21,7 @@ import {
|
|
|
17
21
|
scanProject,
|
|
18
22
|
sessionHasMeaningfulContent,
|
|
19
23
|
setupProxy
|
|
20
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VNCBY4KY.js";
|
|
21
25
|
import {
|
|
22
26
|
CostTracker,
|
|
23
27
|
computeCost,
|
|
@@ -55,7 +59,7 @@ import {
|
|
|
55
59
|
setMaxOutputCap,
|
|
56
60
|
spawnAgentContext,
|
|
57
61
|
undoStack
|
|
58
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-74BK22BM.js";
|
|
59
63
|
import {
|
|
60
64
|
addMemoryEntry,
|
|
61
65
|
backupMemoryStore,
|
|
@@ -81,7 +85,7 @@ import {
|
|
|
81
85
|
touchMemoryReferences,
|
|
82
86
|
updateMemoryApproval,
|
|
83
87
|
updateMemoryEntry
|
|
84
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-WNG3YVZX.js";
|
|
85
89
|
import "./chunk-GLSR2NR3.js";
|
|
86
90
|
import "./chunk-UUSRWSSX.js";
|
|
87
91
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -99,14 +103,14 @@ import {
|
|
|
99
103
|
formatDoctorReport,
|
|
100
104
|
loadContextFiles,
|
|
101
105
|
writeCrashLog
|
|
102
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-YLSM7RF6.js";
|
|
103
107
|
import {
|
|
104
108
|
ProviderRegistry,
|
|
105
109
|
listBuiltInProviderMetadata
|
|
106
110
|
} from "./chunk-AUEX6RNY.js";
|
|
107
111
|
import {
|
|
108
112
|
ConfigManager
|
|
109
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-VGVKJTHF.js";
|
|
110
114
|
import {
|
|
111
115
|
describePlugin,
|
|
112
116
|
getActivePluginAssets,
|
|
@@ -123,7 +127,7 @@ import {
|
|
|
123
127
|
trustHook,
|
|
124
128
|
trustPlugin,
|
|
125
129
|
untrustHook
|
|
126
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-2FQGMR34.js";
|
|
127
131
|
import {
|
|
128
132
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
129
133
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -157,13 +161,12 @@ import {
|
|
|
157
161
|
import {
|
|
158
162
|
fileCheckpoints
|
|
159
163
|
} from "./chunk-4BKXL7SM.js";
|
|
160
|
-
import "./chunk-
|
|
164
|
+
import "./chunk-WWLXW4SY.js";
|
|
161
165
|
import {
|
|
162
166
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
163
167
|
AUTHOR,
|
|
164
168
|
AUTHOR_EMAIL,
|
|
165
169
|
CONFIG_DIR_NAME,
|
|
166
|
-
CONTEXT_PRESSURE_THRESHOLD,
|
|
167
170
|
CUSTOM_COMMANDS_DIR_NAME,
|
|
168
171
|
DEFAULT_MAX_TOKENS,
|
|
169
172
|
DEFAULT_MAX_TOOL_ROUNDS,
|
|
@@ -176,7 +179,7 @@ import {
|
|
|
176
179
|
SKILLS_DIR_NAME,
|
|
177
180
|
VERSION,
|
|
178
181
|
buildUserIdentityPrompt
|
|
179
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-UT2WAJJG.js";
|
|
180
183
|
import {
|
|
181
184
|
buildChatIndex,
|
|
182
185
|
clearChatIndex,
|
|
@@ -1397,7 +1400,7 @@ No tools match "${filter}".
|
|
|
1397
1400
|
const { join: join6 } = await import("path");
|
|
1398
1401
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1399
1402
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
|
|
1400
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1403
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-G6VN7SJL.js");
|
|
1401
1404
|
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
1402
1405
|
const cwd = process.cwd();
|
|
1403
1406
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -1601,15 +1604,6 @@ No tools match "${filter}".
|
|
|
1601
1604
|
// src/repl/commands/security-commands.ts
|
|
1602
1605
|
import { platform as platform2 } from "os";
|
|
1603
1606
|
import chalk2 from "chalk";
|
|
1604
|
-
function stripSurroundingQuotes(value) {
|
|
1605
|
-
const pairs = [['"', '"'], ["'", "'"], ["\u201C", "\u201D"], ["\u2018", "\u2019"], ["\u300C", "\u300D"]];
|
|
1606
|
-
for (const [open, close] of pairs) {
|
|
1607
|
-
if (value.length >= 2 && value.startsWith(open) && value.endsWith(close)) {
|
|
1608
|
-
return value.slice(open.length, value.length - close.length).trim();
|
|
1609
|
-
}
|
|
1610
|
-
}
|
|
1611
|
-
return value;
|
|
1612
|
-
}
|
|
1613
1607
|
function createSecurityCommands() {
|
|
1614
1608
|
return [
|
|
1615
1609
|
{
|
|
@@ -1673,58 +1667,32 @@ function createSecurityCommands() {
|
|
|
1673
1667
|
{
|
|
1674
1668
|
name: "profile",
|
|
1675
1669
|
description: 'View or edit your identity profile (the "soul" of AI)',
|
|
1676
|
-
usage: "/profile [show|
|
|
1670
|
+
usage: "/profile [show|set <field> <value>|clear|edit]",
|
|
1677
1671
|
execute(args, ctx) {
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1672
|
+
const outcome = applyProfileCommand(args, ctx.config.get("userProfile") ?? {});
|
|
1673
|
+
if (outcome.profile) {
|
|
1674
|
+
ctx.config.set("userProfile", outcome.profile);
|
|
1675
|
+
ctx.config.save();
|
|
1676
|
+
}
|
|
1677
|
+
if (outcome.isError) {
|
|
1678
|
+
ctx.renderer.printInfo(outcome.summary);
|
|
1679
|
+
} else if (outcome.changed) {
|
|
1680
|
+
ctx.renderer.printSuccess(outcome.summary);
|
|
1681
|
+
} else if (outcome.rows.length > 0) {
|
|
1682
|
+
console.log(theme.heading(`
|
|
1683
|
+
${outcome.summary}
|
|
1684
|
+
`) + theme.dim("\u2500".repeat(50)));
|
|
1685
|
+
const pad = Math.max(...outcome.rows.map(([label]) => label.length)) + 1;
|
|
1686
|
+
for (const [label, value] of outcome.rows) {
|
|
1687
|
+
console.log(` ${theme.dim((label + ":").padEnd(pad + 1))} ${chalk2.white(value)}`);
|
|
1685
1688
|
}
|
|
1686
|
-
console.log(theme.heading("\n\u{1F464} Your Profile\n") + theme.dim("\u2500".repeat(50)));
|
|
1687
|
-
if (profile.name) console.log(` ${theme.dim("Name:")} ${chalk2.white(profile.name)}`);
|
|
1688
|
-
if (profile.nickname) console.log(` ${theme.dim("Nickname:")} ${theme.accent(profile.nickname)}`);
|
|
1689
|
-
if (profile.role) console.log(` ${theme.dim("Role:")} ${chalk2.white(profile.role)}`);
|
|
1690
|
-
if (profile.bio) console.log(` ${theme.dim("Bio:")} ${chalk2.white(profile.bio)}`);
|
|
1691
|
-
if (profile.interests?.length) console.log(` ${theme.dim("Interests:")} ${chalk2.white(profile.interests.join(", "))}`);
|
|
1692
|
-
if (profile.locale) console.log(` ${theme.dim("Locale:")} ${chalk2.white(profile.locale)}`);
|
|
1693
|
-
if (profile.extra) console.log(` ${theme.dim("Extra:")} ${chalk2.white(profile.extra.slice(0, 80))}${profile.extra.length > 80 ? "\u2026" : ""}`);
|
|
1694
1689
|
console.log(theme.dim("\u2500".repeat(50)));
|
|
1695
|
-
console.log(theme.dim(" This identity is injected into every AI conversation.\n"));
|
|
1696
|
-
} else if (sub === "edit") {
|
|
1697
|
-
ctx.renderer.printInfo("Use /config to open the interactive profile editor, or use:\n /profile set <field> <value>\n Fields: name, nickname, role, bio, interests, locale, extra");
|
|
1698
|
-
} else if (sub === "set") {
|
|
1699
|
-
const field = args[1];
|
|
1700
|
-
const value = args.slice(2).join(" ").trim();
|
|
1701
|
-
const validFields = ["name", "nickname", "role", "bio", "interests", "locale", "extra"];
|
|
1702
|
-
if (!field || !validFields.includes(field)) {
|
|
1703
|
-
ctx.renderer.printInfo(`Usage: /profile set <field> <value>
|
|
1704
|
-
Fields: ${validFields.join(", ")}`);
|
|
1705
|
-
return;
|
|
1706
|
-
}
|
|
1707
|
-
if (!value) {
|
|
1708
|
-
ctx.renderer.printInfo(`Usage: /profile set ${field} <value>`);
|
|
1709
|
-
return;
|
|
1710
|
-
}
|
|
1711
|
-
const updated = { ...profile };
|
|
1712
|
-
if (field === "interests") {
|
|
1713
|
-
updated.interests = value.split(",").map((s) => stripSurroundingQuotes(s.trim())).filter(Boolean);
|
|
1714
|
-
} else {
|
|
1715
|
-
updated[field] = stripSurroundingQuotes(value);
|
|
1716
|
-
}
|
|
1717
|
-
ctx.config.set("userProfile", updated);
|
|
1718
|
-
ctx.config.save();
|
|
1719
|
-
const displayVal = field === "interests" ? updated.interests : value;
|
|
1720
|
-
ctx.renderer.printSuccess(`Profile updated: ${field} = ${JSON.stringify(displayVal)}`);
|
|
1721
|
-
} else if (sub === "clear") {
|
|
1722
|
-
ctx.config.set("userProfile", {});
|
|
1723
|
-
ctx.config.save();
|
|
1724
|
-
ctx.renderer.printSuccess("Profile cleared. AI will no longer know who you are.");
|
|
1725
1690
|
} else {
|
|
1726
|
-
|
|
1691
|
+
console.log(theme.dim(`
|
|
1692
|
+
${outcome.summary}`));
|
|
1727
1693
|
}
|
|
1694
|
+
for (const line of outcome.details) console.log(theme.dim(` ${line}`));
|
|
1695
|
+
console.log();
|
|
1728
1696
|
}
|
|
1729
1697
|
},
|
|
1730
1698
|
// ── /memory ────────────────────────────────────────────────────────────────
|
|
@@ -2385,7 +2353,7 @@ function createReviewCommands() {
|
|
|
2385
2353
|
usage: "/test [command|filter]",
|
|
2386
2354
|
async execute(args, ctx) {
|
|
2387
2355
|
try {
|
|
2388
|
-
const { executeTests } = await import("./run-tests-
|
|
2356
|
+
const { executeTests } = await import("./run-tests-33X3D7PV.js");
|
|
2389
2357
|
const argStr = args.join(" ").trim();
|
|
2390
2358
|
let testArgs = {};
|
|
2391
2359
|
if (argStr) {
|
|
@@ -4255,10 +4223,20 @@ function createAgentCommands() {
|
|
|
4255
4223
|
{
|
|
4256
4224
|
name: "yolo",
|
|
4257
4225
|
description: "Toggle session auto-approve for write tools (/yolo)",
|
|
4258
|
-
usage: "/yolo [on|off]",
|
|
4226
|
+
usage: "/yolo [on|off|status]",
|
|
4259
4227
|
execute(args, ctx) {
|
|
4260
4228
|
const sub = args[0]?.toLowerCase();
|
|
4261
4229
|
const executor = ctx.getToolExecutor();
|
|
4230
|
+
if (sub === "status") {
|
|
4231
|
+
console.log(theme.info(` YOLO mode: ${executor.sessionAutoApprove ? "ON (write tools auto-approved)" : "OFF"}`));
|
|
4232
|
+
console.log();
|
|
4233
|
+
return;
|
|
4234
|
+
}
|
|
4235
|
+
if (sub !== void 0 && sub !== "on" && sub !== "off") {
|
|
4236
|
+
console.log(theme.warning(` Unknown /yolo option "${sub}" \u2014 expected on | off | status`));
|
|
4237
|
+
console.log();
|
|
4238
|
+
return;
|
|
4239
|
+
}
|
|
4262
4240
|
if (sub === "off") {
|
|
4263
4241
|
executor.sessionAutoApprove = false;
|
|
4264
4242
|
console.log(theme.info(" \u{1F512} Auto-approve disabled \u2014 confirmations restored for this session."));
|
|
@@ -6289,28 +6267,11 @@ Session '${this.resumeSessionId}' not found.
|
|
|
6289
6267
|
* 估算当前对话的总 token 消耗(system prompt + 所有 session messages)。
|
|
6290
6268
|
*/
|
|
6291
6269
|
estimateConversationTokens() {
|
|
6292
|
-
let total = 0;
|
|
6293
6270
|
const { stable: estStable, volatile: estVolatile } = this.buildCurrentSystemPrompt();
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
for (const msg of session.messages) {
|
|
6299
|
-
if (typeof msg.content === "string") {
|
|
6300
|
-
total += this.estimateTokens(msg.content);
|
|
6301
|
-
} else if (Array.isArray(msg.content)) {
|
|
6302
|
-
for (const part of msg.content) {
|
|
6303
|
-
if (part.type === "text" && part.text) total += this.estimateTokens(part.text);
|
|
6304
|
-
}
|
|
6305
|
-
}
|
|
6306
|
-
if (msg.toolCalls) {
|
|
6307
|
-
for (const tc of msg.toolCalls) {
|
|
6308
|
-
total += this.estimateTokens(JSON.stringify(tc.arguments));
|
|
6309
|
-
}
|
|
6310
|
-
}
|
|
6311
|
-
}
|
|
6312
|
-
}
|
|
6313
|
-
return total;
|
|
6271
|
+
return estimateConversationTokens({
|
|
6272
|
+
systemPrompt: [estStable, estVolatile].filter(Boolean).join("\n\n---\n\n"),
|
|
6273
|
+
messages: this.sessions.current?.messages ?? []
|
|
6274
|
+
});
|
|
6314
6275
|
}
|
|
6315
6276
|
/**
|
|
6316
6277
|
* 估算 agentic 循环当前请求的 token 数(包含 session messages + extraMessages + system prompt)。
|
|
@@ -6349,20 +6310,20 @@ Session '${this.resumeSessionId}' not found.
|
|
|
6349
6310
|
* 在每次 AI 回复后调用。
|
|
6350
6311
|
*/
|
|
6351
6312
|
async checkContextPressure() {
|
|
6352
|
-
if (!this.config.get("autoCompact")) return;
|
|
6353
6313
|
const contextWindow = this.getContextWindowSize();
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6314
|
+
const pressure = evaluateContextPressure({
|
|
6315
|
+
autoCompactEnabled: this.config.get("autoCompact") === true,
|
|
6316
|
+
estimatedTokens: contextWindow > 0 ? this.estimateConversationTokens() : 0,
|
|
6317
|
+
contextWindow
|
|
6318
|
+
});
|
|
6319
|
+
if (!pressure.shouldCompact) return;
|
|
6320
|
+
console.log(
|
|
6321
|
+
theme.warning(
|
|
6322
|
+
`
|
|
6323
|
+
\u26A0 Context pressure: ~${pressure.percent}% of ${fmtTokens(contextWindow)} window used. Auto-compacting...`
|
|
6324
|
+
)
|
|
6325
|
+
);
|
|
6326
|
+
await this.compactSession(AUTO_COMPACT_INSTRUCTION);
|
|
6366
6327
|
}
|
|
6367
6328
|
// ─── Tab 自动补全 ──────────────────────────────────────────────────────
|
|
6368
6329
|
/**
|
|
@@ -7688,7 +7649,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7688
7649
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7689
7650
|
process.exit(1);
|
|
7690
7651
|
}
|
|
7691
|
-
const { startWebServer } = await import("./server-
|
|
7652
|
+
const { startWebServer } = await import("./server-NJ3ZNPQW.js");
|
|
7692
7653
|
await startWebServer({ port, host: options.host });
|
|
7693
7654
|
});
|
|
7694
7655
|
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) => {
|
|
@@ -7855,11 +7816,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
7855
7816
|
console.log(footer + "\n");
|
|
7856
7817
|
});
|
|
7857
7818
|
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) => {
|
|
7858
|
-
const { runUsageCli } = await import("./usage-
|
|
7819
|
+
const { runUsageCli } = await import("./usage-IFTNXTWC.js");
|
|
7859
7820
|
await runUsageCli(options);
|
|
7860
7821
|
});
|
|
7861
7822
|
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) => {
|
|
7862
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7823
|
+
const { runDoctorCli } = await import("./doctor-cli-Y3SVVJBO.js");
|
|
7863
7824
|
const argv = process.argv.slice(2);
|
|
7864
7825
|
await runDoctorCli({
|
|
7865
7826
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -7868,7 +7829,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
7868
7829
|
});
|
|
7869
7830
|
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) => {
|
|
7870
7831
|
try {
|
|
7871
|
-
const batch = await import("./batch-
|
|
7832
|
+
const batch = await import("./batch-2N2YMRX2.js");
|
|
7872
7833
|
switch (action) {
|
|
7873
7834
|
case "submit":
|
|
7874
7835
|
if (!arg) {
|
|
@@ -7911,7 +7872,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7911
7872
|
}
|
|
7912
7873
|
});
|
|
7913
7874
|
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) => {
|
|
7914
|
-
const { startMcpServer } = await import("./server-
|
|
7875
|
+
const { startMcpServer } = await import("./server-3LERX42X.js");
|
|
7915
7876
|
await startMcpServer({
|
|
7916
7877
|
allowDestructive: !!options.allowDestructive,
|
|
7917
7878
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7924,7 +7885,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
7924
7885
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
7925
7886
|
process.exit(1);
|
|
7926
7887
|
}
|
|
7927
|
-
const { runPrCli } = await import("./pr-
|
|
7888
|
+
const { runPrCli } = await import("./pr-NF5IWLH3.js");
|
|
7928
7889
|
const result = await runPrCli({
|
|
7929
7890
|
action,
|
|
7930
7891
|
target,
|
|
@@ -7944,8 +7905,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
7944
7905
|
process.exit(result.exitCode);
|
|
7945
7906
|
});
|
|
7946
7907
|
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) => {
|
|
7947
|
-
const { runCi } = await import("./ci-
|
|
7948
|
-
const { formatCiResult } = await import("./ci-format-
|
|
7908
|
+
const { runCi } = await import("./ci-3RWVJSZ3.js");
|
|
7909
|
+
const { formatCiResult } = await import("./ci-format-M6HVCXCG.js");
|
|
7949
7910
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
7950
7911
|
if (formats > 1) {
|
|
7951
7912
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -8103,7 +8064,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
8103
8064
|
config.get("customProviders"),
|
|
8104
8065
|
config.getConfigDir()
|
|
8105
8066
|
);
|
|
8106
|
-
const { startHub } = await import("./hub-
|
|
8067
|
+
const { startHub } = await import("./hub-5T5HKOAR.js");
|
|
8107
8068
|
await startHub(
|
|
8108
8069
|
{
|
|
8109
8070
|
topic: topic ?? "",
|
|
@@ -28,9 +28,9 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-WNG3YVZX.js";
|
|
32
32
|
import "./chunk-HOSJZMQS.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-UT2WAJJG.js";
|
|
34
34
|
import "./chunk-B5TYJO7V.js";
|
|
35
35
|
import "./chunk-IW3Q7AE5.js";
|
|
36
36
|
export {
|
|
@@ -27,9 +27,9 @@ import {
|
|
|
27
27
|
touchMemoryReferences,
|
|
28
28
|
updateMemoryApproval,
|
|
29
29
|
updateMemoryEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RRQZRSXW.js";
|
|
31
31
|
import "./chunk-YVTASHS5.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-EPVJS4F6.js";
|
|
33
33
|
import "./chunk-6BUTA5VW.js";
|
|
34
34
|
export {
|
|
35
35
|
addMemoryEntry,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-Z7CZ72RP.js";
|
|
6
|
+
import "./chunk-7US7K3CD.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -17,12 +17,12 @@ import {
|
|
|
17
17
|
} from "./chunk-AUEX6RNY.js";
|
|
18
18
|
import {
|
|
19
19
|
ConfigManager
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VGVKJTHF.js";
|
|
21
21
|
import "./chunk-3OBY7WSS.js";
|
|
22
22
|
import "./chunk-TU3L3PW7.js";
|
|
23
23
|
import {
|
|
24
24
|
VERSION
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-UT2WAJJG.js";
|
|
26
26
|
import "./chunk-IW3Q7AE5.js";
|
|
27
27
|
|
|
28
28
|
// src/cli/pr.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-74BK22BM.js";
|
|
5
|
+
import "./chunk-WNG3YVZX.js";
|
|
6
6
|
import "./chunk-GLSR2NR3.js";
|
|
7
7
|
import "./chunk-UUSRWSSX.js";
|
|
8
8
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -10,7 +10,7 @@ import "./chunk-BXP6YZ2P.js";
|
|
|
10
10
|
import "./chunk-5C76XDDF.js";
|
|
11
11
|
import {
|
|
12
12
|
runTool
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2FQGMR34.js";
|
|
14
14
|
import {
|
|
15
15
|
getDangerLevel,
|
|
16
16
|
schemaToJsonSchema
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
import "./chunk-TU3L3PW7.js";
|
|
19
19
|
import "./chunk-HOSJZMQS.js";
|
|
20
20
|
import "./chunk-4BKXL7SM.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-WWLXW4SY.js";
|
|
22
22
|
import {
|
|
23
23
|
VERSION
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-UT2WAJJG.js";
|
|
25
25
|
import "./chunk-6RPGQ5CG.js";
|
|
26
26
|
import "./chunk-KHYD3WXE.js";
|
|
27
27
|
import "./chunk-NYNSYLFY.js";
|