jinzd-ai-cli 0.4.217 → 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 (27) hide show
  1. package/README.md +4 -2
  2. package/dist/{batch-YCOVKTXD.js → batch-7V7OTMUP.js} +2 -2
  3. package/dist/{chunk-WZ3VKLF3.js → chunk-5CA2TJ5F.js} +1 -1
  4. package/dist/{chunk-QAYOI57M.js → chunk-C2Z42DI5.js} +1 -1
  5. package/dist/{chunk-MGBMNCHG.js → chunk-GX3HSGJX.js} +452 -156
  6. package/dist/{chunk-OUAZOE5U.js → chunk-H2UIHGHH.js} +23 -22
  7. package/dist/{chunk-KOPUCJXM.js → chunk-L4UREAID.js} +3 -3
  8. package/dist/{chunk-SNJAOXFT.js → chunk-MWKE2TNS.js} +1 -1
  9. package/dist/{chunk-XJGEQIYS.js → chunk-NTCB7CMT.js} +1 -1
  10. package/dist/{chunk-524WZOKS.js → chunk-OUC75QCF.js} +1 -1
  11. package/dist/{chunk-WKOQ5CYC.js → chunk-P4VBLXKS.js} +1 -1
  12. package/dist/{chunk-VTH7BLXK.js → chunk-VGFTM3XT.js} +1 -1
  13. package/dist/{ci-52RZIYWB.js → ci-L6GH2WVC.js} +4 -4
  14. package/dist/{ci-format-73UXKE65.js → ci-format-WW7454AY.js} +2 -2
  15. package/dist/{constants-DIXAD35W.js → constants-NCTFSHDU.js} +1 -1
  16. package/dist/{doctor-cli-7GOQPULZ.js → doctor-cli-EWMFBP5Q.js} +4 -4
  17. package/dist/electron-server.js +575 -231
  18. package/dist/{hub-GIGBITZN.js → hub-CDL6T7CP.js} +1 -1
  19. package/dist/index.js +148 -46
  20. package/dist/{pr-KPQ5RPKB.js → pr-D6PEKEGK.js} +4 -4
  21. package/dist/{run-tests-K7QR5QN4.js → run-tests-NXVVKAK2.js} +1 -1
  22. package/dist/{run-tests-ZDSA3QES.js → run-tests-SWU2XEV7.js} +2 -2
  23. package/dist/{server-QT3SC2KI.js → server-LHYSS6CK.js} +85 -21
  24. package/dist/{server-22YF3U34.js → server-WUT7VYTD.js} +4 -4
  25. package/dist/{task-orchestrator-BHQQCVTY.js → task-orchestrator-C5AA2BI5.js} +4 -4
  26. package/dist/{usage-WZZFSFLM.js → usage-6ZUUJBI2.js} +2 -2
  27. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-MGBMNCHG.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-XJGEQIYS.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-WZ3VKLF3.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-WKOQ5CYC.js";
16
+ } from "./chunk-P4VBLXKS.js";
17
17
  import {
18
18
  VERSION
19
- } from "./chunk-XJGEQIYS.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-XJGEQIYS.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.217";
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";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  VERSION
5
- } from "./chunk-XJGEQIYS.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-XJGEQIYS.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-XJGEQIYS.js";
4
+ } from "./chunk-NTCB7CMT.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -3,14 +3,14 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-KOPUCJXM.js";
7
- import "./chunk-WZ3VKLF3.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-WKOQ5CYC.js";
11
+ import "./chunk-P4VBLXKS.js";
12
12
  import "./chunk-TZQHYZKT.js";
13
- import "./chunk-XJGEQIYS.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-WZ3VKLF3.js";
10
- import "./chunk-XJGEQIYS.js";
9
+ } from "./chunk-5CA2TJ5F.js";
10
+ import "./chunk-NTCB7CMT.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-XJGEQIYS.js";
41
+ } from "./chunk-NTCB7CMT.js";
42
42
  export {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  APP_NAME,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getConfigDirUsage,
4
4
  listRecentCrashes
5
- } from "./chunk-524WZOKS.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-SNJAOXFT.js";
14
+ } from "./chunk-MWKE2TNS.js";
15
15
  import "./chunk-XPBEJB27.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-WKOQ5CYC.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-XJGEQIYS.js";
24
+ } from "./chunk-NTCB7CMT.js";
25
25
  import "./chunk-IW3Q7AE5.js";
26
26
 
27
27
  // src/diagnostics/doctor-cli.ts