jinzd-ai-cli 0.4.216 → 0.4.218

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 (31) hide show
  1. package/README.md +6 -3
  2. package/dist/{batch-C6HCXZIG.js → batch-7V7OTMUP.js} +2 -2
  3. package/dist/{chat-index-R2E27VXN.js → chat-index-PS274XM7.js} +1 -1
  4. package/dist/{chunk-TJ6GGN4B.js → chunk-5CA2TJ5F.js} +1 -1
  5. package/dist/{chunk-OLN7VUZA.js → chunk-C2Z42DI5.js} +3 -1
  6. package/dist/{chunk-TCOC4AUI.js → chunk-GX3HSGJX.js} +690 -169
  7. package/dist/{chunk-PNTLA3MN.js → chunk-H2UIHGHH.js} +23 -22
  8. package/dist/{chunk-GY3C3C2Y.js → chunk-L4UREAID.js} +3 -3
  9. package/dist/{chunk-77HDCGTN.js → chunk-MWKE2TNS.js} +1 -1
  10. package/dist/{chunk-7YWS3JLU.js → chunk-NTCB7CMT.js} +3 -1
  11. package/dist/{chunk-6HLKCSB3.js → chunk-OUC75QCF.js} +1 -1
  12. package/dist/{chunk-WAI3WPV2.js → chunk-P4VBLXKS.js} +1 -1
  13. package/dist/{chunk-VW7Y27WW.js → chunk-VGFTM3XT.js} +1 -1
  14. package/dist/{chunk-OQGVGPEK.js → chunk-VHY6NVMQ.js} +2 -0
  15. package/dist/{ci-6ZTFO3LX.js → ci-L6GH2WVC.js} +4 -4
  16. package/dist/{ci-format-CLZ6QJRL.js → ci-format-WW7454AY.js} +2 -2
  17. package/dist/{constants-APSORFOH.js → constants-NCTFSHDU.js} +3 -1
  18. package/dist/{doctor-cli-GUIX4X5F.js → doctor-cli-EWMFBP5Q.js} +4 -4
  19. package/dist/electron-server.js +965 -377
  20. package/dist/{hub-ZGHQWNWE.js → hub-CDL6T7CP.js} +1 -1
  21. package/dist/index.js +259 -97
  22. package/dist/{pr-JOL3IAGV.js → pr-D6PEKEGK.js} +4 -4
  23. package/dist/{run-tests-4PKSIVK5.js → run-tests-NXVVKAK2.js} +1 -1
  24. package/dist/{run-tests-ZRK4TQUN.js → run-tests-SWU2XEV7.js} +2 -2
  25. package/dist/{server-FXUF5P64.js → server-LHYSS6CK.js} +207 -100
  26. package/dist/{server-O3XHT56X.js → server-WUT7VYTD.js} +5 -4
  27. package/dist/{task-orchestrator-TUMDTOAX.js → task-orchestrator-C5AA2BI5.js} +5 -4
  28. package/dist/{usage-X7MJX4YD.js → usage-6ZUUJBI2.js} +2 -2
  29. package/dist/web/client/app.js +53 -2
  30. package/dist/web/client/index.html +11 -1
  31. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-TCOC4AUI.js";
4
+ } from "./chunk-GX3HSGJX.js";
5
5
  import {
6
6
  APP_NAME,
7
7
  CONFIG_DIR_NAME,
@@ -13,7 +13,7 @@ import {
13
13
  MCP_PROTOCOL_VERSION,
14
14
  MCP_TOOL_PREFIX,
15
15
  VERSION
16
- } from "./chunk-7YWS3JLU.js";
16
+ } from "./chunk-NTCB7CMT.js";
17
17
  import {
18
18
  atomicWriteFileSync
19
19
  } from "./chunk-IW3Q7AE5.js";
@@ -760,36 +760,40 @@ var SkillManager = class {
760
760
  this.skillsDir = skillsDir;
761
761
  this.warnThreshold = warnThreshold ?? SKILL_CONTENT_WARN_CHARS_DEFAULT;
762
762
  }
763
- /** 发现并加载 skillsDir 下所有 .md 文件,返回加载数量 */
764
- loadSkills() {
763
+ /** 发现并加载 skillsDir 以及额外插件目录下的技能,返回加载数量 */
764
+ loadSkills(extraDirs = []) {
765
765
  this.skills.clear();
766
- if (!existsSync2(this.skillsDir)) {
767
- try {
768
- mkdirSync(this.skillsDir, { recursive: true });
769
- } catch {
766
+ this.loadSkillDir(this.skillsDir, true);
767
+ for (const dir of extraDirs) this.loadSkillDir(dir, false);
768
+ return this.skills.size;
769
+ }
770
+ loadSkillDir(dir, createIfMissing) {
771
+ if (!existsSync2(dir)) {
772
+ if (createIfMissing) {
773
+ try {
774
+ mkdirSync(dir, { recursive: true });
775
+ } catch {
776
+ }
770
777
  }
771
- return 0;
778
+ return;
772
779
  }
773
780
  let entries;
774
781
  try {
775
- entries = readdirSync(this.skillsDir);
782
+ entries = readdirSync(dir);
776
783
  } catch {
777
- return 0;
784
+ return;
778
785
  }
779
786
  for (const entry of entries) {
780
787
  let filePath;
781
- const fullPath = join2(this.skillsDir, entry);
788
+ const fullPath = join2(dir, entry);
782
789
  if (entry.endsWith(".md")) {
783
790
  filePath = fullPath;
784
791
  } else {
785
792
  try {
786
793
  if (statSync(fullPath).isDirectory()) {
787
794
  const skillMd = join2(fullPath, "SKILL.md");
788
- if (existsSync2(skillMd)) {
789
- filePath = skillMd;
790
- } else {
791
- continue;
792
- }
795
+ if (existsSync2(skillMd)) filePath = skillMd;
796
+ else continue;
793
797
  } else {
794
798
  continue;
795
799
  }
@@ -799,13 +803,10 @@ var SkillManager = class {
799
803
  }
800
804
  const skill = parseSkillFile(filePath);
801
805
  if (skill) {
802
- if (skill.meta.name === "SKILL" && !entry.endsWith(".md")) {
803
- skill.meta.name = entry;
804
- }
805
- this.skills.set(skill.meta.name, skill);
806
+ if (skill.meta.name === "SKILL" && !entry.endsWith(".md")) skill.meta.name = entry;
807
+ if (!this.skills.has(skill.meta.name)) this.skills.set(skill.meta.name, skill);
806
808
  }
807
809
  }
808
- return this.skills.size;
809
810
  }
810
811
  /** 列出所有已加载的技能 */
811
812
  listSkills() {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-TJ6GGN4B.js";
5
+ } from "./chunk-5CA2TJ5F.js";
6
6
  import {
7
7
  buildReviewPrompt,
8
8
  buildSecurityReviewPrompt,
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-QMXC327F.js";
14
14
  import {
15
15
  ConfigManager
16
- } from "./chunk-WAI3WPV2.js";
16
+ } from "./chunk-P4VBLXKS.js";
17
17
  import {
18
18
  VERSION
19
- } from "./chunk-7YWS3JLU.js";
19
+ } from "./chunk-NTCB7CMT.js";
20
20
 
21
21
  // src/cli/ci.ts
22
22
  import { execFileSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CONFIG_DIR_NAME
4
- } from "./chunk-7YWS3JLU.js";
4
+ } from "./chunk-NTCB7CMT.js";
5
5
  import {
6
6
  atomicWriteFileSync
7
7
  } from "./chunk-IW3Q7AE5.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.216";
4
+ var VERSION = "0.4.218";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -12,6 +12,7 @@ var CUSTOM_COMMANDS_DIR_NAME = "commands";
12
12
  var CONTEXT_FILE_CANDIDATES = ["AICLI.override.md", "AGENTS.override.md", "AICLI.md", "CLAUDE.md", "AGENTS.md"];
13
13
  var CONTEXT_FILE_MAX_BYTES = 32 * 1024;
14
14
  var MEMORY_FILE_NAME = "memory.md";
15
+ var MEMORY_STORE_FILE_NAME = "memory.jsonl";
15
16
  var MEMORY_MAX_CHARS = 1e4;
16
17
  var DEV_STATE_FILE_NAME = "dev-state.md";
17
18
  var DEFAULT_MAX_TOKENS = 8192;
@@ -145,6 +146,7 @@ export {
145
146
  CONTEXT_FILE_CANDIDATES,
146
147
  CONTEXT_FILE_MAX_BYTES,
147
148
  MEMORY_FILE_NAME,
149
+ MEMORY_STORE_FILE_NAME,
148
150
  MEMORY_MAX_CHARS,
149
151
  DEV_STATE_FILE_NAME,
150
152
  DEFAULT_MAX_TOKENS,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  VERSION
5
- } from "./chunk-7YWS3JLU.js";
5
+ } from "./chunk-NTCB7CMT.js";
6
6
 
7
7
  // src/diagnostics/crash-log.ts
8
8
  import {
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-7YWS3JLU.js";
11
+ } from "./chunk-NTCB7CMT.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
  TEST_TIMEOUT
4
- } from "./chunk-7YWS3JLU.js";
4
+ } from "./chunk-NTCB7CMT.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -454,6 +454,8 @@ function getChatIndexStatus() {
454
454
  }
455
455
 
456
456
  export {
457
+ DEFAULT_PATTERNS,
458
+ redactString,
457
459
  redactJson,
458
460
  scanString,
459
461
  chunkSession,
@@ -3,14 +3,14 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-GY3C3C2Y.js";
7
- import "./chunk-TJ6GGN4B.js";
6
+ } from "./chunk-L4UREAID.js";
7
+ import "./chunk-5CA2TJ5F.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-QMXC327F.js";
10
10
  import "./chunk-XPBEJB27.js";
11
- import "./chunk-WAI3WPV2.js";
11
+ import "./chunk-P4VBLXKS.js";
12
12
  import "./chunk-TZQHYZKT.js";
13
- import "./chunk-7YWS3JLU.js";
13
+ import "./chunk-NTCB7CMT.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-TJ6GGN4B.js";
10
- import "./chunk-7YWS3JLU.js";
9
+ } from "./chunk-5CA2TJ5F.js";
10
+ import "./chunk-NTCB7CMT.js";
11
11
  export {
12
12
  DEFAULT_CI_THRESHOLDS,
13
13
  detectCiGateSignals,
@@ -26,6 +26,7 @@ import {
26
26
  MCP_TOOL_PREFIX,
27
27
  MEMORY_FILE_NAME,
28
28
  MEMORY_MAX_CHARS,
29
+ MEMORY_STORE_FILE_NAME,
29
30
  PLAN_MODE_READONLY_TOOLS,
30
31
  PLAN_MODE_SYSTEM_ADDON,
31
32
  PLUGINS_DIR_NAME,
@@ -37,7 +38,7 @@ import {
37
38
  TEST_TIMEOUT,
38
39
  VERSION,
39
40
  buildUserIdentityPrompt
40
- } from "./chunk-7YWS3JLU.js";
41
+ } from "./chunk-NTCB7CMT.js";
41
42
  export {
42
43
  AGENTIC_BEHAVIOR_GUIDELINE,
43
44
  APP_NAME,
@@ -65,6 +66,7 @@ export {
65
66
  MCP_TOOL_PREFIX,
66
67
  MEMORY_FILE_NAME,
67
68
  MEMORY_MAX_CHARS,
69
+ MEMORY_STORE_FILE_NAME,
68
70
  PLAN_MODE_READONLY_TOOLS,
69
71
  PLAN_MODE_SYSTEM_ADDON,
70
72
  PLUGINS_DIR_NAME,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getConfigDirUsage,
4
4
  listRecentCrashes
5
- } from "./chunk-6HLKCSB3.js";
5
+ } from "./chunk-OUC75QCF.js";
6
6
  import {
7
7
  ProviderRegistry
8
8
  } from "./chunk-QMXC327F.js";
@@ -11,17 +11,17 @@ import {
11
11
  getTopFailingTools,
12
12
  getTopUsedTools,
13
13
  resetStats
14
- } from "./chunk-77HDCGTN.js";
14
+ } from "./chunk-MWKE2TNS.js";
15
15
  import "./chunk-XPBEJB27.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-WAI3WPV2.js";
18
+ } from "./chunk-P4VBLXKS.js";
19
19
  import "./chunk-TZQHYZKT.js";
20
20
  import {
21
21
  DEV_STATE_FILE_NAME,
22
22
  MEMORY_FILE_NAME,
23
23
  VERSION
24
- } from "./chunk-7YWS3JLU.js";
24
+ } from "./chunk-NTCB7CMT.js";
25
25
  import "./chunk-IW3Q7AE5.js";
26
26
 
27
27
  // src/diagnostics/doctor-cli.ts