jinzd-ai-cli 0.4.284 → 0.4.286

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 (43) hide show
  1. package/README.md +3 -3
  2. package/README.zh-CN.md +3 -3
  3. package/dist/{batch-DA7VA35X.js → batch-GY3I53DE.js} +13 -10
  4. package/dist/{chat-index-TDU3S2MG.js → chat-index-DGUOUUQW.js} +2 -2
  5. package/dist/{chunk-VFVN5CWA.js → chunk-2YDLBM3Z.js} +1 -1
  6. package/dist/{chunk-OZKTHQWA.js → chunk-3ZQZO5F7.js} +3 -3
  7. package/dist/chunk-53V3RQY5.js +5684 -0
  8. package/dist/{chunk-C4CIIIDT.js → chunk-6SCELZG6.js} +3 -3
  9. package/dist/{chunk-XSBGCZOP.js → chunk-7G7RZHJI.js} +1 -1
  10. package/dist/{chunk-I4FJGILK.js → chunk-BRLLV3FX.js} +10 -10
  11. package/dist/chunk-CGLYJRFA.js +95 -0
  12. package/dist/{chunk-FZ4THGUP.js → chunk-D7HYLMCC.js} +18 -110
  13. package/dist/{chunk-BXG44VIQ.js → chunk-EYUCJBGS.js} +30 -30
  14. package/dist/{chunk-3DRSBZQ7.js → chunk-GIJL4EFA.js} +10 -2
  15. package/dist/{chunk-QKGKWCXE.js → chunk-L4FDTQ42.js} +1 -1
  16. package/dist/{chunk-DPTEC6AQ.js → chunk-LWPWBRAC.js} +12 -10
  17. package/dist/chunk-RS7SKYTS.js +45 -0
  18. package/dist/{chunk-PWLQU43X.js → chunk-S7ABWTDV.js} +1 -1
  19. package/dist/{chunk-RV2YOTEQ.js → chunk-THUXZNJL.js} +1 -1
  20. package/dist/{chunk-PPPSK4MA.js → chunk-UKITSNSH.js} +1 -1
  21. package/dist/{ci-HG2TPYVY.js → ci-JBUIVM7P.js} +4 -4
  22. package/dist/{ci-format-UB7K63UZ.js → ci-format-B4AHV5SI.js} +2 -2
  23. package/dist/{constants-3DDHA3LT.js → constants-5FYUQLKN.js} +1 -1
  24. package/dist/constants-P75MLFV7.js +80 -0
  25. package/dist/{doctor-cli-ISFDY7LZ.js → doctor-cli-VLFE46PX.js} +5 -4
  26. package/dist/electron-server.js +3654 -310
  27. package/dist/git-context-VNCA2GU7.js +10 -0
  28. package/dist/{hub-MP2CNDMZ.js → hub-CNORVRYW.js} +1 -1
  29. package/dist/index.js +304 -3589
  30. package/dist/{persistent-memory-AMDRRB5E.js → persistent-memory-3KL4N27E.js} +3 -2
  31. package/dist/{persistent-memory-J2OVPLWI.js → persistent-memory-LVX2OT4L.js} +2 -2
  32. package/dist/{pr-BREZ3DJX.js → pr-2YUV4KII.js} +4 -4
  33. package/dist/{run-tests-XHLV74GU.js → run-tests-ERD6X534.js} +2 -2
  34. package/dist/{run-tests-DPO23PKA.js → run-tests-KZ2IUZHK.js} +2 -2
  35. package/dist/{semantic-FF6DDJI6.js → semantic-VPNKXKKK.js} +2 -2
  36. package/dist/{server-KK7DIV3J.js → server-7VSLW446.js} +6 -5
  37. package/dist/{server-W2VIUKTQ.js → server-A3OX52UC.js} +78 -76
  38. package/dist/{task-orchestrator-YM5IMIKL.js → task-orchestrator-XAMKOFUE.js} +6 -5
  39. package/dist/{usage-TXPZY7EB.js → usage-ZXNYCAZB.js} +4 -3
  40. package/package.json +1 -1
  41. package/dist/chunk-Z23JYUOL.js +0 -2296
  42. package/dist/{chunk-AEAYUKSY.js → chunk-7XU4BATV.js} +3 -3
  43. package/dist/{chunk-YOVHMQEJ.js → chunk-I4GQRMFV.js} +3 -3
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/core/json-state.ts
4
+ import { existsSync, readFileSync, renameSync } from "fs";
5
+ function quarantinePath(filePath, now) {
6
+ const stamp = now.toISOString().replace(/[:.]/g, "-");
7
+ let candidate = `${filePath}.corrupt.${stamp}`;
8
+ let n = 1;
9
+ while (existsSync(candidate)) candidate = `${filePath}.corrupt.${stamp}-${n++}`;
10
+ return candidate;
11
+ }
12
+ function loadJsonState(filePath, opts) {
13
+ const warn = opts.warn ?? ((m) => console.error(m));
14
+ const now = opts.now ?? (() => /* @__PURE__ */ new Date());
15
+ if (!existsSync(filePath)) return { value: opts.fallback() };
16
+ let raw;
17
+ let reason;
18
+ try {
19
+ raw = JSON.parse(readFileSync(filePath, "utf-8"));
20
+ const parsed = opts.parse(raw);
21
+ if (parsed !== null) return { value: parsed };
22
+ reason = "unrecognized structure or version";
23
+ } catch (err) {
24
+ reason = err instanceof Error ? err.message : String(err);
25
+ }
26
+ let quarantinedTo;
27
+ try {
28
+ quarantinedTo = quarantinePath(filePath, now());
29
+ renameSync(filePath, quarantinedTo);
30
+ } catch (err) {
31
+ quarantinedTo = void 0;
32
+ warn(
33
+ `\u26A0 ${opts.label} file at ${filePath} is unreadable (${reason}), and it could not be moved aside (${err instanceof Error ? err.message : String(err)}). Starting empty \u2014 the next save will overwrite it.`
34
+ );
35
+ return { value: opts.fallback() };
36
+ }
37
+ warn(
38
+ `\u26A0 ${opts.label} file was unreadable (${reason}). The original was kept at ${quarantinedTo}; starting with an empty ${opts.label}.`
39
+ );
40
+ return { value: opts.fallback(), quarantinedTo };
41
+ }
42
+
43
+ export {
44
+ loadJsonState
45
+ };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-RV2YOTEQ.js";
4
+ } from "./chunk-THUXZNJL.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.284";
4
+ var VERSION = "0.4.286";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -13,7 +13,7 @@ import {
13
13
  MEMORY_FILE_NAME,
14
14
  MEMORY_MAX_CHARS,
15
15
  MEMORY_STORE_FILE_NAME
16
- } from "./chunk-RV2YOTEQ.js";
16
+ } from "./chunk-THUXZNJL.js";
17
17
 
18
18
  // src/memory/persistent-memory.ts
19
19
  import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
@@ -3,16 +3,16 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-OZKTHQWA.js";
7
- import "./chunk-VFVN5CWA.js";
6
+ } from "./chunk-3ZQZO5F7.js";
7
+ import "./chunk-2YDLBM3Z.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-6YZEZFX5.js";
10
10
  import "./chunk-UGY5SVNX.js";
11
- import "./chunk-XSBGCZOP.js";
11
+ import "./chunk-7G7RZHJI.js";
12
12
  import "./chunk-TEXT4DAT.js";
13
13
  import "./chunk-TU3L3PW7.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
- import "./chunk-RV2YOTEQ.js";
15
+ import "./chunk-THUXZNJL.js";
16
16
  export {
17
17
  CI_COMMENT_MARKER,
18
18
  countSeverity,
@@ -6,8 +6,8 @@ import {
6
6
  formatCiResult,
7
7
  formatCiSarif,
8
8
  normalizeCiThresholds
9
- } from "./chunk-VFVN5CWA.js";
10
- import "./chunk-RV2YOTEQ.js";
9
+ } from "./chunk-2YDLBM3Z.js";
10
+ import "./chunk-THUXZNJL.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-RV2YOTEQ.js";
41
+ } from "./chunk-THUXZNJL.js";
42
42
  export {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  APP_NAME,
@@ -0,0 +1,80 @@
1
+ import {
2
+ AGENTIC_BEHAVIOR_GUIDELINE,
3
+ APP_NAME,
4
+ AUTHOR,
5
+ AUTHOR_EMAIL,
6
+ CONFIG_DIR_NAME,
7
+ CONFIG_FILE_NAME,
8
+ CONTEXT_FILE_CANDIDATES,
9
+ CONTEXT_FILE_MAX_BYTES,
10
+ CONTEXT_PRESSURE_THRESHOLD,
11
+ CONTEXT_WARNING_THRESHOLD,
12
+ CUSTOM_COMMANDS_DIR_NAME,
13
+ DEFAULT_MAX_TOKENS,
14
+ DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
15
+ DEFAULT_MAX_TOOL_ROUNDS,
16
+ DEFAULT_TEMPERATURE,
17
+ DESCRIPTION,
18
+ DEV_STATE_FILE_NAME,
19
+ HISTORY_DIR_NAME,
20
+ MAX_HISTORY_DAYS,
21
+ MCP_CALL_TIMEOUT,
22
+ MCP_CONNECT_TIMEOUT,
23
+ MCP_PROJECT_CONFIG_NAME,
24
+ MCP_PROTOCOL_VERSION,
25
+ MCP_TOOL_PREFIX,
26
+ MEMORY_FILE_NAME,
27
+ MEMORY_MAX_CHARS,
28
+ MEMORY_STORE_FILE_NAME,
29
+ PLAN_MODE_READONLY_TOOLS,
30
+ PLAN_MODE_SYSTEM_ADDON,
31
+ PLUGINS_DIR_NAME,
32
+ REPO_URL,
33
+ SKILLS_DIR_NAME,
34
+ SUBAGENT_ALLOWED_TOOLS,
35
+ SUBAGENT_DEFAULT_MAX_ROUNDS,
36
+ SUBAGENT_MAX_ROUNDS_LIMIT,
37
+ TEST_TIMEOUT,
38
+ VERSION,
39
+ buildUserIdentityPrompt
40
+ } from "./chunk-GIJL4EFA.js";
41
+ export {
42
+ AGENTIC_BEHAVIOR_GUIDELINE,
43
+ APP_NAME,
44
+ AUTHOR,
45
+ AUTHOR_EMAIL,
46
+ CONFIG_DIR_NAME,
47
+ CONFIG_FILE_NAME,
48
+ CONTEXT_FILE_CANDIDATES,
49
+ CONTEXT_FILE_MAX_BYTES,
50
+ CONTEXT_PRESSURE_THRESHOLD,
51
+ CONTEXT_WARNING_THRESHOLD,
52
+ CUSTOM_COMMANDS_DIR_NAME,
53
+ DEFAULT_MAX_TOKENS,
54
+ DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
55
+ DEFAULT_MAX_TOOL_ROUNDS,
56
+ DEFAULT_TEMPERATURE,
57
+ DESCRIPTION,
58
+ DEV_STATE_FILE_NAME,
59
+ HISTORY_DIR_NAME,
60
+ MAX_HISTORY_DAYS,
61
+ MCP_CALL_TIMEOUT,
62
+ MCP_CONNECT_TIMEOUT,
63
+ MCP_PROJECT_CONFIG_NAME,
64
+ MCP_PROTOCOL_VERSION,
65
+ MCP_TOOL_PREFIX,
66
+ MEMORY_FILE_NAME,
67
+ MEMORY_MAX_CHARS,
68
+ MEMORY_STORE_FILE_NAME,
69
+ PLAN_MODE_READONLY_TOOLS,
70
+ PLAN_MODE_SYSTEM_ADDON,
71
+ PLUGINS_DIR_NAME,
72
+ REPO_URL,
73
+ SKILLS_DIR_NAME,
74
+ SUBAGENT_ALLOWED_TOOLS,
75
+ SUBAGENT_DEFAULT_MAX_ROUNDS,
76
+ SUBAGENT_MAX_ROUNDS_LIMIT,
77
+ TEST_TIMEOUT,
78
+ VERSION,
79
+ buildUserIdentityPrompt
80
+ };
@@ -2,15 +2,16 @@
2
2
  import {
3
3
  formatDoctorReport,
4
4
  runDoctorCli
5
- } from "./chunk-C4CIIIDT.js";
6
- import "./chunk-BXG44VIQ.js";
5
+ } from "./chunk-6SCELZG6.js";
6
+ import "./chunk-EYUCJBGS.js";
7
+ import "./chunk-RS7SKYTS.js";
7
8
  import "./chunk-UGY5SVNX.js";
8
- import "./chunk-XSBGCZOP.js";
9
+ import "./chunk-7G7RZHJI.js";
9
10
  import "./chunk-TEXT4DAT.js";
10
11
  import "./chunk-TU3L3PW7.js";
11
12
  import "./chunk-HOSJZMQS.js";
12
13
  import "./chunk-IW3Q7AE5.js";
13
- import "./chunk-RV2YOTEQ.js";
14
+ import "./chunk-THUXZNJL.js";
14
15
  export {
15
16
  formatDoctorReport,
16
17
  runDoctorCli