jinzd-ai-cli 0.4.250 → 0.4.252
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-IY5HGKN6.js → batch-UCAVB77F.js} +2 -2
- package/dist/{chunk-PPWGR4GC.js → chunk-2N3IEEY4.js} +1 -1
- package/dist/{chunk-OF4GCIXB.js → chunk-4BOT4YNT.js} +1 -1
- package/dist/{chunk-2JP3OCSC.js → chunk-5GWGXJQN.js} +59 -16
- package/dist/{chunk-KSGS3WJL.js → chunk-7P3EP5OO.js} +1 -1
- package/dist/{chunk-G5WC423V.js → chunk-AXNUGP53.js} +2 -2
- package/dist/{chunk-TFE57FLA.js → chunk-EEFHKKT2.js} +1 -1
- package/dist/{chunk-ME3E6PTH.js → chunk-EPL77VAA.js} +3 -3
- package/dist/{chunk-H6NS3NT3.js → chunk-HUV7TFOH.js} +1 -1
- package/dist/{chunk-JXXCI5DY.js → chunk-JWSMRAVK.js} +1 -1
- package/dist/{chunk-DZW4ZBGK.js → chunk-KTE4BHHI.js} +1 -1
- package/dist/{chunk-RAVWC2M5.js → chunk-QW6M662O.js} +11 -3
- package/dist/{chunk-MQROECSO.js → chunk-TQVR2URD.js} +1 -1
- package/dist/{chunk-TLEO27WX.js → chunk-XINRSNNL.js} +3 -3
- package/dist/{ci-NHCRVH33.js → ci-LOL5I5DP.js} +4 -4
- package/dist/{ci-format-VAHB6M4K.js → ci-format-TT5IZATX.js} +2 -2
- package/dist/{constants-KJZYWEM6.js → constants-R57JYUHW.js} +1 -1
- package/dist/{doctor-cli-XMZWCFUX.js → doctor-cli-ODPYWX4T.js} +4 -4
- package/dist/electron-server.js +71 -20
- package/dist/{hub-ZF22GHO4.js → hub-BNUQJOBO.js} +1 -1
- package/dist/index.js +22 -22
- package/dist/{persistent-memory-LLY3G4M5.js → persistent-memory-ITDGIW3Z.js} +2 -2
- package/dist/{persistent-memory-XL3W2PJQ.js → persistent-memory-US6A7WMA.js} +2 -2
- package/dist/{pr-6C6UYRRO.js → pr-6PR2OO5F.js} +4 -4
- package/dist/{run-tests-FRYELO63.js → run-tests-4FSTZ22Q.js} +2 -2
- package/dist/{run-tests-Q6J57J7Y.js → run-tests-IM3GSWBM.js} +2 -2
- package/dist/{server-IWHZSHDX.js → server-ULAI723O.js} +11 -11
- package/dist/{server-QNJPCDI6.js → server-WZFZEVCQ.js} +5 -5
- package/dist/{task-orchestrator-3DDYIDLM.js → task-orchestrator-KWM7J4US.js} +5 -5
- package/dist/{usage-U6YLYUDV.js → usage-E72O4RHB.js} +2 -2
- package/package.json +5 -5
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7P3EP5OO.js";
|
|
5
5
|
import "./chunk-5ULLIOVC.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-EEFHKKT2.js";
|
|
7
7
|
import {
|
|
8
8
|
atomicWriteFileSync
|
|
9
9
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
searchPersistentMemories,
|
|
8
8
|
touchMemoryReferences,
|
|
9
9
|
updateMemoryEntry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HUV7TFOH.js";
|
|
11
11
|
import {
|
|
12
12
|
indexProject
|
|
13
13
|
} from "./chunk-GLSR2NR3.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
runHook,
|
|
24
24
|
runLifecycleHooks,
|
|
25
25
|
runTool
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QW6M662O.js";
|
|
27
27
|
import {
|
|
28
28
|
getDangerLevel,
|
|
29
29
|
isFileWriteTool,
|
|
@@ -39,14 +39,14 @@ import {
|
|
|
39
39
|
} from "./chunk-4BKXL7SM.js";
|
|
40
40
|
import {
|
|
41
41
|
runTestsTool
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-KTE4BHHI.js";
|
|
43
43
|
import {
|
|
44
44
|
CONFIG_DIR_NAME,
|
|
45
45
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
46
46
|
SUBAGENT_ALLOWED_TOOLS,
|
|
47
47
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
48
48
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-EEFHKKT2.js";
|
|
50
50
|
import {
|
|
51
51
|
loadChatIndex,
|
|
52
52
|
searchChatMemory
|
|
@@ -2883,6 +2883,30 @@ var subAgentGuard = {
|
|
|
2883
2883
|
active: false
|
|
2884
2884
|
};
|
|
2885
2885
|
|
|
2886
|
+
// src/tools/arg-aliases.ts
|
|
2887
|
+
function pickArg(args, canonical, aliases) {
|
|
2888
|
+
if (args[canonical] !== void 0 && args[canonical] !== null) return args[canonical];
|
|
2889
|
+
for (const alias of aliases) {
|
|
2890
|
+
if (args[alias] !== void 0 && args[alias] !== null) return args[alias];
|
|
2891
|
+
}
|
|
2892
|
+
return void 0;
|
|
2893
|
+
}
|
|
2894
|
+
var OLD_STR_ALIASES = ["old_string", "oldStr", "oldString", "old_text", "search"];
|
|
2895
|
+
var NEW_STR_ALIASES = ["new_string", "newStr", "newString", "new_text", "replace"];
|
|
2896
|
+
var CONTENT_ALIASES = ["file_text", "text", "contents", "data"];
|
|
2897
|
+
var INSERT_LINE_ALIASES = ["insert_line", "line", "after_line"];
|
|
2898
|
+
var INSERT_CONTENT_ALIASES = ["content", "new_str", "text"];
|
|
2899
|
+
function normalizeReplaceArgs(raw) {
|
|
2900
|
+
const oldStr = pickArg(raw, "old_str", OLD_STR_ALIASES);
|
|
2901
|
+
if (oldStr === void 0) return void 0;
|
|
2902
|
+
return { old_str: oldStr, new_str: pickArg(raw, "new_str", NEW_STR_ALIASES) };
|
|
2903
|
+
}
|
|
2904
|
+
function describeReceivedKeys(args) {
|
|
2905
|
+
const keys = Object.keys(args).filter((k) => args[k] !== void 0);
|
|
2906
|
+
if (keys.length === 0) return " (no arguments received)";
|
|
2907
|
+
return ` Received keys: ${keys.join(", ")}.`;
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2886
2910
|
// src/tools/builtin/write-file.ts
|
|
2887
2911
|
var writeFileTool = {
|
|
2888
2912
|
definition: {
|
|
@@ -2921,7 +2945,8 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
|
|
|
2921
2945
|
},
|
|
2922
2946
|
async execute(args) {
|
|
2923
2947
|
const filePath = String(args["path"] ?? args["file"] ?? "");
|
|
2924
|
-
const
|
|
2948
|
+
const contentArg = pickArg(args, "content", CONTENT_ALIASES);
|
|
2949
|
+
const content = String(contentArg ?? "");
|
|
2925
2950
|
const encoding = args["encoding"] ?? "utf-8";
|
|
2926
2951
|
const appendMode = String(args["append"] ?? "false").toLowerCase() === "true";
|
|
2927
2952
|
if (!filePath) throw new ToolError("write_file", "path is required");
|
|
@@ -3215,15 +3240,22 @@ function parseEditsArg(raw) {
|
|
|
3215
3240
|
throw new ToolError("edit_file", `edits[${i}] must be an object`);
|
|
3216
3241
|
}
|
|
3217
3242
|
const rec = e;
|
|
3218
|
-
|
|
3243
|
+
const normalized = normalizeReplaceArgs(rec);
|
|
3244
|
+
if (normalized === void 0) {
|
|
3245
|
+
throw new ToolError(
|
|
3246
|
+
"edit_file",
|
|
3247
|
+
`edits[${i}].old_str is missing.${describeReceivedKeys(rec)}`
|
|
3248
|
+
);
|
|
3249
|
+
}
|
|
3250
|
+
if (typeof normalized.old_str !== "string") {
|
|
3219
3251
|
throw new ToolError("edit_file", `edits[${i}].old_str must be a string`);
|
|
3220
3252
|
}
|
|
3221
|
-
if (
|
|
3253
|
+
if (normalized.new_str !== void 0 && typeof normalized.new_str !== "string") {
|
|
3222
3254
|
throw new ToolError("edit_file", `edits[${i}].new_str must be a string`);
|
|
3223
3255
|
}
|
|
3224
3256
|
return {
|
|
3225
|
-
old_str:
|
|
3226
|
-
new_str: String(
|
|
3257
|
+
old_str: normalized.old_str,
|
|
3258
|
+
new_str: String(normalized.new_str ?? ""),
|
|
3227
3259
|
ignore_whitespace: Boolean(rec.ignore_whitespace),
|
|
3228
3260
|
replace_all: Boolean(rec.replace_all)
|
|
3229
3261
|
};
|
|
@@ -3407,9 +3439,10 @@ Note: Path can be absolute or relative to cwd.`,
|
|
|
3407
3439
|
}
|
|
3408
3440
|
return lines.join("\n");
|
|
3409
3441
|
}
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
const
|
|
3442
|
+
const replaceArgs = normalizeReplaceArgs(args);
|
|
3443
|
+
if (replaceArgs !== void 0) {
|
|
3444
|
+
const oldStr = String(replaceArgs.old_str);
|
|
3445
|
+
const newStr = String(replaceArgs.new_str ?? "");
|
|
3413
3446
|
const ignoreWs = Boolean(args["ignore_whitespace"]);
|
|
3414
3447
|
const replaceAll = Boolean(args["replace_all"]);
|
|
3415
3448
|
if (oldStr === "") throw new ToolError("edit_file", "old_str cannot be empty");
|
|
@@ -3439,10 +3472,14 @@ Please read the file first and use exact text.`;
|
|
|
3439
3472
|
Old: ${truncatePreview(oldStr)}
|
|
3440
3473
|
New: ${truncatePreview(newStr)}`;
|
|
3441
3474
|
}
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
const
|
|
3475
|
+
const insertLineArg = pickArg(args, "insert_after_line", INSERT_LINE_ALIASES);
|
|
3476
|
+
if (insertLineArg !== void 0) {
|
|
3477
|
+
const afterLine = Number(insertLineArg);
|
|
3478
|
+
const content = String(pickArg(args, "insert_content", INSERT_CONTENT_ALIASES) ?? "");
|
|
3445
3479
|
const lines = original.split("\n");
|
|
3480
|
+
if (!Number.isFinite(afterLine)) {
|
|
3481
|
+
throw new ToolError("edit_file", `insert_after_line must be a number, got ${JSON.stringify(insertLineArg)}`);
|
|
3482
|
+
}
|
|
3446
3483
|
if (afterLine < 0 || afterLine > lines.length) {
|
|
3447
3484
|
throw new ToolError("edit_file", `insert_after_line ${afterLine} is out of range (file has ${lines.length} lines)`);
|
|
3448
3485
|
}
|
|
@@ -3456,6 +3493,12 @@ Please read the file first and use exact text.`;
|
|
|
3456
3493
|
const fromLine = Number(args["delete_from_line"]);
|
|
3457
3494
|
const toLine = Number(args["delete_to_line"] ?? args["delete_from_line"]);
|
|
3458
3495
|
const lines = original.split("\n");
|
|
3496
|
+
if (!Number.isFinite(fromLine) || !Number.isFinite(toLine)) {
|
|
3497
|
+
throw new ToolError(
|
|
3498
|
+
"edit_file",
|
|
3499
|
+
`delete_from_line/delete_to_line must be numbers, got ${JSON.stringify(args["delete_from_line"])}/${JSON.stringify(args["delete_to_line"])}`
|
|
3500
|
+
);
|
|
3501
|
+
}
|
|
3459
3502
|
if (fromLine < 1 || toLine < fromLine || toLine > lines.length) {
|
|
3460
3503
|
throw new ToolError(
|
|
3461
3504
|
"edit_file",
|
|
@@ -3470,7 +3513,7 @@ Please read the file first and use exact text.`;
|
|
|
3470
3513
|
}
|
|
3471
3514
|
throw new ToolError(
|
|
3472
3515
|
"edit_file",
|
|
3473
|
-
"No operation specified. Provide one of: (old_str + new_str), (insert_after_line + insert_content), (delete_from_line + delete_to_line), edits=[...], or patch=<unified diff>."
|
|
3516
|
+
"No operation specified. Provide one of: (old_str + new_str), (insert_after_line + insert_content), (delete_from_line + delete_to_line), edits=[...], or patch=<unified diff>." + describeReceivedKeys(args)
|
|
3474
3517
|
);
|
|
3475
3518
|
}
|
|
3476
3519
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
truncateForPersist
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5GWGXJQN.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-EEFHKKT2.js";
|
|
15
15
|
import {
|
|
16
16
|
atomicWriteFileSync
|
|
17
17
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
evaluateCiGate,
|
|
4
4
|
normalizeCiThresholds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4BOT4YNT.js";
|
|
6
6
|
import {
|
|
7
7
|
buildReviewPrompt,
|
|
8
8
|
buildSecurityReviewPrompt,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
} from "./chunk-2QZMITSL.js";
|
|
14
14
|
import {
|
|
15
15
|
ConfigManager
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7P3EP5OO.js";
|
|
17
17
|
import {
|
|
18
18
|
VERSION
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EEFHKKT2.js";
|
|
20
20
|
|
|
21
21
|
// src/cli/ci.ts
|
|
22
22
|
import { execFileSync } from "child_process";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CONFIG_DIR_NAME,
|
|
4
4
|
PLUGINS_DIR_NAME
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EEFHKKT2.js";
|
|
6
6
|
import {
|
|
7
7
|
atomicWriteFileSync
|
|
8
8
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -224,8 +224,16 @@ function normalizeForHash(buf) {
|
|
|
224
224
|
const str = buf.toString("utf-8").replaceAll("\r\n", "\n");
|
|
225
225
|
return Buffer.from(str, "utf-8");
|
|
226
226
|
}
|
|
227
|
+
function resolvePluginDir(pluginDir) {
|
|
228
|
+
const resolved = resolve(pluginDir);
|
|
229
|
+
try {
|
|
230
|
+
return realpathSync(resolved);
|
|
231
|
+
} catch {
|
|
232
|
+
return resolved;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
227
235
|
function extractCommandPaths(command, pluginDir) {
|
|
228
|
-
const resolvedDir =
|
|
236
|
+
const resolvedDir = resolvePluginDir(pluginDir);
|
|
229
237
|
const refs = [];
|
|
230
238
|
for (const m of command.matchAll(/\$PLUGIN_DIR[\\/]([^"'\s]+)/g)) {
|
|
231
239
|
refs.push(m[1]);
|
|
@@ -255,7 +263,7 @@ function extractCommandPaths(command, pluginDir) {
|
|
|
255
263
|
return valid;
|
|
256
264
|
}
|
|
257
265
|
function hashPluginContent(pluginDir, manifest) {
|
|
258
|
-
const resolvedDir =
|
|
266
|
+
const resolvedDir = resolvePluginDir(pluginDir);
|
|
259
267
|
const assetRels = /* @__PURE__ */ new Set(
|
|
260
268
|
[...manifest.skills, ...manifest.commands, ...manifest.agents]
|
|
261
269
|
);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-2QZMITSL.js";
|
|
5
5
|
import {
|
|
6
6
|
ConfigManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7P3EP5OO.js";
|
|
8
8
|
import {
|
|
9
9
|
getActivePluginAssets,
|
|
10
10
|
getPendingHookTrust,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
listHooks,
|
|
15
15
|
listInstalledPlugins,
|
|
16
16
|
resetStats
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QW6M662O.js";
|
|
18
18
|
import {
|
|
19
19
|
getGitRoot
|
|
20
20
|
} from "./chunk-HOSJZMQS.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
MCP_PROJECT_CONFIG_NAME,
|
|
27
27
|
MEMORY_FILE_NAME,
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-EEFHKKT2.js";
|
|
30
30
|
|
|
31
31
|
// src/diagnostics/doctor-report.ts
|
|
32
32
|
import { existsSync as existsSync3, statSync as statSync2 } from "fs";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
CI_COMMENT_MARKER,
|
|
4
4
|
countSeverity,
|
|
5
5
|
runCi
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-EPL77VAA.js";
|
|
7
|
+
import "./chunk-4BOT4YNT.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
9
|
import "./chunk-2QZMITSL.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-7P3EP5OO.js";
|
|
11
11
|
import "./chunk-O3XSFPYH.js";
|
|
12
12
|
import "./chunk-5ULLIOVC.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-EEFHKKT2.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
export {
|
|
16
16
|
CI_COMMENT_MARKER,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
formatDoctorReport,
|
|
4
4
|
runDoctorCli
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XINRSNNL.js";
|
|
6
6
|
import "./chunk-2QZMITSL.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-7P3EP5OO.js";
|
|
8
|
+
import "./chunk-QW6M662O.js";
|
|
9
9
|
import "./chunk-O3XSFPYH.js";
|
|
10
10
|
import "./chunk-5ULLIOVC.js";
|
|
11
11
|
import "./chunk-HOSJZMQS.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-EEFHKKT2.js";
|
|
13
13
|
import "./chunk-IW3Q7AE5.js";
|
|
14
14
|
export {
|
|
15
15
|
formatDoctorReport,
|
package/dist/electron-server.js
CHANGED
|
@@ -34,14 +34,14 @@ import {
|
|
|
34
34
|
touchMemoryReferences,
|
|
35
35
|
updateMemoryApproval,
|
|
36
36
|
updateMemoryEntry
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-JWSMRAVK.js";
|
|
38
38
|
import {
|
|
39
39
|
redactJson,
|
|
40
40
|
scanString
|
|
41
41
|
} from "./chunk-YVTASHS5.js";
|
|
42
42
|
import {
|
|
43
43
|
runTestsTool
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-2N3IEEY4.js";
|
|
45
45
|
import {
|
|
46
46
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
47
47
|
APP_NAME,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
SUBAGENT_MAX_ROUNDS_LIMIT,
|
|
74
74
|
VERSION,
|
|
75
75
|
buildUserIdentityPrompt
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-TQVR2URD.js";
|
|
77
77
|
import {
|
|
78
78
|
hasSemanticIndex,
|
|
79
79
|
semanticSearch
|
|
@@ -7767,6 +7767,30 @@ var subAgentGuard = {
|
|
|
7767
7767
|
active: false
|
|
7768
7768
|
};
|
|
7769
7769
|
|
|
7770
|
+
// src/tools/arg-aliases.ts
|
|
7771
|
+
function pickArg(args, canonical, aliases) {
|
|
7772
|
+
if (args[canonical] !== void 0 && args[canonical] !== null) return args[canonical];
|
|
7773
|
+
for (const alias of aliases) {
|
|
7774
|
+
if (args[alias] !== void 0 && args[alias] !== null) return args[alias];
|
|
7775
|
+
}
|
|
7776
|
+
return void 0;
|
|
7777
|
+
}
|
|
7778
|
+
var OLD_STR_ALIASES = ["old_string", "oldStr", "oldString", "old_text", "search"];
|
|
7779
|
+
var NEW_STR_ALIASES = ["new_string", "newStr", "newString", "new_text", "replace"];
|
|
7780
|
+
var CONTENT_ALIASES = ["file_text", "text", "contents", "data"];
|
|
7781
|
+
var INSERT_LINE_ALIASES = ["insert_line", "line", "after_line"];
|
|
7782
|
+
var INSERT_CONTENT_ALIASES = ["content", "new_str", "text"];
|
|
7783
|
+
function normalizeReplaceArgs(raw) {
|
|
7784
|
+
const oldStr = pickArg(raw, "old_str", OLD_STR_ALIASES);
|
|
7785
|
+
if (oldStr === void 0) return void 0;
|
|
7786
|
+
return { old_str: oldStr, new_str: pickArg(raw, "new_str", NEW_STR_ALIASES) };
|
|
7787
|
+
}
|
|
7788
|
+
function describeReceivedKeys(args) {
|
|
7789
|
+
const keys = Object.keys(args).filter((k) => args[k] !== void 0);
|
|
7790
|
+
if (keys.length === 0) return " (no arguments received)";
|
|
7791
|
+
return ` Received keys: ${keys.join(", ")}.`;
|
|
7792
|
+
}
|
|
7793
|
+
|
|
7770
7794
|
// src/tools/builtin/write-file.ts
|
|
7771
7795
|
var writeFileTool = {
|
|
7772
7796
|
definition: {
|
|
@@ -7805,7 +7829,8 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
|
|
|
7805
7829
|
},
|
|
7806
7830
|
async execute(args) {
|
|
7807
7831
|
const filePath = String(args["path"] ?? args["file"] ?? "");
|
|
7808
|
-
const
|
|
7832
|
+
const contentArg = pickArg(args, "content", CONTENT_ALIASES);
|
|
7833
|
+
const content = String(contentArg ?? "");
|
|
7809
7834
|
const encoding = args["encoding"] ?? "utf-8";
|
|
7810
7835
|
const appendMode = String(args["append"] ?? "false").toLowerCase() === "true";
|
|
7811
7836
|
if (!filePath) throw new ToolError("write_file", "path is required");
|
|
@@ -8099,15 +8124,22 @@ function parseEditsArg(raw) {
|
|
|
8099
8124
|
throw new ToolError("edit_file", `edits[${i}] must be an object`);
|
|
8100
8125
|
}
|
|
8101
8126
|
const rec = e;
|
|
8102
|
-
|
|
8127
|
+
const normalized = normalizeReplaceArgs(rec);
|
|
8128
|
+
if (normalized === void 0) {
|
|
8129
|
+
throw new ToolError(
|
|
8130
|
+
"edit_file",
|
|
8131
|
+
`edits[${i}].old_str is missing.${describeReceivedKeys(rec)}`
|
|
8132
|
+
);
|
|
8133
|
+
}
|
|
8134
|
+
if (typeof normalized.old_str !== "string") {
|
|
8103
8135
|
throw new ToolError("edit_file", `edits[${i}].old_str must be a string`);
|
|
8104
8136
|
}
|
|
8105
|
-
if (
|
|
8137
|
+
if (normalized.new_str !== void 0 && typeof normalized.new_str !== "string") {
|
|
8106
8138
|
throw new ToolError("edit_file", `edits[${i}].new_str must be a string`);
|
|
8107
8139
|
}
|
|
8108
8140
|
return {
|
|
8109
|
-
old_str:
|
|
8110
|
-
new_str: String(
|
|
8141
|
+
old_str: normalized.old_str,
|
|
8142
|
+
new_str: String(normalized.new_str ?? ""),
|
|
8111
8143
|
ignore_whitespace: Boolean(rec.ignore_whitespace),
|
|
8112
8144
|
replace_all: Boolean(rec.replace_all)
|
|
8113
8145
|
};
|
|
@@ -8291,9 +8323,10 @@ Note: Path can be absolute or relative to cwd.`,
|
|
|
8291
8323
|
}
|
|
8292
8324
|
return lines.join("\n");
|
|
8293
8325
|
}
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
const
|
|
8326
|
+
const replaceArgs = normalizeReplaceArgs(args);
|
|
8327
|
+
if (replaceArgs !== void 0) {
|
|
8328
|
+
const oldStr = String(replaceArgs.old_str);
|
|
8329
|
+
const newStr = String(replaceArgs.new_str ?? "");
|
|
8297
8330
|
const ignoreWs = Boolean(args["ignore_whitespace"]);
|
|
8298
8331
|
const replaceAll = Boolean(args["replace_all"]);
|
|
8299
8332
|
if (oldStr === "") throw new ToolError("edit_file", "old_str cannot be empty");
|
|
@@ -8323,10 +8356,14 @@ Please read the file first and use exact text.`;
|
|
|
8323
8356
|
Old: ${truncatePreview(oldStr)}
|
|
8324
8357
|
New: ${truncatePreview(newStr)}`;
|
|
8325
8358
|
}
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
const
|
|
8359
|
+
const insertLineArg = pickArg(args, "insert_after_line", INSERT_LINE_ALIASES);
|
|
8360
|
+
if (insertLineArg !== void 0) {
|
|
8361
|
+
const afterLine = Number(insertLineArg);
|
|
8362
|
+
const content = String(pickArg(args, "insert_content", INSERT_CONTENT_ALIASES) ?? "");
|
|
8329
8363
|
const lines = original.split("\n");
|
|
8364
|
+
if (!Number.isFinite(afterLine)) {
|
|
8365
|
+
throw new ToolError("edit_file", `insert_after_line must be a number, got ${JSON.stringify(insertLineArg)}`);
|
|
8366
|
+
}
|
|
8330
8367
|
if (afterLine < 0 || afterLine > lines.length) {
|
|
8331
8368
|
throw new ToolError("edit_file", `insert_after_line ${afterLine} is out of range (file has ${lines.length} lines)`);
|
|
8332
8369
|
}
|
|
@@ -8340,6 +8377,12 @@ Please read the file first and use exact text.`;
|
|
|
8340
8377
|
const fromLine = Number(args["delete_from_line"]);
|
|
8341
8378
|
const toLine = Number(args["delete_to_line"] ?? args["delete_from_line"]);
|
|
8342
8379
|
const lines = original.split("\n");
|
|
8380
|
+
if (!Number.isFinite(fromLine) || !Number.isFinite(toLine)) {
|
|
8381
|
+
throw new ToolError(
|
|
8382
|
+
"edit_file",
|
|
8383
|
+
`delete_from_line/delete_to_line must be numbers, got ${JSON.stringify(args["delete_from_line"])}/${JSON.stringify(args["delete_to_line"])}`
|
|
8384
|
+
);
|
|
8385
|
+
}
|
|
8343
8386
|
if (fromLine < 1 || toLine < fromLine || toLine > lines.length) {
|
|
8344
8387
|
throw new ToolError(
|
|
8345
8388
|
"edit_file",
|
|
@@ -8354,7 +8397,7 @@ Please read the file first and use exact text.`;
|
|
|
8354
8397
|
}
|
|
8355
8398
|
throw new ToolError(
|
|
8356
8399
|
"edit_file",
|
|
8357
|
-
"No operation specified. Provide one of: (old_str + new_str), (insert_after_line + insert_content), (delete_from_line + delete_to_line), edits=[...], or patch=<unified diff>."
|
|
8400
|
+
"No operation specified. Provide one of: (old_str + new_str), (insert_after_line + insert_content), (delete_from_line + delete_to_line), edits=[...], or patch=<unified diff>." + describeReceivedKeys(args)
|
|
8358
8401
|
);
|
|
8359
8402
|
}
|
|
8360
8403
|
};
|
|
@@ -10116,8 +10159,16 @@ function normalizeForHash(buf) {
|
|
|
10116
10159
|
const str = buf.toString("utf-8").replaceAll("\r\n", "\n");
|
|
10117
10160
|
return Buffer.from(str, "utf-8");
|
|
10118
10161
|
}
|
|
10162
|
+
function resolvePluginDir(pluginDir) {
|
|
10163
|
+
const resolved = resolve6(pluginDir);
|
|
10164
|
+
try {
|
|
10165
|
+
return realpathSync2(resolved);
|
|
10166
|
+
} catch {
|
|
10167
|
+
return resolved;
|
|
10168
|
+
}
|
|
10169
|
+
}
|
|
10119
10170
|
function extractCommandPaths(command, pluginDir) {
|
|
10120
|
-
const resolvedDir =
|
|
10171
|
+
const resolvedDir = resolvePluginDir(pluginDir);
|
|
10121
10172
|
const refs = [];
|
|
10122
10173
|
for (const m of command.matchAll(/\$PLUGIN_DIR[\\/]([^"'\s]+)/g)) {
|
|
10123
10174
|
refs.push(m[1]);
|
|
@@ -10147,7 +10198,7 @@ function extractCommandPaths(command, pluginDir) {
|
|
|
10147
10198
|
return valid;
|
|
10148
10199
|
}
|
|
10149
10200
|
function hashPluginContent(pluginDir, manifest) {
|
|
10150
|
-
const resolvedDir =
|
|
10201
|
+
const resolvedDir = resolvePluginDir(pluginDir);
|
|
10151
10202
|
const assetRels = /* @__PURE__ */ new Set(
|
|
10152
10203
|
[...manifest.skills, ...manifest.commands, ...manifest.agents]
|
|
10153
10204
|
);
|
|
@@ -15127,7 +15178,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
15127
15178
|
Cost: ${formatCost(cost)}` : "";
|
|
15128
15179
|
let memoryLine = "";
|
|
15129
15180
|
try {
|
|
15130
|
-
const { countPendingMemories } = await import("./persistent-memory-
|
|
15181
|
+
const { countPendingMemories } = await import("./persistent-memory-US6A7WMA.js");
|
|
15131
15182
|
const pending = countPendingMemories(ctx.config.getConfigDir());
|
|
15132
15183
|
if (pending > 0) memoryLine = `
|
|
15133
15184
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -15936,7 +15987,7 @@ async function handleSecurityReview(args, ctx) {
|
|
|
15936
15987
|
async function handleTest(args, ctx) {
|
|
15937
15988
|
ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
15938
15989
|
try {
|
|
15939
|
-
const { executeTests } = await import("./run-tests-
|
|
15990
|
+
const { executeTests } = await import("./run-tests-4FSTZ22Q.js");
|
|
15940
15991
|
const argStr = args.join(" ").trim();
|
|
15941
15992
|
let testArgs = {};
|
|
15942
15993
|
if (argStr) {
|
|
@@ -16200,7 +16251,7 @@ async function handleMemory(args, ctx) {
|
|
|
16200
16251
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
16201
16252
|
} else if (sub === "export") {
|
|
16202
16253
|
if (args[1] === "md") {
|
|
16203
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
16254
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-US6A7WMA.js");
|
|
16204
16255
|
ctx.send({
|
|
16205
16256
|
type: "export_data",
|
|
16206
16257
|
format: "md",
|
|
@@ -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-KWM7J4US.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-AXNUGP53.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-5GWGXJQN.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-HUV7TFOH.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-XINRSNNL.js";
|
|
94
94
|
import {
|
|
95
95
|
ProviderRegistry
|
|
96
96
|
} from "./chunk-2QZMITSL.js";
|
|
97
97
|
import {
|
|
98
98
|
ConfigManager
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-7P3EP5OO.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-QW6M662O.js";
|
|
117
117
|
import {
|
|
118
118
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
119
119
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
import {
|
|
147
147
|
fileCheckpoints
|
|
148
148
|
} from "./chunk-4BKXL7SM.js";
|
|
149
|
-
import "./chunk-
|
|
149
|
+
import "./chunk-KTE4BHHI.js";
|
|
150
150
|
import {
|
|
151
151
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
152
152
|
AUTHOR,
|
|
@@ -165,7 +165,7 @@ import {
|
|
|
165
165
|
SKILLS_DIR_NAME,
|
|
166
166
|
VERSION,
|
|
167
167
|
buildUserIdentityPrompt
|
|
168
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-EEFHKKT2.js";
|
|
169
169
|
import {
|
|
170
170
|
buildChatIndex,
|
|
171
171
|
clearChatIndex,
|
|
@@ -758,9 +758,9 @@ function formatSessionDate(date) {
|
|
|
758
758
|
const hm = `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
759
759
|
const abs = `${ymd} ${hm}`;
|
|
760
760
|
const now = /* @__PURE__ */ new Date();
|
|
761
|
-
const
|
|
762
|
-
const diffDays = Math.
|
|
763
|
-
if (diffDays
|
|
761
|
+
const startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
|
|
762
|
+
const diffDays = Math.round((startOfDay(now) - startOfDay(date)) / (1e3 * 60 * 60 * 24));
|
|
763
|
+
if (diffDays <= 0) return `${abs} (today)`;
|
|
764
764
|
if (diffDays === 1) return `${abs} (yesterday)`;
|
|
765
765
|
if (diffDays < 7) return `${abs} (${diffDays} days ago)`;
|
|
766
766
|
return abs;
|
|
@@ -1387,7 +1387,7 @@ No tools match "${filter}".
|
|
|
1387
1387
|
const { join: join6 } = await import("path");
|
|
1388
1388
|
const { existsSync: existsSync5 } = await import("fs");
|
|
1389
1389
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
|
|
1390
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1390
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-R57JYUHW.js");
|
|
1391
1391
|
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
1392
1392
|
const cwd = process.cwd();
|
|
1393
1393
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2366,7 +2366,7 @@ function createReviewCommands() {
|
|
|
2366
2366
|
usage: "/test [command|filter]",
|
|
2367
2367
|
async execute(args, ctx) {
|
|
2368
2368
|
try {
|
|
2369
|
-
const { executeTests } = await import("./run-tests-
|
|
2369
|
+
const { executeTests } = await import("./run-tests-IM3GSWBM.js");
|
|
2370
2370
|
const argStr = args.join(" ").trim();
|
|
2371
2371
|
let testArgs = {};
|
|
2372
2372
|
if (argStr) {
|
|
@@ -8013,7 +8013,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
8013
8013
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
8014
8014
|
process.exit(1);
|
|
8015
8015
|
}
|
|
8016
|
-
const { startWebServer } = await import("./server-
|
|
8016
|
+
const { startWebServer } = await import("./server-ULAI723O.js");
|
|
8017
8017
|
await startWebServer({ port, host: options.host });
|
|
8018
8018
|
});
|
|
8019
8019
|
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) => {
|
|
@@ -8180,11 +8180,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
8180
8180
|
console.log(footer + "\n");
|
|
8181
8181
|
});
|
|
8182
8182
|
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) => {
|
|
8183
|
-
const { runUsageCli } = await import("./usage-
|
|
8183
|
+
const { runUsageCli } = await import("./usage-E72O4RHB.js");
|
|
8184
8184
|
await runUsageCli(options);
|
|
8185
8185
|
});
|
|
8186
8186
|
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) => {
|
|
8187
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
8187
|
+
const { runDoctorCli } = await import("./doctor-cli-ODPYWX4T.js");
|
|
8188
8188
|
const argv = process.argv.slice(2);
|
|
8189
8189
|
await runDoctorCli({
|
|
8190
8190
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -8193,7 +8193,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
8193
8193
|
});
|
|
8194
8194
|
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) => {
|
|
8195
8195
|
try {
|
|
8196
|
-
const batch = await import("./batch-
|
|
8196
|
+
const batch = await import("./batch-UCAVB77F.js");
|
|
8197
8197
|
switch (action) {
|
|
8198
8198
|
case "submit":
|
|
8199
8199
|
if (!arg) {
|
|
@@ -8236,7 +8236,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
8236
8236
|
}
|
|
8237
8237
|
});
|
|
8238
8238
|
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) => {
|
|
8239
|
-
const { startMcpServer } = await import("./server-
|
|
8239
|
+
const { startMcpServer } = await import("./server-WZFZEVCQ.js");
|
|
8240
8240
|
await startMcpServer({
|
|
8241
8241
|
allowDestructive: !!options.allowDestructive,
|
|
8242
8242
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -8249,7 +8249,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
8249
8249
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
8250
8250
|
process.exit(1);
|
|
8251
8251
|
}
|
|
8252
|
-
const { runPrCli } = await import("./pr-
|
|
8252
|
+
const { runPrCli } = await import("./pr-6PR2OO5F.js");
|
|
8253
8253
|
const result = await runPrCli({
|
|
8254
8254
|
action,
|
|
8255
8255
|
target,
|
|
@@ -8269,8 +8269,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
8269
8269
|
process.exit(result.exitCode);
|
|
8270
8270
|
});
|
|
8271
8271
|
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) => {
|
|
8272
|
-
const { runCi } = await import("./ci-
|
|
8273
|
-
const { formatCiResult } = await import("./ci-format-
|
|
8272
|
+
const { runCi } = await import("./ci-LOL5I5DP.js");
|
|
8273
|
+
const { formatCiResult } = await import("./ci-format-TT5IZATX.js");
|
|
8274
8274
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
8275
8275
|
if (formats > 1) {
|
|
8276
8276
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -8428,7 +8428,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
8428
8428
|
config.get("customProviders"),
|
|
8429
8429
|
config.getConfigDir()
|
|
8430
8430
|
);
|
|
8431
|
-
const { startHub } = await import("./hub-
|
|
8431
|
+
const { startHub } = await import("./hub-BNUQJOBO.js");
|
|
8432
8432
|
await startHub(
|
|
8433
8433
|
{
|
|
8434
8434
|
topic: topic ?? "",
|
|
@@ -28,9 +28,9 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HUV7TFOH.js";
|
|
32
32
|
import "./chunk-HOSJZMQS.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-EEFHKKT2.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-JWSMRAVK.js";
|
|
31
31
|
import "./chunk-YVTASHS5.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-TQVR2URD.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-EPL77VAA.js";
|
|
6
|
+
import "./chunk-4BOT4YNT.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
} from "./chunk-2QZMITSL.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigManager
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7P3EP5OO.js";
|
|
18
18
|
import "./chunk-O3XSFPYH.js";
|
|
19
19
|
import "./chunk-5ULLIOVC.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EEFHKKT2.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-AXNUGP53.js";
|
|
27
27
|
import {
|
|
28
28
|
computeCost,
|
|
29
29
|
formatCost,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
spawnAgentContext,
|
|
64
64
|
truncateOutput,
|
|
65
65
|
undoStack
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-5GWGXJQN.js";
|
|
67
67
|
import {
|
|
68
68
|
addMemoryEntry,
|
|
69
69
|
clearMemoryEntries,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
parseWritableScope,
|
|
78
78
|
updateMemoryApproval,
|
|
79
79
|
updateMemoryEntry
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-HUV7TFOH.js";
|
|
81
81
|
import "./chunk-GLSR2NR3.js";
|
|
82
82
|
import "./chunk-UUSRWSSX.js";
|
|
83
83
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -90,13 +90,13 @@ import {
|
|
|
90
90
|
buildDoctorReport,
|
|
91
91
|
formatDoctorReport,
|
|
92
92
|
loadContextFiles
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-XINRSNNL.js";
|
|
94
94
|
import {
|
|
95
95
|
ProviderRegistry
|
|
96
96
|
} from "./chunk-2QZMITSL.js";
|
|
97
97
|
import {
|
|
98
98
|
ConfigManager
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-7P3EP5OO.js";
|
|
100
100
|
import {
|
|
101
101
|
describePlugin,
|
|
102
102
|
getActivePluginAssets,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
runTool,
|
|
112
112
|
setPluginEnabled,
|
|
113
113
|
trustPlugin
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-QW6M662O.js";
|
|
115
115
|
import {
|
|
116
116
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
117
117
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -135,7 +135,7 @@ import {
|
|
|
135
135
|
getGitRoot
|
|
136
136
|
} from "./chunk-HOSJZMQS.js";
|
|
137
137
|
import "./chunk-4BKXL7SM.js";
|
|
138
|
-
import "./chunk-
|
|
138
|
+
import "./chunk-KTE4BHHI.js";
|
|
139
139
|
import {
|
|
140
140
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
141
141
|
AUTHOR,
|
|
@@ -151,7 +151,7 @@ import {
|
|
|
151
151
|
SKILLS_DIR_NAME,
|
|
152
152
|
VERSION,
|
|
153
153
|
buildUserIdentityPrompt
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-EEFHKKT2.js";
|
|
155
155
|
import "./chunk-6RPGQ5CG.js";
|
|
156
156
|
import "./chunk-KHYD3WXE.js";
|
|
157
157
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -803,7 +803,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
803
803
|
Cost: ${formatCost(cost)}` : "";
|
|
804
804
|
let memoryLine = "";
|
|
805
805
|
try {
|
|
806
|
-
const { countPendingMemories } = await import("./persistent-memory-
|
|
806
|
+
const { countPendingMemories } = await import("./persistent-memory-ITDGIW3Z.js");
|
|
807
807
|
const pending = countPendingMemories(ctx.config.getConfigDir());
|
|
808
808
|
if (pending > 0) memoryLine = `
|
|
809
809
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -1612,7 +1612,7 @@ async function handleSecurityReview(args, ctx) {
|
|
|
1612
1612
|
async function handleTest(args, ctx) {
|
|
1613
1613
|
ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1614
1614
|
try {
|
|
1615
|
-
const { executeTests } = await import("./run-tests-
|
|
1615
|
+
const { executeTests } = await import("./run-tests-IM3GSWBM.js");
|
|
1616
1616
|
const argStr = args.join(" ").trim();
|
|
1617
1617
|
let testArgs = {};
|
|
1618
1618
|
if (argStr) {
|
|
@@ -1876,7 +1876,7 @@ async function handleMemory(args, ctx) {
|
|
|
1876
1876
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
1877
1877
|
} else if (sub === "export") {
|
|
1878
1878
|
if (args[1] === "md") {
|
|
1879
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
1879
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-ITDGIW3Z.js");
|
|
1880
1880
|
ctx.send({
|
|
1881
1881
|
type: "export_data",
|
|
1882
1882
|
format: "md",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5GWGXJQN.js";
|
|
5
|
+
import "./chunk-HUV7TFOH.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-QW6M662O.js";
|
|
13
13
|
import {
|
|
14
14
|
getDangerLevel,
|
|
15
15
|
schemaToJsonSchema
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
import "./chunk-5ULLIOVC.js";
|
|
18
18
|
import "./chunk-HOSJZMQS.js";
|
|
19
19
|
import "./chunk-4BKXL7SM.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-KTE4BHHI.js";
|
|
21
21
|
import {
|
|
22
22
|
VERSION
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EEFHKKT2.js";
|
|
24
24
|
import "./chunk-6RPGQ5CG.js";
|
|
25
25
|
import "./chunk-KHYD3WXE.js";
|
|
26
26
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-5GWGXJQN.js";
|
|
7
|
+
import "./chunk-HUV7TFOH.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-QW6M662O.js";
|
|
15
15
|
import {
|
|
16
16
|
getDangerLevel,
|
|
17
17
|
runLeanAgentLoop
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
import "./chunk-5ULLIOVC.js";
|
|
20
20
|
import "./chunk-HOSJZMQS.js";
|
|
21
21
|
import "./chunk-4BKXL7SM.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-KTE4BHHI.js";
|
|
23
23
|
import {
|
|
24
24
|
SUBAGENT_ALLOWED_TOOLS
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-EEFHKKT2.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-GUOLPI33.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7P3EP5OO.js";
|
|
12
12
|
import "./chunk-5ULLIOVC.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-EEFHKKT2.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/usage.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jinzd-ai-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.252",
|
|
4
4
|
"description": "Cross-platform REPL-style AI CLI with multi-provider support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "tsup",
|
|
19
19
|
"dev": "tsx src/index.ts",
|
|
20
|
-
"test": "vitest run",
|
|
20
|
+
"test": "vitest run",
|
|
21
21
|
"test:providers": "vitest run --config vitest.providers.config.ts tests/integration/provider-smoke.test.ts",
|
|
22
22
|
"test:watch": "vitest",
|
|
23
23
|
"test:coverage": "vitest run --coverage",
|
|
24
|
-
"lint": "eslint src --max-warnings=0",
|
|
25
|
-
"smoke:dist": "node scripts/smoke-dist.mjs",
|
|
24
|
+
"lint": "eslint src --max-warnings=0",
|
|
25
|
+
"smoke:dist": "node scripts/smoke-dist.mjs",
|
|
26
26
|
"prepublishOnly": "npm run build",
|
|
27
27
|
"patch": "node scripts/patch-sqlite.mjs",
|
|
28
28
|
"pack:win": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-win-x64 --output release/ai-cli-win.exe --compress GZip --options no-deprecation",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"electron:build-linux": "npm run build && electron-builder --linux",
|
|
38
38
|
"electron:build-all": "npm run build && electron-builder --win --mac --linux",
|
|
39
39
|
"release": "node scripts/release.mjs",
|
|
40
|
-
"test:e2e-web": "node scripts/check-playwright-env.mjs && playwright test"
|
|
40
|
+
"test:e2e-web": "node scripts/check-playwright-env.mjs && playwright test"
|
|
41
41
|
},
|
|
42
42
|
"pkg": {
|
|
43
43
|
"scripts": "dist-cjs/index.cjs",
|