jinzd-ai-cli 0.4.282 → 0.4.284
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/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/{batch-SBP6H7IK.js → batch-DA7VA35X.js} +2 -2
- package/dist/{chunk-TNIMHTKG.js → chunk-3DRSBZQ7.js} +1 -1
- package/dist/{chunk-LNUWIY6M.js → chunk-BXG44VIQ.js} +1 -1
- package/dist/{chunk-GSGJABL6.js → chunk-C4CIIIDT.js} +3 -3
- package/dist/{chunk-RHSCROLG.js → chunk-FZ4THGUP.js} +1 -1
- package/dist/{chunk-7XKIDSJT.js → chunk-I4FJGILK.js} +4 -4
- package/dist/{chunk-WMHLWCZQ.js → chunk-OZKTHQWA.js} +3 -3
- package/dist/{chunk-SGUPIQYT.js → chunk-PPPSK4MA.js} +1 -1
- package/dist/{chunk-HJDJAI7T.js → chunk-PWLQU43X.js} +1 -1
- package/dist/{chunk-6IRG727F.js → chunk-QKGKWCXE.js} +1 -1
- package/dist/{chunk-JQU4GYET.js → chunk-RV2YOTEQ.js} +1 -1
- package/dist/{chunk-YRPL7A3S.js → chunk-VFVN5CWA.js} +1 -1
- package/dist/{chunk-EVD6CCO2.js → chunk-XSBGCZOP.js} +1 -1
- package/dist/{chunk-KDXA7RXA.js → chunk-Z23JYUOL.js} +124 -3
- package/dist/{ci-VAAMX44S.js → ci-HG2TPYVY.js} +4 -4
- package/dist/{ci-format-RMULFSB5.js → ci-format-UB7K63UZ.js} +2 -2
- package/dist/{constants-PXLMEBJY.js → constants-3DDHA3LT.js} +1 -1
- package/dist/{doctor-cli-C2DFYU2M.js → doctor-cli-ISFDY7LZ.js} +4 -4
- package/dist/electron-server.js +225 -27
- package/dist/{hub-XIU3YTOE.js → hub-MP2CNDMZ.js} +1 -1
- package/dist/index.js +100 -89
- package/dist/{persistent-memory-TA224ZFQ.js → persistent-memory-AMDRRB5E.js} +2 -2
- package/dist/{persistent-memory-ACXKU6RV.js → persistent-memory-J2OVPLWI.js} +2 -2
- package/dist/{pr-J74HW44E.js → pr-BREZ3DJX.js} +4 -4
- package/dist/{run-tests-4KTX5YMO.js → run-tests-DPO23PKA.js} +2 -2
- package/dist/{run-tests-JLZ2KIGV.js → run-tests-XHLV74GU.js} +2 -2
- package/dist/{server-4CZXYGJN.js → server-KK7DIV3J.js} +5 -5
- package/dist/{server-226R6675.js → server-W2VIUKTQ.js} +118 -30
- package/dist/{task-orchestrator-6C3R7KSK.js → task-orchestrator-YM5IMIKL.js} +5 -5
- package/dist/{usage-FY3TEJJS.js → usage-TXPZY7EB.js} +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
AUTO_COMPACT_INSTRUCTION,
|
|
4
|
+
MEMORY_USAGE,
|
|
4
5
|
McpManager,
|
|
5
6
|
SNAPSHOT_PROMPT,
|
|
6
7
|
SkillManager,
|
|
@@ -10,6 +11,8 @@ import {
|
|
|
10
11
|
armDeferredSave,
|
|
11
12
|
autoTrimSessionIfNeeded,
|
|
12
13
|
buildInitPrompt,
|
|
14
|
+
buildMemoryStatusView,
|
|
15
|
+
buildRecallView,
|
|
13
16
|
buildRewindList,
|
|
14
17
|
buildSessionCostReport,
|
|
15
18
|
buildSessionExport,
|
|
@@ -35,6 +38,7 @@ import {
|
|
|
35
38
|
parseCheckpointCommand,
|
|
36
39
|
parseCleanArgs,
|
|
37
40
|
parseExportArgs,
|
|
41
|
+
parseMemoryCommand,
|
|
38
42
|
parseMemoryShowFilters,
|
|
39
43
|
parseModelCommand,
|
|
40
44
|
parseRewindArgs,
|
|
@@ -43,6 +47,8 @@ import {
|
|
|
43
47
|
parseSimpleYaml,
|
|
44
48
|
persistToolRound,
|
|
45
49
|
readGitDiff,
|
|
50
|
+
rebuildDoneMessage,
|
|
51
|
+
rebuildStartMessage,
|
|
46
52
|
resolveForkPoint,
|
|
47
53
|
resolveModelSwitch,
|
|
48
54
|
resolveProviderSwitch,
|
|
@@ -59,7 +65,7 @@ import {
|
|
|
59
65
|
setupProxy,
|
|
60
66
|
snapshotFile,
|
|
61
67
|
stripRoutingTags
|
|
62
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-Z23JYUOL.js";
|
|
63
69
|
import {
|
|
64
70
|
CostTracker,
|
|
65
71
|
computeCost,
|
|
@@ -89,7 +95,7 @@ import {
|
|
|
89
95
|
setMaxOutputCap,
|
|
90
96
|
spawnAgentContext,
|
|
91
97
|
undoStack
|
|
92
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-I4FJGILK.js";
|
|
93
99
|
import {
|
|
94
100
|
buildReviewPrompt,
|
|
95
101
|
buildSecurityReviewPrompt
|
|
@@ -130,7 +136,7 @@ import {
|
|
|
130
136
|
touchMemoryReferences,
|
|
131
137
|
updateMemoryApproval,
|
|
132
138
|
updateMemoryEntry
|
|
133
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-PPPSK4MA.js";
|
|
134
140
|
import "./chunk-4DEMGCK4.js";
|
|
135
141
|
import "./chunk-UUSRWSSX.js";
|
|
136
142
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -154,7 +160,7 @@ import {
|
|
|
154
160
|
formatDoctorReport,
|
|
155
161
|
loadContextFiles,
|
|
156
162
|
writeCrashLog
|
|
157
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-C4CIIIDT.js";
|
|
158
164
|
import {
|
|
159
165
|
describePlugin,
|
|
160
166
|
getActivePluginAssets,
|
|
@@ -171,14 +177,14 @@ import {
|
|
|
171
177
|
trustHook,
|
|
172
178
|
trustPlugin,
|
|
173
179
|
untrustHook
|
|
174
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-BXG44VIQ.js";
|
|
175
181
|
import {
|
|
176
182
|
ProviderRegistry,
|
|
177
183
|
listBuiltInProviderMetadata
|
|
178
184
|
} from "./chunk-UGY5SVNX.js";
|
|
179
185
|
import {
|
|
180
186
|
ConfigManager
|
|
181
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-XSBGCZOP.js";
|
|
182
188
|
import {
|
|
183
189
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
184
190
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -216,7 +222,7 @@ import {
|
|
|
216
222
|
import {
|
|
217
223
|
fileCheckpoints
|
|
218
224
|
} from "./chunk-4BKXL7SM.js";
|
|
219
|
-
import "./chunk-
|
|
225
|
+
import "./chunk-PWLQU43X.js";
|
|
220
226
|
import {
|
|
221
227
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
222
228
|
AUTHOR,
|
|
@@ -234,7 +240,7 @@ import {
|
|
|
234
240
|
SKILLS_DIR_NAME,
|
|
235
241
|
VERSION,
|
|
236
242
|
buildUserIdentityPrompt
|
|
237
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-RV2YOTEQ.js";
|
|
238
244
|
|
|
239
245
|
// src/index.ts
|
|
240
246
|
import { program } from "commander";
|
|
@@ -1352,7 +1358,7 @@ No tools match "${filter}".
|
|
|
1352
1358
|
const { join: join6 } = await import("path");
|
|
1353
1359
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1354
1360
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
|
|
1355
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1361
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-3DDHA3LT.js");
|
|
1356
1362
|
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
1357
1363
|
const cwd = process.cwd();
|
|
1358
1364
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2267,7 +2273,7 @@ function createReviewCommands() {
|
|
|
2267
2273
|
usage: "/test [command|filter]",
|
|
2268
2274
|
async execute(args, ctx) {
|
|
2269
2275
|
try {
|
|
2270
|
-
const { executeTests } = await import("./run-tests-
|
|
2276
|
+
const { executeTests } = await import("./run-tests-DPO23PKA.js");
|
|
2271
2277
|
const argStr = args.join(" ").trim();
|
|
2272
2278
|
let testArgs = {};
|
|
2273
2279
|
if (argStr) {
|
|
@@ -2616,12 +2622,15 @@ function createMemoryCommands() {
|
|
|
2616
2622
|
usage: "/memory [show|add|edit|approve|reject|delete|expire|rebind|clear|backup|restore|export|path|rebuild|refresh|status|recall|index-clear]",
|
|
2617
2623
|
async execute(args, ctx) {
|
|
2618
2624
|
const configDir = ctx.config.getConfigDir();
|
|
2619
|
-
const
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
ctx.renderer.printInfo(
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
+
const intent = parseMemoryCommand(args);
|
|
2626
|
+
const sub = intent.kind === "manage" ? intent.action : intent.kind;
|
|
2627
|
+
if (intent.kind === "usage") {
|
|
2628
|
+
ctx.renderer.printInfo(intent.message);
|
|
2629
|
+
return;
|
|
2630
|
+
}
|
|
2631
|
+
if (intent.kind === "rebuild") {
|
|
2632
|
+
const full = intent.full;
|
|
2633
|
+
ctx.renderer.printInfo(rebuildStartMessage(full));
|
|
2625
2634
|
try {
|
|
2626
2635
|
let lastStage = "";
|
|
2627
2636
|
const stats = await buildChatIndex({
|
|
@@ -2639,95 +2648,99 @@ function createMemoryCommands() {
|
|
|
2639
2648
|
}
|
|
2640
2649
|
}
|
|
2641
2650
|
});
|
|
2642
|
-
ctx.renderer.printSuccess(
|
|
2643
|
-
`\u2713 Chat index: ${stats.chunksTotal} chunks (${stats.chunksAdded} new, ${stats.chunksRemoved} removed) across ${stats.sessionsIndexed + stats.sessionsSkipped} sessions (${stats.sessionsIndexed} re-indexed, ${stats.sessionsSkipped} cached) in ${stats.durationMs}ms`
|
|
2644
|
-
);
|
|
2651
|
+
ctx.renderer.printSuccess(rebuildDoneMessage(stats));
|
|
2645
2652
|
} catch (err) {
|
|
2646
2653
|
ctx.renderer.renderError(`Rebuild failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
2647
2654
|
}
|
|
2648
2655
|
return;
|
|
2649
2656
|
}
|
|
2650
|
-
if (
|
|
2651
|
-
const s = getChatIndexStatus();
|
|
2657
|
+
if (intent.kind === "status") {
|
|
2652
2658
|
const memories = listMemoryEntries(configDir, { includeExpired: true, includeRejected: true });
|
|
2653
|
-
const active = memories.filter((m) => m.approved && !isMemoryExpired(m)).length;
|
|
2654
|
-
const pending = memories.filter((m) => !m.approved && !isMemoryExpired(m)).length;
|
|
2655
|
-
console.log(theme.heading("\n\u{1F9E0} Governed Memory"));
|
|
2656
|
-
console.log(` active : ${active}`);
|
|
2657
|
-
if (pending > 0) {
|
|
2658
|
-
console.log(theme.warning(` pending : ${pending} \u2014 run /memory show --pending, then /memory approve <8-char-id>`));
|
|
2659
|
-
} else {
|
|
2660
|
-
console.log(` pending : 0`);
|
|
2661
|
-
}
|
|
2662
2659
|
const injected = formatMemoryForPrompt(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2660
|
+
const view = buildMemoryStatusView({
|
|
2661
|
+
active: memories.filter((m) => m.approved && !isMemoryExpired(m)).length,
|
|
2662
|
+
pending: memories.filter((m) => !m.approved && !isMemoryExpired(m)).length,
|
|
2663
|
+
injected: injected ? {
|
|
2664
|
+
entryCount: injected.entryCount,
|
|
2665
|
+
totalCount: injected.totalCount,
|
|
2666
|
+
chars: injected.content.length,
|
|
2667
|
+
truncated: injected.truncated
|
|
2668
|
+
} : null,
|
|
2669
|
+
storePath: memoryStorePath(configDir),
|
|
2670
|
+
chatIndex: getChatIndexStatus()
|
|
2671
|
+
});
|
|
2672
|
+
console.log(theme.heading("\n\u{1F9E0} Governed Memory"));
|
|
2673
|
+
for (const row of view.governed) {
|
|
2674
|
+
const line = ` ${row.label.padEnd(13)}: ${row.value}`;
|
|
2675
|
+
console.log(row.warn ? theme.warning(line) : line);
|
|
2668
2676
|
}
|
|
2669
|
-
console.log(` store : ${memoryStorePath(configDir)}`);
|
|
2670
2677
|
console.log(theme.heading("\n\u{1F9E0} Chat Memory Index"));
|
|
2671
|
-
if (
|
|
2672
|
-
console.log(theme.dim(
|
|
2678
|
+
if (view.chatIndexHint) {
|
|
2679
|
+
console.log(theme.dim(` ${view.chatIndexHint}
|
|
2680
|
+
`));
|
|
2673
2681
|
return;
|
|
2674
2682
|
}
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
console.log(` built : ${s.built?.replace("T", " ").slice(0, 19) ?? "-"}`);
|
|
2679
|
-
console.log(` model : ${s.model ?? "-"}`);
|
|
2680
|
-
console.log(` vec file : ${mb(s.vecFileSizeBytes)}`);
|
|
2681
|
-
console.log(` chunks file : ${mb(s.chunksFileSizeBytes)}`);
|
|
2683
|
+
for (const row of view.chatIndex) {
|
|
2684
|
+
console.log(` ${row.label.padEnd(13)}: ${row.value}`);
|
|
2685
|
+
}
|
|
2682
2686
|
console.log();
|
|
2683
2687
|
return;
|
|
2684
2688
|
}
|
|
2685
|
-
if (
|
|
2686
|
-
const query =
|
|
2687
|
-
if (!query) {
|
|
2688
|
-
ctx.renderer.printInfo("Usage: /memory recall <query>");
|
|
2689
|
-
return;
|
|
2690
|
-
}
|
|
2689
|
+
if (intent.kind === "recall") {
|
|
2690
|
+
const query = intent.query;
|
|
2691
2691
|
const persistentHits = searchPersistentMemories(configDir, query, process.cwd(), 3);
|
|
2692
2692
|
if (persistentHits.length > 0) {
|
|
2693
2693
|
touchMemoryReferences(configDir, persistentHits.map((h) => h.entry.id));
|
|
2694
|
+
}
|
|
2695
|
+
let chatHits = [];
|
|
2696
|
+
try {
|
|
2697
|
+
chatHits = await searchChatMemory(query, { topK: 5, minScore: 0.2 });
|
|
2698
|
+
} catch (err) {
|
|
2699
|
+
ctx.renderer.renderError(`Recall failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
2700
|
+
return;
|
|
2701
|
+
}
|
|
2702
|
+
const view = buildRecallView(
|
|
2703
|
+
query,
|
|
2704
|
+
persistentHits.map((h) => ({
|
|
2705
|
+
id: h.entry.id,
|
|
2706
|
+
scope: h.entry.scope,
|
|
2707
|
+
score: h.score,
|
|
2708
|
+
content: h.entry.content
|
|
2709
|
+
})),
|
|
2710
|
+
chatHits.map((h) => ({
|
|
2711
|
+
timestamp: h.chunk.timestamp,
|
|
2712
|
+
title: h.chunk.sessionTitle ?? h.chunk.sessionId.slice(0, 8),
|
|
2713
|
+
score: h.score,
|
|
2714
|
+
text: h.chunk.text
|
|
2715
|
+
}))
|
|
2716
|
+
);
|
|
2717
|
+
if (view.persistentHeading) {
|
|
2694
2718
|
console.log(theme.heading(`
|
|
2695
|
-
|
|
2719
|
+
${view.persistentHeading}
|
|
2696
2720
|
`));
|
|
2697
|
-
for (const
|
|
2698
|
-
console.log(theme.accent(`
|
|
2699
|
-
console.log(theme.dim(" ") +
|
|
2721
|
+
for (const hit of view.persistent) {
|
|
2722
|
+
console.log(theme.accent(` ${hit.label}`));
|
|
2723
|
+
console.log(theme.dim(" ") + hit.body.replace(/\n/g, "\n "));
|
|
2700
2724
|
console.log();
|
|
2701
2725
|
}
|
|
2702
2726
|
}
|
|
2703
|
-
|
|
2704
|
-
const hits = await searchChatMemory(query, { topK: 5, minScore: 0.2 });
|
|
2705
|
-
if (hits.length === 0) {
|
|
2706
|
-
if (persistentHits.length === 0) {
|
|
2707
|
-
console.log(theme.warning(` No memories matched "${query}" (persistent + chat index).`));
|
|
2708
|
-
} else {
|
|
2709
|
-
console.log(theme.dim(` (no chat-history hits above score 0.20)`));
|
|
2710
|
-
}
|
|
2711
|
-
console.log();
|
|
2712
|
-
return;
|
|
2713
|
-
}
|
|
2727
|
+
if (view.chatHeading) {
|
|
2714
2728
|
console.log(theme.heading(`
|
|
2715
|
-
|
|
2729
|
+
${view.chatHeading}
|
|
2716
2730
|
`));
|
|
2717
|
-
for (const
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
console.log(theme.accent(` [${i + 1}] ${ts} \xB7 ${title} \xB7 score ${h.score.toFixed(3)}`));
|
|
2721
|
-
const body = h.chunk.text.length > 400 ? h.chunk.text.slice(0, 400) + "\u2026" : h.chunk.text;
|
|
2722
|
-
console.log(theme.dim(" ") + body.replace(/\n/g, "\n "));
|
|
2731
|
+
for (const hit of view.chat) {
|
|
2732
|
+
console.log(theme.accent(` ${hit.label}`));
|
|
2733
|
+
console.log(theme.dim(" ") + hit.body.replace(/\n/g, "\n "));
|
|
2723
2734
|
console.log();
|
|
2724
2735
|
}
|
|
2725
|
-
}
|
|
2726
|
-
|
|
2736
|
+
}
|
|
2737
|
+
if (view.note) {
|
|
2738
|
+
console.log(view.note.startsWith("No memories") ? theme.warning(` ${view.note}`) : theme.dim(` ${view.note}`));
|
|
2739
|
+
console.log();
|
|
2727
2740
|
}
|
|
2728
2741
|
return;
|
|
2729
2742
|
}
|
|
2730
|
-
if (
|
|
2743
|
+
if (intent.kind === "index-clear") {
|
|
2731
2744
|
clearChatIndex();
|
|
2732
2745
|
ctx.renderer.printSuccess("Chat memory index cleared (persistent memory untouched).");
|
|
2733
2746
|
return;
|
|
@@ -2753,7 +2766,7 @@ function createMemoryCommands() {
|
|
|
2753
2766
|
return { flags, text: text.join(" ").trim() };
|
|
2754
2767
|
};
|
|
2755
2768
|
const asSensitivity = (value) => value === "low" || value === "medium" || value === "high" ? value : void 0;
|
|
2756
|
-
if (
|
|
2769
|
+
if (intent.kind === "show") {
|
|
2757
2770
|
const showFilters = parseMemoryShowFilters(args.slice(1));
|
|
2758
2771
|
if (showFilters.invalidStale) {
|
|
2759
2772
|
ctx.renderer.renderError("Usage: /memory show --stale <days> (positive number)");
|
|
@@ -2947,9 +2960,7 @@ function createMemoryCommands() {
|
|
|
2947
2960
|
console.log(theme.accent(memoryStorePath(configDir)));
|
|
2948
2961
|
console.log(theme.dim(memoryMarkdownPath(configDir)));
|
|
2949
2962
|
} else {
|
|
2950
|
-
ctx.renderer.printInfo(
|
|
2951
|
-
"Governed persistent memory: show [--pending|--orphaned|--stale <days>|--scope <s>|--search <text>] | add | edit <id> <text> | approve/reject/delete/expire <id> | rebind <id> <path> | clear | backup [--out <file>] | restore <file> | export [--format json|md] [--out <file>] | path\nChat memory index (cross-session recall): rebuild | refresh | status | recall <query> | index-clear"
|
|
2952
|
-
);
|
|
2963
|
+
ctx.renderer.printInfo(MEMORY_USAGE);
|
|
2953
2964
|
}
|
|
2954
2965
|
}
|
|
2955
2966
|
},
|
|
@@ -7264,7 +7275,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7264
7275
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7265
7276
|
process.exit(1);
|
|
7266
7277
|
}
|
|
7267
|
-
const { startWebServer } = await import("./server-
|
|
7278
|
+
const { startWebServer } = await import("./server-W2VIUKTQ.js");
|
|
7268
7279
|
await startWebServer({ port, host: options.host });
|
|
7269
7280
|
});
|
|
7270
7281
|
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) => {
|
|
@@ -7431,11 +7442,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
7431
7442
|
console.log(footer + "\n");
|
|
7432
7443
|
});
|
|
7433
7444
|
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) => {
|
|
7434
|
-
const { runUsageCli } = await import("./usage-
|
|
7445
|
+
const { runUsageCli } = await import("./usage-TXPZY7EB.js");
|
|
7435
7446
|
await runUsageCli(options);
|
|
7436
7447
|
});
|
|
7437
7448
|
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) => {
|
|
7438
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7449
|
+
const { runDoctorCli } = await import("./doctor-cli-ISFDY7LZ.js");
|
|
7439
7450
|
const argv = process.argv.slice(2);
|
|
7440
7451
|
await runDoctorCli({
|
|
7441
7452
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -7444,7 +7455,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
7444
7455
|
});
|
|
7445
7456
|
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) => {
|
|
7446
7457
|
try {
|
|
7447
|
-
const batch = await import("./batch-
|
|
7458
|
+
const batch = await import("./batch-DA7VA35X.js");
|
|
7448
7459
|
switch (action) {
|
|
7449
7460
|
case "submit":
|
|
7450
7461
|
if (!arg) {
|
|
@@ -7487,7 +7498,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7487
7498
|
}
|
|
7488
7499
|
});
|
|
7489
7500
|
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) => {
|
|
7490
|
-
const { startMcpServer } = await import("./server-
|
|
7501
|
+
const { startMcpServer } = await import("./server-KK7DIV3J.js");
|
|
7491
7502
|
await startMcpServer({
|
|
7492
7503
|
allowDestructive: !!options.allowDestructive,
|
|
7493
7504
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7500,7 +7511,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
7500
7511
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
7501
7512
|
process.exit(1);
|
|
7502
7513
|
}
|
|
7503
|
-
const { runPrCli } = await import("./pr-
|
|
7514
|
+
const { runPrCli } = await import("./pr-BREZ3DJX.js");
|
|
7504
7515
|
const result = await runPrCli({
|
|
7505
7516
|
action,
|
|
7506
7517
|
target,
|
|
@@ -7520,8 +7531,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
7520
7531
|
process.exit(result.exitCode);
|
|
7521
7532
|
});
|
|
7522
7533
|
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) => {
|
|
7523
|
-
const { runCi } = await import("./ci-
|
|
7524
|
-
const { formatCiResult } = await import("./ci-format-
|
|
7534
|
+
const { runCi } = await import("./ci-HG2TPYVY.js");
|
|
7535
|
+
const { formatCiResult } = await import("./ci-format-UB7K63UZ.js");
|
|
7525
7536
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
7526
7537
|
if (formats > 1) {
|
|
7527
7538
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -7679,7 +7690,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
7679
7690
|
config.get("customProviders"),
|
|
7680
7691
|
config.getConfigDir()
|
|
7681
7692
|
);
|
|
7682
|
-
const { startHub } = await import("./hub-
|
|
7693
|
+
const { startHub } = await import("./hub-MP2CNDMZ.js");
|
|
7683
7694
|
await startHub(
|
|
7684
7695
|
{
|
|
7685
7696
|
topic: topic ?? "",
|
|
@@ -27,9 +27,9 @@ import {
|
|
|
27
27
|
touchMemoryReferences,
|
|
28
28
|
updateMemoryApproval,
|
|
29
29
|
updateMemoryEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FZ4THGUP.js";
|
|
31
31
|
import "./chunk-FSC6KEWU.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-3DRSBZQ7.js";
|
|
33
33
|
import "./chunk-6BUTA5VW.js";
|
|
34
34
|
export {
|
|
35
35
|
addMemoryEntry,
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PPPSK4MA.js";
|
|
32
32
|
import "./chunk-3FEZSLGI.js";
|
|
33
33
|
import "./chunk-HOSJZMQS.js";
|
|
34
34
|
import "./chunk-IW3Q7AE5.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-RV2YOTEQ.js";
|
|
36
36
|
export {
|
|
37
37
|
addMemoryEntry,
|
|
38
38
|
backupMemoryStore,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-OZKTHQWA.js";
|
|
6
|
+
import "./chunk-VFVN5CWA.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
} from "./chunk-UGY5SVNX.js";
|
|
18
18
|
import {
|
|
19
19
|
ConfigManager
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XSBGCZOP.js";
|
|
21
21
|
import "./chunk-TEXT4DAT.js";
|
|
22
22
|
import "./chunk-TU3L3PW7.js";
|
|
23
23
|
import "./chunk-IW3Q7AE5.js";
|
|
24
24
|
import {
|
|
25
25
|
VERSION
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RV2YOTEQ.js";
|
|
27
27
|
|
|
28
28
|
// src/cli/pr.ts
|
|
29
29
|
import { execFileSync } from "child_process";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I4FJGILK.js";
|
|
5
5
|
import "./chunk-GHWZVPUV.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-PPPSK4MA.js";
|
|
7
7
|
import "./chunk-4DEMGCK4.js";
|
|
8
8
|
import "./chunk-UUSRWSSX.js";
|
|
9
9
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -14,7 +14,7 @@ import "./chunk-NYNSYLFY.js";
|
|
|
14
14
|
import "./chunk-3FEZSLGI.js";
|
|
15
15
|
import {
|
|
16
16
|
runTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BXG44VIQ.js";
|
|
18
18
|
import {
|
|
19
19
|
getDangerLevel,
|
|
20
20
|
schemaToJsonSchema
|
|
@@ -23,10 +23,10 @@ import "./chunk-TU3L3PW7.js";
|
|
|
23
23
|
import "./chunk-HOSJZMQS.js";
|
|
24
24
|
import "./chunk-IW3Q7AE5.js";
|
|
25
25
|
import "./chunk-4BKXL7SM.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-PWLQU43X.js";
|
|
27
27
|
import {
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-RV2YOTEQ.js";
|
|
30
30
|
|
|
31
31
|
// src/mcp/server.ts
|
|
32
32
|
import { createInterface } from "readline";
|