jinzd-ai-cli 0.4.251 → 0.4.253

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.
Files changed (33) hide show
  1. package/dist/{batch-S4ZNQSLB.js → batch-TPW2SM6G.js} +2 -2
  2. package/dist/{chunk-WAMQOWD7.js → chunk-2JHYZUQE.js} +1 -1
  3. package/dist/{chunk-TOLUJH7J.js → chunk-ABMMKA5S.js} +1 -1
  4. package/dist/{chunk-KKUQYOJ2.js → chunk-BZNTSGLQ.js} +74 -20
  5. package/dist/{chunk-BPIQVHMP.js → chunk-M2QHKPRA.js} +1 -1
  6. package/dist/{chunk-JNBI6LWS.js → chunk-OWCEONX7.js} +1 -1
  7. package/dist/{chunk-JIFN4ZTW.js → chunk-P5JUXUBS.js} +2 -2
  8. package/dist/{chunk-O3XSFPYH.js → chunk-PSXIVQ3N.js} +14 -6
  9. package/dist/{chunk-TL2OVINO.js → chunk-Q4KBR2SG.js} +1 -1
  10. package/dist/{chunk-7LCBW23G.js → chunk-RPYNPLIE.js} +1 -1
  11. package/dist/{chunk-AU25ALMG.js → chunk-SC6FMQLH.js} +4 -4
  12. package/dist/{chunk-SJTKGZTS.js → chunk-UMW33EEH.js} +1 -1
  13. package/dist/{chunk-PPLGNBAM.js → chunk-USG3ASQ2.js} +1 -1
  14. package/dist/{chunk-BWKVP5MG.js → chunk-YMHARKR6.js} +1 -1
  15. package/dist/{chunk-OOLE7AB4.js → chunk-YWG5KKSL.js} +4 -4
  16. package/dist/{chunk-2QZMITSL.js → chunk-ZRBGH245.js} +5 -4
  17. package/dist/{ci-CBYMGT6N.js → ci-DYTVVEBO.js} +6 -6
  18. package/dist/{ci-format-BL33TQJQ.js → ci-format-QTSA6FJJ.js} +2 -2
  19. package/dist/{constants-OBL6KZZH.js → constants-7KSDW6RF.js} +1 -1
  20. package/dist/{doctor-cli-EPQYJPFE.js → doctor-cli-ZOIMXV4C.js} +6 -6
  21. package/dist/electron-server.js +98 -28
  22. package/dist/{hub-XDXDCDAE.js → hub-6L2UCZAU.js} +1 -1
  23. package/dist/index.js +21 -21
  24. package/dist/{persistent-memory-INKFBSYN.js → persistent-memory-HQKE5X7Z.js} +2 -2
  25. package/dist/{persistent-memory-BYENYJ2N.js → persistent-memory-QOT2TQCT.js} +2 -2
  26. package/dist/{pr-TQSLLQOK.js → pr-HMOXDXWR.js} +6 -6
  27. package/dist/{run-tests-NXCN4BG3.js → run-tests-JVQU3RAN.js} +2 -2
  28. package/dist/{run-tests-GYAYL4QO.js → run-tests-RSYTYFZF.js} +2 -2
  29. package/dist/{server-YAUZBOBR.js → server-O2YQGG72.js} +6 -6
  30. package/dist/{server-GEESDASL.js → server-VOIG5VKM.js} +23 -13
  31. package/dist/{task-orchestrator-XYXSWZ2W.js → task-orchestrator-PLP3INNN.js} +6 -6
  32. package/dist/{usage-MTCEERXQ.js → usage-3EQUVK37.js} +2 -2
  33. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-JNBI6LWS.js";
4
+ } from "./chunk-OWCEONX7.js";
5
5
  import "./chunk-5ULLIOVC.js";
6
- import "./chunk-BPIQVHMP.js";
6
+ import "./chunk-M2QHKPRA.js";
7
7
  import {
8
8
  atomicWriteFileSync
9
9
  } from "./chunk-IW3Q7AE5.js";
@@ -6,7 +6,7 @@ import {
6
6
  MEMORY_FILE_NAME,
7
7
  MEMORY_MAX_CHARS,
8
8
  MEMORY_STORE_FILE_NAME
9
- } from "./chunk-SJTKGZTS.js";
9
+ } from "./chunk-UMW33EEH.js";
10
10
  import {
11
11
  atomicWriteFileSync
12
12
  } from "./chunk-6BUTA5VW.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-BPIQVHMP.js";
4
+ } from "./chunk-M2QHKPRA.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -7,7 +7,7 @@ import {
7
7
  searchPersistentMemories,
8
8
  touchMemoryReferences,
9
9
  updateMemoryEntry
10
- } from "./chunk-PPLGNBAM.js";
10
+ } from "./chunk-USG3ASQ2.js";
11
11
  import {
12
12
  indexProject
13
13
  } from "./chunk-GLSR2NR3.js";
@@ -23,12 +23,13 @@ import {
23
23
  runHook,
24
24
  runLifecycleHooks,
25
25
  runTool
26
- } from "./chunk-TL2OVINO.js";
26
+ } from "./chunk-Q4KBR2SG.js";
27
27
  import {
28
+ buildTruncatedArgumentsError,
28
29
  getDangerLevel,
29
30
  isFileWriteTool,
30
31
  runLeanAgentLoop
31
- } from "./chunk-O3XSFPYH.js";
32
+ } from "./chunk-PSXIVQ3N.js";
32
33
  import {
33
34
  EnvLoader,
34
35
  NetworkError,
@@ -39,14 +40,14 @@ import {
39
40
  } from "./chunk-4BKXL7SM.js";
40
41
  import {
41
42
  runTestsTool
42
- } from "./chunk-TOLUJH7J.js";
43
+ } from "./chunk-ABMMKA5S.js";
43
44
  import {
44
45
  CONFIG_DIR_NAME,
45
46
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
46
47
  SUBAGENT_ALLOWED_TOOLS,
47
48
  SUBAGENT_DEFAULT_MAX_ROUNDS,
48
49
  SUBAGENT_MAX_ROUNDS_LIMIT
49
- } from "./chunk-BPIQVHMP.js";
50
+ } from "./chunk-M2QHKPRA.js";
50
51
  import {
51
52
  loadChatIndex,
52
53
  searchChatMemory
@@ -2273,6 +2274,15 @@ var ToolExecutor = class {
2273
2274
  isError: true
2274
2275
  };
2275
2276
  }
2277
+ if (call.argumentsTruncated) {
2278
+ const message = buildTruncatedArgumentsError(
2279
+ call.name,
2280
+ call.argumentsTruncated,
2281
+ Object.keys(call.arguments)
2282
+ );
2283
+ console.log(theme.warning(` \u26A0 ${call.name}: arguments truncated by output limit \u2014 not executed`));
2284
+ return { callId: call.id, content: message, isError: true };
2285
+ }
2276
2286
  const dangerLevel = getDangerLevel(call.name, call.arguments);
2277
2287
  let toolCallAlreadyPrinted = false;
2278
2288
  runHook(this.hookConfig?.preToolExecution, {
@@ -2883,6 +2893,30 @@ var subAgentGuard = {
2883
2893
  active: false
2884
2894
  };
2885
2895
 
2896
+ // src/tools/arg-aliases.ts
2897
+ function pickArg(args, canonical, aliases) {
2898
+ if (args[canonical] !== void 0 && args[canonical] !== null) return args[canonical];
2899
+ for (const alias of aliases) {
2900
+ if (args[alias] !== void 0 && args[alias] !== null) return args[alias];
2901
+ }
2902
+ return void 0;
2903
+ }
2904
+ var OLD_STR_ALIASES = ["old_string", "oldStr", "oldString", "old_text", "search"];
2905
+ var NEW_STR_ALIASES = ["new_string", "newStr", "newString", "new_text", "replace"];
2906
+ var CONTENT_ALIASES = ["file_text", "text", "contents", "data"];
2907
+ var INSERT_LINE_ALIASES = ["insert_line", "line", "after_line"];
2908
+ var INSERT_CONTENT_ALIASES = ["content", "new_str", "text"];
2909
+ function normalizeReplaceArgs(raw) {
2910
+ const oldStr = pickArg(raw, "old_str", OLD_STR_ALIASES);
2911
+ if (oldStr === void 0) return void 0;
2912
+ return { old_str: oldStr, new_str: pickArg(raw, "new_str", NEW_STR_ALIASES) };
2913
+ }
2914
+ function describeReceivedKeys(args) {
2915
+ const keys = Object.keys(args).filter((k) => args[k] !== void 0);
2916
+ if (keys.length === 0) return " (no arguments received)";
2917
+ return ` Received keys: ${keys.join(", ")}.`;
2918
+ }
2919
+
2886
2920
  // src/tools/builtin/write-file.ts
2887
2921
  var writeFileTool = {
2888
2922
  definition: {
@@ -2921,7 +2955,8 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
2921
2955
  },
2922
2956
  async execute(args) {
2923
2957
  const filePath = String(args["path"] ?? args["file"] ?? "");
2924
- const content = String(args["content"] ?? "");
2958
+ const contentArg = pickArg(args, "content", CONTENT_ALIASES);
2959
+ const content = String(contentArg ?? "");
2925
2960
  const encoding = args["encoding"] ?? "utf-8";
2926
2961
  const appendMode = String(args["append"] ?? "false").toLowerCase() === "true";
2927
2962
  if (!filePath) throw new ToolError("write_file", "path is required");
@@ -2938,9 +2973,10 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
2938
2973
  if (appendMode) {
2939
2974
  appendFileSync(filePath, content, encoding);
2940
2975
  } else {
2941
- atomicWriteFileSync(filePath, content);
2976
+ atomicWriteFileSync(filePath, encoding === "utf-8" || encoding === "utf8" ? content : Buffer.from(content, encoding));
2942
2977
  }
2943
2978
  const lines = content.split("\n").length;
2979
+ const bytes = Buffer.byteLength(content, encoding);
2944
2980
  const mode = appendMode ? "appended" : "written";
2945
2981
  void (async () => {
2946
2982
  try {
@@ -2949,7 +2985,7 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
2949
2985
  } catch {
2950
2986
  }
2951
2987
  })();
2952
- return `File ${mode}: ${filePath} (${lines} lines, ${content.length} bytes)`;
2988
+ return `File ${mode}: ${filePath} (${lines} lines, ${bytes} bytes)`;
2953
2989
  }
2954
2990
  };
2955
2991
 
@@ -3215,15 +3251,22 @@ function parseEditsArg(raw) {
3215
3251
  throw new ToolError("edit_file", `edits[${i}] must be an object`);
3216
3252
  }
3217
3253
  const rec = e;
3218
- if (typeof rec.old_str !== "string") {
3254
+ const normalized = normalizeReplaceArgs(rec);
3255
+ if (normalized === void 0) {
3256
+ throw new ToolError(
3257
+ "edit_file",
3258
+ `edits[${i}].old_str is missing.${describeReceivedKeys(rec)}`
3259
+ );
3260
+ }
3261
+ if (typeof normalized.old_str !== "string") {
3219
3262
  throw new ToolError("edit_file", `edits[${i}].old_str must be a string`);
3220
3263
  }
3221
- if (rec.new_str !== void 0 && typeof rec.new_str !== "string") {
3264
+ if (normalized.new_str !== void 0 && typeof normalized.new_str !== "string") {
3222
3265
  throw new ToolError("edit_file", `edits[${i}].new_str must be a string`);
3223
3266
  }
3224
3267
  return {
3225
- old_str: rec.old_str,
3226
- new_str: String(rec.new_str ?? ""),
3268
+ old_str: normalized.old_str,
3269
+ new_str: String(normalized.new_str ?? ""),
3227
3270
  ignore_whitespace: Boolean(rec.ignore_whitespace),
3228
3271
  replace_all: Boolean(rec.replace_all)
3229
3272
  };
@@ -3407,9 +3450,10 @@ Note: Path can be absolute or relative to cwd.`,
3407
3450
  }
3408
3451
  return lines.join("\n");
3409
3452
  }
3410
- if (args["old_str"] !== void 0) {
3411
- const oldStr = String(args["old_str"]);
3412
- const newStr = String(args["new_str"] ?? "");
3453
+ const replaceArgs = normalizeReplaceArgs(args);
3454
+ if (replaceArgs !== void 0) {
3455
+ const oldStr = String(replaceArgs.old_str);
3456
+ const newStr = String(replaceArgs.new_str ?? "");
3413
3457
  const ignoreWs = Boolean(args["ignore_whitespace"]);
3414
3458
  const replaceAll = Boolean(args["replace_all"]);
3415
3459
  if (oldStr === "") throw new ToolError("edit_file", "old_str cannot be empty");
@@ -3439,10 +3483,14 @@ Please read the file first and use exact text.`;
3439
3483
  Old: ${truncatePreview(oldStr)}
3440
3484
  New: ${truncatePreview(newStr)}`;
3441
3485
  }
3442
- if (args["insert_after_line"] !== void 0) {
3443
- const afterLine = Number(args["insert_after_line"]);
3444
- const content = String(args["insert_content"] ?? "");
3486
+ const insertLineArg = pickArg(args, "insert_after_line", INSERT_LINE_ALIASES);
3487
+ if (insertLineArg !== void 0) {
3488
+ const afterLine = Number(insertLineArg);
3489
+ const content = String(pickArg(args, "insert_content", INSERT_CONTENT_ALIASES) ?? "");
3445
3490
  const lines = original.split("\n");
3491
+ if (!Number.isFinite(afterLine)) {
3492
+ throw new ToolError("edit_file", `insert_after_line must be a number, got ${JSON.stringify(insertLineArg)}`);
3493
+ }
3446
3494
  if (afterLine < 0 || afterLine > lines.length) {
3447
3495
  throw new ToolError("edit_file", `insert_after_line ${afterLine} is out of range (file has ${lines.length} lines)`);
3448
3496
  }
@@ -3456,6 +3504,12 @@ Please read the file first and use exact text.`;
3456
3504
  const fromLine = Number(args["delete_from_line"]);
3457
3505
  const toLine = Number(args["delete_to_line"] ?? args["delete_from_line"]);
3458
3506
  const lines = original.split("\n");
3507
+ if (!Number.isFinite(fromLine) || !Number.isFinite(toLine)) {
3508
+ throw new ToolError(
3509
+ "edit_file",
3510
+ `delete_from_line/delete_to_line must be numbers, got ${JSON.stringify(args["delete_from_line"])}/${JSON.stringify(args["delete_to_line"])}`
3511
+ );
3512
+ }
3459
3513
  if (fromLine < 1 || toLine < fromLine || toLine > lines.length) {
3460
3514
  throw new ToolError(
3461
3515
  "edit_file",
@@ -3470,7 +3524,7 @@ Please read the file first and use exact text.`;
3470
3524
  }
3471
3525
  throw new ToolError(
3472
3526
  "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>."
3527
+ "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
3528
  );
3475
3529
  }
3476
3530
  };
@@ -4767,7 +4821,7 @@ Any of these triggers means use save_last_response, NOT write_file:
4767
4821
  mkdirSync2(dirname4(filePath), { recursive: true });
4768
4822
  atomicWriteFileSync(filePath, content);
4769
4823
  const lines = content.split("\n").length;
4770
- return `File saved: ${filePath} (${lines} lines, ${content.length} bytes)`;
4824
+ return `File saved: ${filePath} (${lines} lines, ${Buffer.byteLength(content, "utf-8")} bytes)`;
4771
4825
  }
4772
4826
  };
4773
4827
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.251";
4
+ var VERSION = "0.4.253";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-BPIQVHMP.js";
11
+ } from "./chunk-M2QHKPRA.js";
12
12
  import {
13
13
  atomicWriteFileSync
14
14
  } from "./chunk-IW3Q7AE5.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-KKUQYOJ2.js";
4
+ } from "./chunk-BZNTSGLQ.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-BPIQVHMP.js";
14
+ } from "./chunk-M2QHKPRA.js";
15
15
  import {
16
16
  atomicWriteFileSync
17
17
  } from "./chunk-IW3Q7AE5.js";
@@ -687,10 +687,10 @@ var ThinkTagFilter = class {
687
687
  return "";
688
688
  }
689
689
  };
690
- function repairToolCallArguments(raw, onWarn) {
690
+ function parseToolCallArguments(raw, onWarn) {
691
691
  const argStr = raw || "{}";
692
692
  try {
693
- return JSON.parse(argStr);
693
+ return { args: JSON.parse(argStr), status: "ok" };
694
694
  } catch {
695
695
  const truncated = argStr.trimEnd();
696
696
  const lastComma = truncated.lastIndexOf(",");
@@ -698,13 +698,18 @@ function repairToolCallArguments(raw, onWarn) {
698
698
  try {
699
699
  const repaired = JSON.parse(fixed);
700
700
  onWarn?.("Tool call JSON was truncated and auto-repaired. Some parameters may be missing.");
701
- return repaired;
701
+ return { args: repaired, status: "repaired" };
702
702
  } catch {
703
703
  onWarn?.("Tool call JSON could not be parsed, using empty arguments.");
704
- return {};
704
+ return { args: {}, status: "failed" };
705
705
  }
706
706
  }
707
707
  }
708
+ function buildTruncatedArgumentsError(toolName, status, parsedKeys) {
709
+ const lost = status === "failed" ? "The arguments JSON was cut off and could not be parsed at all." : `The arguments JSON was cut off mid-way; only these keys survived: ${parsedKeys.join(", ") || "(none)"}. Any remaining value is incomplete.`;
710
+ const longContentHint = toolName === "write_file" || toolName === "edit_file" ? " For long documents (300+ lines / 3 KB+), do NOT retry write_file \u2014 use `save_last_response`, which streams the document straight to disk without an argument size limit." : "";
711
+ return `[${toolName}] NOT EXECUTED \u2014 the model output hit its length limit while emitting this tool call, so the arguments were truncated. ${lost} Nothing was written or changed. Retry with a smaller payload: split the work into several calls, or shorten the arguments.${longContentHint}`;
712
+ }
708
713
  async function consumeToolCallStream(stream, hooks = {}) {
709
714
  const textParts = [];
710
715
  const accumulators = /* @__PURE__ */ new Map();
@@ -777,10 +782,12 @@ async function consumeToolCallStream(stream, hooks = {}) {
777
782
  }
778
783
  const toolCalls = [];
779
784
  for (const [, acc] of accumulators) {
785
+ const parsed = parseToolCallArguments(acc.arguments, hooks.onWarn);
780
786
  toolCalls.push({
781
787
  id: acc.id,
782
788
  name: acc.name,
783
- arguments: repairToolCallArguments(acc.arguments, hooks.onWarn)
789
+ arguments: parsed.args,
790
+ ...parsed.status === "ok" ? {} : { argumentsTruncated: parsed.status }
784
791
  });
785
792
  }
786
793
  if (toolCalls.length > 0) {
@@ -1150,7 +1157,8 @@ export {
1150
1157
  buildDeferredSaveInstruction,
1151
1158
  teeStreamErrorSummary,
1152
1159
  ThinkTagFilter,
1153
- repairToolCallArguments,
1160
+ parseToolCallArguments,
1161
+ buildTruncatedArgumentsError,
1154
1162
  consumeToolCallStream,
1155
1163
  accumulateUsage,
1156
1164
  buildRoundBudgetHint,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  PLUGINS_DIR_NAME
5
- } from "./chunk-BPIQVHMP.js";
5
+ } from "./chunk-M2QHKPRA.js";
6
6
  import {
7
7
  atomicWriteFileSync
8
8
  } from "./chunk-IW3Q7AE5.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TEST_TIMEOUT
3
- } from "./chunk-SJTKGZTS.js";
3
+ } from "./chunk-UMW33EEH.js";
4
4
 
5
5
  // src/tools/builtin/run-tests.ts
6
6
  import { execSync, spawnSync } from "child_process";
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ProviderRegistry
4
- } from "./chunk-2QZMITSL.js";
4
+ } from "./chunk-ZRBGH245.js";
5
5
  import {
6
6
  ConfigManager
7
- } from "./chunk-JNBI6LWS.js";
7
+ } from "./chunk-OWCEONX7.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-TL2OVINO.js";
17
+ } from "./chunk-Q4KBR2SG.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-BPIQVHMP.js";
29
+ } from "./chunk-M2QHKPRA.js";
30
30
 
31
31
  // src/diagnostics/doctor-report.ts
32
32
  import { existsSync as existsSync3, statSync as statSync2 } from "fs";
@@ -1,5 +1,5 @@
1
1
  // src/core/constants.ts
2
- var VERSION = "0.4.251";
2
+ var VERSION = "0.4.253";
3
3
  var APP_NAME = "ai-cli";
4
4
  var CONFIG_DIR_NAME = ".aicli";
5
5
  var CONFIG_FILE_NAME = "config.json";
@@ -6,7 +6,7 @@ import {
6
6
  MEMORY_FILE_NAME,
7
7
  MEMORY_MAX_CHARS,
8
8
  MEMORY_STORE_FILE_NAME
9
- } from "./chunk-BPIQVHMP.js";
9
+ } from "./chunk-M2QHKPRA.js";
10
10
  import {
11
11
  DEFAULT_PATTERNS,
12
12
  redactString
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-BPIQVHMP.js";
4
+ } from "./chunk-M2QHKPRA.js";
5
5
 
6
6
  // src/cli/ci-format.ts
7
7
  var DEFAULT_CI_THRESHOLDS = {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-BWKVP5MG.js";
5
+ } from "./chunk-YMHARKR6.js";
6
6
  import {
7
7
  buildReviewPrompt,
8
8
  buildSecurityReviewPrompt,
@@ -10,13 +10,13 @@ import {
10
10
  } from "./chunk-HLWUDRBO.js";
11
11
  import {
12
12
  ProviderRegistry
13
- } from "./chunk-2QZMITSL.js";
13
+ } from "./chunk-ZRBGH245.js";
14
14
  import {
15
15
  ConfigManager
16
- } from "./chunk-JNBI6LWS.js";
16
+ } from "./chunk-OWCEONX7.js";
17
17
  import {
18
18
  VERSION
19
- } from "./chunk-BPIQVHMP.js";
19
+ } from "./chunk-M2QHKPRA.js";
20
20
 
21
21
  // src/cli/ci.ts
22
22
  import { execFileSync } from "child_process";
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  detectsHallucinatedFileOp,
4
- repairToolCallArguments,
4
+ parseToolCallArguments,
5
5
  schemaToJsonSchema
6
- } from "./chunk-O3XSFPYH.js";
6
+ } from "./chunk-PSXIVQ3N.js";
7
7
  import {
8
8
  AuthError,
9
9
  ProviderError,
@@ -1168,7 +1168,7 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1168
1168
  const reasoningContent = message.reasoning_content;
1169
1169
  if (message.tool_calls && message.tool_calls.length > 0) {
1170
1170
  const toolCalls = message.tool_calls.map((tc) => {
1171
- const parsedArgs = repairToolCallArguments(
1171
+ const parsed = parseToolCallArguments(
1172
1172
  tc.function.arguments || "{}",
1173
1173
  (m) => process.stderr.write(`[warn] ${m}
1174
1174
  `)
@@ -1176,7 +1176,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1176
1176
  return {
1177
1177
  id: tc.id,
1178
1178
  name: tc.function.name,
1179
- arguments: parsedArgs
1179
+ arguments: parsed.args,
1180
+ ...parsed.status === "ok" ? {} : { argumentsTruncated: parsed.status }
1180
1181
  };
1181
1182
  });
1182
1183
  return { toolCalls, usage, reasoningContent };
@@ -3,14 +3,14 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-OOLE7AB4.js";
7
- import "./chunk-BWKVP5MG.js";
6
+ } from "./chunk-YWG5KKSL.js";
7
+ import "./chunk-YMHARKR6.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
- import "./chunk-2QZMITSL.js";
10
- import "./chunk-JNBI6LWS.js";
11
- import "./chunk-O3XSFPYH.js";
9
+ import "./chunk-ZRBGH245.js";
10
+ import "./chunk-OWCEONX7.js";
11
+ import "./chunk-PSXIVQ3N.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-BPIQVHMP.js";
13
+ import "./chunk-M2QHKPRA.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
15
  export {
16
16
  CI_COMMENT_MARKER,
@@ -6,8 +6,8 @@ import {
6
6
  formatCiResult,
7
7
  formatCiSarif,
8
8
  normalizeCiThresholds
9
- } from "./chunk-BWKVP5MG.js";
10
- import "./chunk-BPIQVHMP.js";
9
+ } from "./chunk-YMHARKR6.js";
10
+ import "./chunk-M2QHKPRA.js";
11
11
  export {
12
12
  DEFAULT_CI_THRESHOLDS,
13
13
  detectCiGateSignals,
@@ -38,7 +38,7 @@ import {
38
38
  TEST_TIMEOUT,
39
39
  VERSION,
40
40
  buildUserIdentityPrompt
41
- } from "./chunk-BPIQVHMP.js";
41
+ } from "./chunk-M2QHKPRA.js";
42
42
  export {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  APP_NAME,
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  formatDoctorReport,
4
4
  runDoctorCli
5
- } from "./chunk-AU25ALMG.js";
6
- import "./chunk-2QZMITSL.js";
7
- import "./chunk-JNBI6LWS.js";
8
- import "./chunk-TL2OVINO.js";
9
- import "./chunk-O3XSFPYH.js";
5
+ } from "./chunk-SC6FMQLH.js";
6
+ import "./chunk-ZRBGH245.js";
7
+ import "./chunk-OWCEONX7.js";
8
+ import "./chunk-Q4KBR2SG.js";
9
+ import "./chunk-PSXIVQ3N.js";
10
10
  import "./chunk-5ULLIOVC.js";
11
11
  import "./chunk-HOSJZMQS.js";
12
- import "./chunk-BPIQVHMP.js";
12
+ import "./chunk-M2QHKPRA.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
14
  export {
15
15
  formatDoctorReport,