ccjk 13.3.5 → 13.3.7

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 (150) hide show
  1. package/dist/chunks/agent-teams.mjs +7 -5
  2. package/dist/chunks/agent.mjs +2 -2
  3. package/dist/chunks/agents.mjs +16 -16
  4. package/dist/chunks/api-cli.mjs +6 -6
  5. package/dist/chunks/api-providers.mjs +1 -1
  6. package/dist/chunks/api.mjs +4 -4
  7. package/dist/chunks/auto-bootstrap.mjs +1 -1
  8. package/dist/chunks/auto-fix.mjs +49 -4
  9. package/dist/chunks/auto-fixer.mjs +7 -5
  10. package/dist/chunks/auto-init.mjs +9 -7208
  11. package/dist/chunks/auto-memory-bridge.mjs +9 -3
  12. package/dist/chunks/auto-updater.mjs +9 -9
  13. package/dist/chunks/auto-upgrade.mjs +5 -3
  14. package/dist/chunks/banner.mjs +4 -3
  15. package/dist/chunks/boost.mjs +118 -62
  16. package/dist/chunks/ccjk-agents.mjs +3 -3
  17. package/dist/chunks/ccjk-all.mjs +7 -7
  18. package/dist/chunks/ccjk-config.mjs +2 -2
  19. package/dist/chunks/ccjk-hooks.mjs +4 -4
  20. package/dist/chunks/ccjk-mcp.mjs +5 -5
  21. package/dist/chunks/ccjk-setup.mjs +5 -5
  22. package/dist/chunks/ccjk-skills.mjs +5 -5
  23. package/dist/chunks/ccr.mjs +18 -16
  24. package/dist/chunks/ccu.mjs +2 -2
  25. package/dist/chunks/check-updates.mjs +8 -8
  26. package/dist/chunks/claude-code-config-manager.mjs +11 -8
  27. package/dist/chunks/claude-code-incremental-manager.mjs +7 -7
  28. package/dist/chunks/claude-config.mjs +1 -1
  29. package/dist/chunks/claude-wrapper.mjs +1 -1
  30. package/dist/chunks/cli-hook.mjs +15 -15
  31. package/dist/chunks/codex-config-switch.mjs +7 -7
  32. package/dist/chunks/codex-provider-manager.mjs +7 -7
  33. package/dist/chunks/codex-uninstaller.mjs +2 -2
  34. package/dist/chunks/codex.mjs +5 -5
  35. package/dist/chunks/commands.mjs +2 -2
  36. package/dist/chunks/commands2.mjs +3 -3
  37. package/dist/chunks/commit.mjs +2 -2
  38. package/dist/chunks/completion.mjs +2 -2
  39. package/dist/chunks/config-consolidator.mjs +2 -2
  40. package/dist/chunks/config-switch.mjs +8 -8
  41. package/dist/chunks/config.mjs +6 -5
  42. package/dist/chunks/config2.mjs +5 -5
  43. package/dist/chunks/config3.mjs +4 -4
  44. package/dist/chunks/constants.mjs +1 -1
  45. package/dist/chunks/context-opt.mjs +92 -90
  46. package/dist/chunks/context.mjs +659 -0
  47. package/dist/chunks/dashboard.mjs +14 -9
  48. package/dist/chunks/doctor.mjs +4 -4
  49. package/dist/chunks/eval.mjs +502 -0
  50. package/dist/chunks/evolution.mjs +46 -39
  51. package/dist/chunks/health-alerts.mjs +9 -9
  52. package/dist/chunks/help.mjs +1 -1
  53. package/dist/chunks/hook-installer.mjs +6 -3
  54. package/dist/chunks/index.mjs +23 -0
  55. package/dist/chunks/index10.mjs +634 -571
  56. package/dist/chunks/index11.mjs +1061 -569
  57. package/dist/chunks/index12.mjs +914 -1076
  58. package/dist/chunks/index13.mjs +136 -951
  59. package/dist/chunks/index14.mjs +209 -185
  60. package/dist/chunks/index2.mjs +19 -24
  61. package/dist/chunks/index3.mjs +19085 -12
  62. package/dist/chunks/index4.mjs +16 -19092
  63. package/dist/chunks/index5.mjs +7602 -16
  64. package/dist/chunks/index6.mjs +159 -7590
  65. package/dist/chunks/index7.mjs +1602 -171
  66. package/dist/chunks/index8.mjs +19 -1602
  67. package/dist/chunks/index9.mjs +612 -15
  68. package/dist/chunks/init.mjs +26 -19
  69. package/dist/chunks/installer.mjs +5 -5
  70. package/dist/chunks/installer2.mjs +2 -2
  71. package/dist/chunks/intent-engine.mjs +1 -1
  72. package/dist/chunks/interview.mjs +4 -4
  73. package/dist/chunks/manager.mjs +1 -1
  74. package/dist/chunks/marketplace.mjs +2 -2
  75. package/dist/chunks/mcp-cli.mjs +12 -12
  76. package/dist/chunks/mcp.mjs +8 -8
  77. package/dist/chunks/memory.mjs +8 -8
  78. package/dist/chunks/menu-hierarchical.mjs +24 -22
  79. package/dist/chunks/menu.mjs +27 -22
  80. package/dist/chunks/metrics-display.mjs +2 -2
  81. package/dist/chunks/migrator.mjs +1 -1
  82. package/dist/chunks/monitor.mjs +2 -2
  83. package/dist/chunks/notification.mjs +6 -6
  84. package/dist/chunks/onboarding-wizard.mjs +6 -5
  85. package/dist/chunks/onboarding.mjs +4 -4
  86. package/dist/chunks/package.mjs +1 -1
  87. package/dist/chunks/paradigm.mjs +2 -2
  88. package/dist/chunks/permission-manager.mjs +2 -2
  89. package/dist/chunks/permissions.mjs +3 -3
  90. package/dist/chunks/persistence-manager.mjs +19 -12
  91. package/dist/chunks/persistence.mjs +5 -3
  92. package/dist/chunks/plugin.mjs +2 -2
  93. package/dist/chunks/prompts.mjs +5 -5
  94. package/dist/chunks/providers.mjs +2 -2
  95. package/dist/chunks/quick-actions.mjs +7 -6
  96. package/dist/chunks/quick-provider.mjs +5 -4
  97. package/dist/chunks/quick-setup.mjs +20 -15
  98. package/dist/chunks/remote.mjs +15 -16
  99. package/dist/chunks/{convoy-manager.mjs → session-manager.mjs} +1129 -1095
  100. package/dist/chunks/session.mjs +2 -2
  101. package/dist/chunks/sessions.mjs +3 -3
  102. package/dist/chunks/silent-updater.mjs +1 -1
  103. package/dist/chunks/simple-config.mjs +2 -2
  104. package/dist/chunks/skill2.mjs +3 -3
  105. package/dist/chunks/skills-sync.mjs +5 -5
  106. package/dist/chunks/skills.mjs +3 -3
  107. package/dist/chunks/slash-commands.mjs +9 -8
  108. package/dist/chunks/smart-defaults.mjs +9 -5
  109. package/dist/chunks/startup.mjs +1 -1
  110. package/dist/chunks/stats.mjs +2 -2
  111. package/dist/chunks/status.mjs +37 -22
  112. package/dist/chunks/team.mjs +3 -3
  113. package/dist/chunks/thinking.mjs +4 -4
  114. package/dist/chunks/trace.mjs +2 -2
  115. package/dist/chunks/uninstall.mjs +9 -9
  116. package/dist/chunks/update.mjs +14 -11
  117. package/dist/chunks/upgrade-manager.mjs +3 -3
  118. package/dist/chunks/upgrade.mjs +25 -9
  119. package/dist/chunks/version-checker.mjs +4 -4
  120. package/dist/chunks/vim.mjs +3 -3
  121. package/dist/chunks/workflows.mjs +1 -1
  122. package/dist/chunks/wsl.mjs +1 -1
  123. package/dist/chunks/zero-config.mjs +4 -4
  124. package/dist/cli.mjs +60 -26
  125. package/dist/index.d.mts +4392 -4392
  126. package/dist/index.d.ts +4392 -4392
  127. package/dist/index.mjs +4314 -4314
  128. package/dist/shared/{ccjk.DcKLglJQ.mjs → ccjk.BIxuVL3_.mjs} +2 -2
  129. package/dist/shared/{ccjk.DJdmgr2d.mjs → ccjk.BJMRY2Ra.mjs} +5 -3
  130. package/dist/shared/{ccjk.B1TwPltj.mjs → ccjk.BOu1yav7.mjs} +3 -2
  131. package/dist/shared/{ccjk.mJpVRDZ8.mjs → ccjk.BWFpnOr3.mjs} +1 -1
  132. package/dist/shared/{ccjk.BfIpomdz.mjs → ccjk.CHUEFqmw.mjs} +3 -2
  133. package/dist/shared/{ccjk.CqdbaXqU.mjs → ccjk.CLUL0pAV.mjs} +9 -5
  134. package/dist/shared/{ccjk.Cot9p9_n.mjs → ccjk.Cjj8SVrn.mjs} +1 -1
  135. package/dist/shared/{ccjk.CfrpIIKy.mjs → ccjk.Crd_nEfj.mjs} +38 -20
  136. package/dist/shared/{ccjk.DCw2WnZU.mjs → ccjk.CvChMYvB.mjs} +1 -1
  137. package/dist/shared/{ccjk.CXzjn01x.mjs → ccjk.D8ZLYSZZ.mjs} +1 -1
  138. package/dist/shared/{ccjk.BrPUmTqm.mjs → ccjk.DJuyfrlL.mjs} +164 -82
  139. package/dist/shared/{ccjk.DHXfsrwn.mjs → ccjk.DRfdq6yl.mjs} +4 -4
  140. package/dist/shared/{ccjk.DXRAZcix.mjs → ccjk.DScm_NnL.mjs} +8 -4
  141. package/dist/shared/{ccjk.XsJWJuQP.mjs → ccjk.DfZKjHvG.mjs} +6 -128
  142. package/dist/shared/{ccjk.BFxsJM0k.mjs → ccjk.DwSebGy0.mjs} +4 -3
  143. package/dist/shared/ccjk.DxWqH-EF.mjs +170 -0
  144. package/dist/shared/{ccjk.Cwa_FiTX.mjs → ccjk.I6IuYdc_.mjs} +2 -2
  145. package/dist/shared/{ccjk.DpstNaeR.mjs → ccjk.KpFl2RDA.mjs} +3 -3
  146. package/dist/shared/{ccjk.dYDLfmph.mjs → ccjk._dESH4Rk.mjs} +1 -1
  147. package/dist/shared/{ccjk.BxSmJ8B7.mjs → ccjk.wLJHO0Af.mjs} +2 -1
  148. package/package.json +65 -67
  149. package/dist/chunks/index15.mjs +0 -218
  150. package/dist/shared/{ccjk.c-ETfBZ_.mjs → ccjk.eIn-g1yI.mjs} +96 -96
@@ -1,6 +1,6 @@
1
1
  import process__default from 'node:process';
2
- import a from '../chunks/index3.mjs';
3
- import { ensureI18nInitialized, i18n } from '../chunks/index6.mjs';
2
+ import a from '../chunks/index2.mjs';
3
+ import { ensureI18nInitialized, i18n } from '../chunks/index5.mjs';
4
4
 
5
5
  function handleExitPromptError(error) {
6
6
  const isExitError = error instanceof Error && (error.name === "ExitPromptError" || error.message?.includes("ExitPromptError") || error.message?.includes("User force closed the prompt"));
@@ -1,4 +1,4 @@
1
- import a from '../chunks/index3.mjs';
1
+ import a from '../chunks/index2.mjs';
2
2
 
3
3
  class Logger {
4
4
  level;
@@ -13,7 +13,8 @@ class Logger {
13
13
  constructor(options = {}) {
14
14
  this.level = options.level || "info";
15
15
  this.mode = options.mode || "text";
16
- if (options.silent) this.mode = "silent";
16
+ if (options.silent)
17
+ this.mode = "silent";
17
18
  }
18
19
  shouldLog(level) {
19
20
  return this.mode !== "silent" && this.levels[level] >= this.levels[this.level];
@@ -27,7 +28,8 @@ class Logger {
27
28
  };
28
29
  }
29
30
  output(entry) {
30
- if (!this.shouldLog(entry.level)) return;
31
+ if (!this.shouldLog(entry.level))
32
+ return;
31
33
  if (this.mode === "json") {
32
34
  console.log(JSON.stringify(entry));
33
35
  return;
@@ -1,4 +1,4 @@
1
- import { l as logger } from './ccjk.DJdmgr2d.mjs';
1
+ import { l as logger } from './ccjk.BJMRY2Ra.mjs';
2
2
 
3
3
  class HookRegistry {
4
4
  hooks = /* @__PURE__ */ new Map();
@@ -17,7 +17,8 @@ class HookRegistry {
17
17
  */
18
18
  unregister(event, hookName) {
19
19
  const hooks = this.hooks.get(event);
20
- if (!hooks) return;
20
+ if (!hooks)
21
+ return;
21
22
  const filtered = hooks.filter((h) => h.name !== hookName);
22
23
  this.hooks.set(event, filtered);
23
24
  logger.debug(`Unregistered hook "${hookName}" for event "${event}"`);
@@ -1,7 +1,7 @@
1
1
  import { g as getDefaultExportFromCjs } from './ccjk.BAGoDD49.mjs';
2
2
  import require$$0 from 'node:async_hooks';
3
3
  import { r as requireCliSpinners } from './ccjk.DeWpAShp.mjs';
4
- import { r as requireCliWidth, a as requireWrapAnsi, b as requireStripAnsi } from '../chunks/index4.mjs';
4
+ import { r as requireCliWidth, a as requireWrapAnsi, b as requireStripAnsi } from '../chunks/index3.mjs';
5
5
  import readline__default from 'node:readline';
6
6
  import require$$0$1 from 'stream';
7
7
  import process__default from 'node:process';
@@ -1,4 +1,4 @@
1
- import a from '../chunks/index3.mjs';
1
+ import a from '../chunks/index2.mjs';
2
2
 
3
3
  class ExecutionTracer {
4
4
  traces = /* @__PURE__ */ new Map();
@@ -26,7 +26,8 @@ class ExecutionTracer {
26
26
  */
27
27
  endSession(sessionId) {
28
28
  const sid = sessionId || this.currentSessionId;
29
- if (!sid) return;
29
+ if (!sid)
30
+ return;
30
31
  const trace = this.traces.get(sid);
31
32
  if (trace) {
32
33
  trace.endTime = Date.now();
@@ -1,4 +1,4 @@
1
- import { c as consola, o as ofetch } from './ccjk.DHXfsrwn.mjs';
1
+ import { c as consola, o as ofetch } from './ccjk.DRfdq6yl.mjs';
2
2
  import fs__default, { readFileSync } from 'node:fs';
3
3
  import path__default, { dirname, join } from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
@@ -963,15 +963,19 @@ class CloudClient {
963
963
  * 5. { error: "..." } — bare error
964
964
  */
965
965
  parseResponse(raw) {
966
- if (raw === null || raw === void 0) return raw;
966
+ if (raw === null || raw === void 0)
967
+ return raw;
967
968
  const r = raw;
968
969
  if (r.success === false) {
969
970
  const msg = r.error?.message || r.message || r.error || "Unknown error";
970
971
  throw new CloudClientError("API_ERROR", String(msg));
971
972
  }
972
- if (r.success === true && "data" in r) return r.data;
973
- if (!("success" in r) && "data" in r) return r.data;
974
- if (typeof r.error === "string" && !("data" in r)) throw new CloudClientError("API_ERROR", r.error);
973
+ if (r.success === true && "data" in r)
974
+ return r.data;
975
+ if (!("success" in r) && "data" in r)
976
+ return r.data;
977
+ if (typeof r.error === "string" && !("data" in r))
978
+ throw new CloudClientError("API_ERROR", r.error);
975
979
  return raw;
976
980
  }
977
981
  /**
@@ -1,6 +1,6 @@
1
1
  import { a as detectCodeToolType } from '../chunks/smart-defaults.mjs';
2
2
  import { DEFAULT_CODE_TOOL_TYPE } from '../chunks/constants.mjs';
3
- import { i18n } from '../chunks/index6.mjs';
3
+ import { i18n } from '../chunks/index5.mjs';
4
4
  import { readZcfConfigAsync } from '../chunks/ccjk-config.mjs';
5
5
 
6
6
  const CODE_TYPE_ABBREVIATIONS = {
@@ -1,6 +1,8 @@
1
1
  import { existsSync, readdirSync, statSync, readFileSync } from 'node:fs';
2
2
  import { CLAUDE_AGENTS_DIR, SETTINGS_FILE, CCJK_SKILLS_DIR } from '../chunks/constants.mjs';
3
3
  import { j as join } from './ccjk.bQ7Dh1g4.mjs';
4
+ import os__default from 'node:os';
5
+ import path__default from 'node:path';
4
6
  import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './ccjk.BAGoDD49.mjs';
5
7
  import require$$0$2 from 'fs';
6
8
  import require$$0 from 'constants';
@@ -8,8 +10,6 @@ import require$$0$1 from 'stream';
8
10
  import require$$4 from 'util';
9
11
  import require$$5 from 'assert';
10
12
  import sysPath from 'path';
11
- import os__default from 'node:os';
12
- import path__default from 'node:path';
13
13
  import process__default from 'node:process';
14
14
 
15
15
  const agentsCheck = {
@@ -82,10 +82,14 @@ const claudeMdCheck = {
82
82
  const hasCodeBlocks = (content.match(/```/g) || []).length / 2;
83
83
  const hasBuildCommands = /build|test|lint|dev/i.test(content);
84
84
  let score = 40;
85
- if (lines > 20) score += 15;
86
- if (hasHeaders >= 3) score += 15;
87
- if (hasCodeBlocks >= 1) score += 10;
88
- if (hasBuildCommands) score += 20;
85
+ if (lines > 20)
86
+ score += 15;
87
+ if (hasHeaders >= 3)
88
+ score += 15;
89
+ if (hasCodeBlocks >= 1)
90
+ score += 10;
91
+ if (hasBuildCommands)
92
+ score += 20;
89
93
  score = Math.min(100, score);
90
94
  return {
91
95
  name: this.name,
@@ -3171,8 +3175,10 @@ const INVALID_PERMISSION_NAMES = /* @__PURE__ */ new Set([
3171
3175
  "AllowHttpAccess"
3172
3176
  ]);
3173
3177
  function isValidPermission(perm) {
3174
- if (INVALID_PERMISSION_NAMES.has(perm)) return false;
3175
- if (["mcp__.*", "mcp__*", "mcp__(*)"].includes(perm)) return false;
3178
+ if (INVALID_PERMISSION_NAMES.has(perm))
3179
+ return false;
3180
+ if (["mcp__.*", "mcp__*", "mcp__(*)"].includes(perm))
3181
+ return false;
3176
3182
  return true;
3177
3183
  }
3178
3184
  const permissionsCheck = {
@@ -3285,11 +3291,16 @@ const DEFAULT_CHECKS = [
3285
3291
  memoryCheck
3286
3292
  ];
3287
3293
  function calculateGrade(score) {
3288
- if (score >= 95) return "S";
3289
- if (score >= 80) return "A";
3290
- if (score >= 65) return "B";
3291
- if (score >= 50) return "C";
3292
- if (score >= 30) return "D";
3294
+ if (score >= 95)
3295
+ return "S";
3296
+ if (score >= 80)
3297
+ return "A";
3298
+ if (score >= 65)
3299
+ return "B";
3300
+ if (score >= 50)
3301
+ return "C";
3302
+ if (score >= 30)
3303
+ return "D";
3293
3304
  return "F";
3294
3305
  }
3295
3306
  function generateRecommendations(results) {
@@ -3319,13 +3330,20 @@ function generateRecommendations(results) {
3319
3330
  }
3320
3331
  function mapCategory(name) {
3321
3332
  const lower = name.toLowerCase();
3322
- if (lower.includes("mcp")) return "mcp";
3323
- if (lower.includes("skill")) return "skills";
3324
- if (lower.includes("agent")) return "agents";
3325
- if (lower.includes("model") || lower.includes("api")) return "model";
3326
- if (lower.includes("memory")) return "sync";
3327
- if (lower.includes("sync")) return "sync";
3328
- if (lower.includes("perm")) return "permissions";
3333
+ if (lower.includes("mcp"))
3334
+ return "mcp";
3335
+ if (lower.includes("skill"))
3336
+ return "skills";
3337
+ if (lower.includes("agent"))
3338
+ return "agents";
3339
+ if (lower.includes("model") || lower.includes("api"))
3340
+ return "model";
3341
+ if (lower.includes("memory"))
3342
+ return "sync";
3343
+ if (lower.includes("sync"))
3344
+ return "sync";
3345
+ if (lower.includes("perm"))
3346
+ return "permissions";
3329
3347
  return "general";
3330
3348
  }
3331
3349
  async function runHealthCheck(checks) {
@@ -87,7 +87,7 @@ async function platformSpecificImplementation() {
87
87
  }
88
88
 
89
89
  case 'linux': {
90
- const {isWsl} = await import('../chunks/index15.mjs');
90
+ const {isWsl} = await import('../chunks/index14.mjs');
91
91
  if (isWsl) {
92
92
  return import('../chunks/wsl.mjs');
93
93
  }
@@ -1,4 +1,4 @@
1
- import { i18n } from '../chunks/index6.mjs';
1
+ import { i18n } from '../chunks/index5.mjs';
2
2
 
3
3
  var CloudErrorCode = /* @__PURE__ */ ((CloudErrorCode2) => {
4
4
  CloudErrorCode2["AUTH_ERROR"] = "AUTH_ERROR";
@@ -28,7 +28,8 @@ function scanProject(cwd) {
28
28
  }
29
29
  function readPackageJson(root) {
30
30
  const p = join(root, "package.json");
31
- if (!existsSync(p)) return null;
31
+ if (!existsSync(p))
32
+ return null;
32
33
  try {
33
34
  return JSON.parse(readFileSync(p, "utf-8"));
34
35
  } catch {
@@ -36,7 +37,8 @@ function readPackageJson(root) {
36
37
  }
37
38
  }
38
39
  function hasDep(pkg, name) {
39
- if (!pkg) return false;
40
+ if (!pkg)
41
+ return false;
40
42
  return !!(pkg.dependencies?.[name] || pkg.devDependencies?.[name] || pkg.peerDependencies?.[name]);
41
43
  }
42
44
  function detectLanguage(root, pkg) {
@@ -82,7 +84,8 @@ function detectSecondaryLanguages(root, pkg, primary) {
82
84
  ["rust", () => existsSync(join(root, "Cargo.toml"))]
83
85
  ];
84
86
  for (const [lang, check] of checks) {
85
- if (lang !== primary && check()) langs.push(lang);
87
+ if (lang !== primary && check())
88
+ langs.push(lang);
86
89
  }
87
90
  return langs;
88
91
  }
@@ -90,114 +93,181 @@ function detectFramework(root, pkg) {
90
93
  if (!pkg) {
91
94
  if (existsSync(join(root, "pyproject.toml"))) {
92
95
  const content = safeRead(join(root, "pyproject.toml"));
93
- if (content.includes("fastapi")) return "fastapi";
94
- if (content.includes("django")) return "django";
95
- if (content.includes("flask")) return "flask";
96
+ if (content.includes("fastapi"))
97
+ return "fastapi";
98
+ if (content.includes("django"))
99
+ return "django";
100
+ if (content.includes("flask"))
101
+ return "flask";
96
102
  }
97
103
  if (existsSync(join(root, "requirements.txt"))) {
98
104
  const content = safeRead(join(root, "requirements.txt"));
99
- if (content.includes("fastapi")) return "fastapi";
100
- if (content.includes("django")) return "django";
101
- if (content.includes("flask")) return "flask";
105
+ if (content.includes("fastapi"))
106
+ return "fastapi";
107
+ if (content.includes("django"))
108
+ return "django";
109
+ if (content.includes("flask"))
110
+ return "flask";
102
111
  }
103
112
  return "none";
104
113
  }
105
- if (hasDep(pkg, "next")) return "next";
106
- if (hasDep(pkg, "nuxt")) return "nuxt";
107
- if (hasDep(pkg, "@angular/core")) return "angular";
108
- if (hasDep(pkg, "svelte") || hasDep(pkg, "@sveltejs/kit")) return "svelte";
109
- if (hasDep(pkg, "@nestjs/core")) return "nest";
110
- if (hasDep(pkg, "@tauri-apps/api") || hasDep(pkg, "@tauri-apps/cli")) return "tauri";
111
- if (hasDep(pkg, "electron")) return "electron";
112
- if (hasDep(pkg, "vue")) return "vue";
113
- if (hasDep(pkg, "react")) return "react";
114
- if (hasDep(pkg, "fastify")) return "fastify";
115
- if (hasDep(pkg, "express")) return "express";
114
+ if (hasDep(pkg, "next"))
115
+ return "next";
116
+ if (hasDep(pkg, "nuxt"))
117
+ return "nuxt";
118
+ if (hasDep(pkg, "@angular/core"))
119
+ return "angular";
120
+ if (hasDep(pkg, "svelte") || hasDep(pkg, "@sveltejs/kit"))
121
+ return "svelte";
122
+ if (hasDep(pkg, "@nestjs/core"))
123
+ return "nest";
124
+ if (hasDep(pkg, "@tauri-apps/api") || hasDep(pkg, "@tauri-apps/cli"))
125
+ return "tauri";
126
+ if (hasDep(pkg, "electron"))
127
+ return "electron";
128
+ if (hasDep(pkg, "vue"))
129
+ return "vue";
130
+ if (hasDep(pkg, "react"))
131
+ return "react";
132
+ if (hasDep(pkg, "fastify"))
133
+ return "fastify";
134
+ if (hasDep(pkg, "express"))
135
+ return "express";
116
136
  return "none";
117
137
  }
118
138
  function detectTestRunner(root, pkg) {
119
- if (hasDep(pkg, "vitest")) return "vitest";
120
- if (hasDep(pkg, "jest") || hasDep(pkg, "@jest/core")) return "jest";
121
- if (hasDep(pkg, "mocha")) return "mocha";
122
- if (existsSync(join(root, "pytest.ini")) || existsSync(join(root, "conftest.py"))) return "pytest";
139
+ if (hasDep(pkg, "vitest"))
140
+ return "vitest";
141
+ if (hasDep(pkg, "jest") || hasDep(pkg, "@jest/core"))
142
+ return "jest";
143
+ if (hasDep(pkg, "mocha"))
144
+ return "mocha";
145
+ if (existsSync(join(root, "pytest.ini")) || existsSync(join(root, "conftest.py")))
146
+ return "pytest";
123
147
  if (existsSync(join(root, "pyproject.toml"))) {
124
148
  const content = safeRead(join(root, "pyproject.toml"));
125
- if (content.includes("[tool.pytest") || content.includes("pytest")) return "pytest";
149
+ if (content.includes("[tool.pytest") || content.includes("pytest"))
150
+ return "pytest";
126
151
  }
127
- if (existsSync(join(root, "go.mod"))) return "go-test";
128
- if (existsSync(join(root, "Cargo.toml"))) return "cargo-test";
129
- if (existsSync(join(root, "pom.xml")) || existsSync(join(root, "build.gradle"))) return "junit";
152
+ if (existsSync(join(root, "go.mod")))
153
+ return "go-test";
154
+ if (existsSync(join(root, "Cargo.toml")))
155
+ return "cargo-test";
156
+ if (existsSync(join(root, "pom.xml")) || existsSync(join(root, "build.gradle")))
157
+ return "junit";
130
158
  if (existsSync(join(root, "Gemfile"))) {
131
159
  const content = safeRead(join(root, "Gemfile"));
132
- if (content.includes("rspec")) return "rspec";
160
+ if (content.includes("rspec"))
161
+ return "rspec";
133
162
  }
134
- if (hasDep(pkg, "phpunit") || existsSync(join(root, "phpunit.xml"))) return "phpunit";
163
+ if (hasDep(pkg, "phpunit") || existsSync(join(root, "phpunit.xml")))
164
+ return "phpunit";
135
165
  return "none";
136
166
  }
137
167
  function detectPackageManager(root) {
138
- if (existsSync(join(root, "pnpm-lock.yaml")) || existsSync(join(root, "pnpm-workspace.yaml"))) return "pnpm";
139
- if (existsSync(join(root, "bun.lockb")) || existsSync(join(root, "bun.lock"))) return "bun";
140
- if (existsSync(join(root, "yarn.lock"))) return "yarn";
141
- if (existsSync(join(root, "package-lock.json"))) return "npm";
142
- if (existsSync(join(root, "poetry.lock"))) return "poetry";
143
- if (existsSync(join(root, "Pipfile.lock")) || existsSync(join(root, "requirements.txt"))) return "pip";
144
- if (existsSync(join(root, "Cargo.lock"))) return "cargo";
145
- if (existsSync(join(root, "go.sum"))) return "go";
146
- if (existsSync(join(root, "pom.xml"))) return "maven";
147
- if (existsSync(join(root, "build.gradle")) || existsSync(join(root, "build.gradle.kts"))) return "gradle";
168
+ if (existsSync(join(root, "pnpm-lock.yaml")) || existsSync(join(root, "pnpm-workspace.yaml")))
169
+ return "pnpm";
170
+ if (existsSync(join(root, "bun.lockb")) || existsSync(join(root, "bun.lock")))
171
+ return "bun";
172
+ if (existsSync(join(root, "yarn.lock")))
173
+ return "yarn";
174
+ if (existsSync(join(root, "package-lock.json")))
175
+ return "npm";
176
+ if (existsSync(join(root, "poetry.lock")))
177
+ return "poetry";
178
+ if (existsSync(join(root, "Pipfile.lock")) || existsSync(join(root, "requirements.txt")))
179
+ return "pip";
180
+ if (existsSync(join(root, "Cargo.lock")))
181
+ return "cargo";
182
+ if (existsSync(join(root, "go.sum")))
183
+ return "go";
184
+ if (existsSync(join(root, "pom.xml")))
185
+ return "maven";
186
+ if (existsSync(join(root, "build.gradle")) || existsSync(join(root, "build.gradle.kts")))
187
+ return "gradle";
148
188
  return "none";
149
189
  }
150
190
  function detectLinter(root, pkg) {
151
- if (hasDep(pkg, "@biomejs/biome") || existsSync(join(root, "biome.json")) || existsSync(join(root, "biome.jsonc"))) return "biome";
152
- if (hasDep(pkg, "oxlint") || hasDep(pkg, "oxc")) return "oxlint";
153
- if (hasDep(pkg, "eslint") || existsSync(join(root, ".eslintrc.json")) || existsSync(join(root, ".eslintrc.js")) || existsSync(join(root, "eslint.config.js")) || existsSync(join(root, "eslint.config.mjs"))) return "eslint";
154
- if (existsSync(join(root, "ruff.toml")) || existsSync(join(root, ".ruff.toml"))) return "ruff";
191
+ if (hasDep(pkg, "@biomejs/biome") || existsSync(join(root, "biome.json")) || existsSync(join(root, "biome.jsonc")))
192
+ return "biome";
193
+ if (hasDep(pkg, "oxlint") || hasDep(pkg, "oxc"))
194
+ return "oxlint";
195
+ if (hasDep(pkg, "eslint") || existsSync(join(root, ".eslintrc.json")) || existsSync(join(root, ".eslintrc.js")) || existsSync(join(root, "eslint.config.js")) || existsSync(join(root, "eslint.config.mjs")))
196
+ return "eslint";
197
+ if (existsSync(join(root, "ruff.toml")) || existsSync(join(root, ".ruff.toml")))
198
+ return "ruff";
155
199
  if (existsSync(join(root, "pyproject.toml"))) {
156
200
  const content = safeRead(join(root, "pyproject.toml"));
157
- if (content.includes("[tool.ruff")) return "ruff";
158
- if (content.includes("[tool.pylint") || content.includes("pylint")) return "pylint";
159
- if (content.includes("flake8")) return "flake8";
201
+ if (content.includes("[tool.ruff"))
202
+ return "ruff";
203
+ if (content.includes("[tool.pylint") || content.includes("pylint"))
204
+ return "pylint";
205
+ if (content.includes("flake8"))
206
+ return "flake8";
160
207
  }
161
- if (existsSync(join(root, ".golangci.yml")) || existsSync(join(root, ".golangci.yaml"))) return "golangci-lint";
162
- if (existsSync(join(root, "Cargo.toml"))) return "clippy";
163
- if (existsSync(join(root, ".rubocop.yml"))) return "rubocop";
208
+ if (existsSync(join(root, ".golangci.yml")) || existsSync(join(root, ".golangci.yaml")))
209
+ return "golangci-lint";
210
+ if (existsSync(join(root, "Cargo.toml")))
211
+ return "clippy";
212
+ if (existsSync(join(root, ".rubocop.yml")))
213
+ return "rubocop";
164
214
  return "none";
165
215
  }
166
216
  function detectFormatter(root, pkg) {
167
- if (hasDep(pkg, "@biomejs/biome") || existsSync(join(root, "biome.json"))) return "biome";
168
- if (hasDep(pkg, "prettier") || existsSync(join(root, ".prettierrc")) || existsSync(join(root, ".prettierrc.json")) || existsSync(join(root, "prettier.config.js")) || existsSync(join(root, "prettier.config.mjs"))) return "prettier";
217
+ if (hasDep(pkg, "@biomejs/biome") || existsSync(join(root, "biome.json")))
218
+ return "biome";
219
+ if (hasDep(pkg, "prettier") || existsSync(join(root, ".prettierrc")) || existsSync(join(root, ".prettierrc.json")) || existsSync(join(root, "prettier.config.js")) || existsSync(join(root, "prettier.config.mjs")))
220
+ return "prettier";
169
221
  if (existsSync(join(root, "pyproject.toml"))) {
170
222
  const content = safeRead(join(root, "pyproject.toml"));
171
- if (content.includes("[tool.ruff") && content.includes("format")) return "ruff";
172
- if (content.includes("[tool.black") || content.includes("black")) return "black";
223
+ if (content.includes("[tool.ruff") && content.includes("format"))
224
+ return "ruff";
225
+ if (content.includes("[tool.black") || content.includes("black"))
226
+ return "black";
173
227
  }
174
- if (existsSync(join(root, "go.mod"))) return "gofmt";
175
- if (existsSync(join(root, "Cargo.toml"))) return "rustfmt";
228
+ if (existsSync(join(root, "go.mod")))
229
+ return "gofmt";
230
+ if (existsSync(join(root, "Cargo.toml")))
231
+ return "rustfmt";
176
232
  return "none";
177
233
  }
178
234
  function detectDatabase(root) {
179
235
  for (const f of ["docker-compose.yml", "docker-compose.yaml", "compose.yml", "compose.yaml"]) {
180
236
  const content = safeRead(join(root, f));
181
- if (!content) continue;
182
- if (content.includes("postgres")) return "postgresql";
183
- if (content.includes("mysql") || content.includes("mariadb")) return "mysql";
184
- if (content.includes("mongo")) return "mongodb";
185
- if (content.includes("redis")) return "redis";
237
+ if (!content)
238
+ continue;
239
+ if (content.includes("postgres"))
240
+ return "postgresql";
241
+ if (content.includes("mysql") || content.includes("mariadb"))
242
+ return "mysql";
243
+ if (content.includes("mongo"))
244
+ return "mongodb";
245
+ if (content.includes("redis"))
246
+ return "redis";
186
247
  }
187
248
  for (const f of [".env", ".env.local", ".env.development"]) {
188
249
  const content = safeRead(join(root, f));
189
- if (!content) continue;
190
- if (content.includes("postgres")) return "postgresql";
191
- if (content.includes("mysql")) return "mysql";
192
- if (content.includes("mongodb") || content.includes("mongo+srv")) return "mongodb";
193
- if (content.includes("redis://")) return "redis";
250
+ if (!content)
251
+ continue;
252
+ if (content.includes("postgres"))
253
+ return "postgresql";
254
+ if (content.includes("mysql"))
255
+ return "mysql";
256
+ if (content.includes("mongodb") || content.includes("mongo+srv"))
257
+ return "mongodb";
258
+ if (content.includes("redis://"))
259
+ return "redis";
194
260
  }
195
261
  if (existsSync(join(root, "prisma", "schema.prisma"))) {
196
262
  const content = safeRead(join(root, "prisma", "schema.prisma"));
197
- if (content.includes("postgresql")) return "postgresql";
198
- if (content.includes("mysql")) return "mysql";
199
- if (content.includes("sqlite")) return "sqlite";
200
- if (content.includes("mongodb")) return "mongodb";
263
+ if (content.includes("postgresql"))
264
+ return "postgresql";
265
+ if (content.includes("mysql"))
266
+ return "mysql";
267
+ if (content.includes("sqlite"))
268
+ return "sqlite";
269
+ if (content.includes("mongodb"))
270
+ return "mongodb";
201
271
  }
202
272
  for (const f of ["*.db", "*.sqlite", "*.sqlite3"]) {
203
273
  if (existsSync(join(root, "db.sqlite")) || existsSync(join(root, "database.sqlite")) || existsSync(join(root, "dev.db"))) {
@@ -225,19 +295,27 @@ function detectRuntime() {
225
295
  };
226
296
  }
227
297
  function detectMonorepo(root, pkg) {
228
- if (pkg?.workspaces) return true;
229
- if (existsSync(join(root, "pnpm-workspace.yaml"))) return true;
230
- if (existsSync(join(root, "lerna.json"))) return true;
231
- if (existsSync(join(root, "nx.json"))) return true;
232
- if (existsSync(join(root, "turbo.json"))) return true;
298
+ if (pkg?.workspaces)
299
+ return true;
300
+ if (existsSync(join(root, "pnpm-workspace.yaml")))
301
+ return true;
302
+ if (existsSync(join(root, "lerna.json")))
303
+ return true;
304
+ if (existsSync(join(root, "nx.json")))
305
+ return true;
306
+ if (existsSync(join(root, "turbo.json")))
307
+ return true;
233
308
  return false;
234
309
  }
235
310
  function detectConventionalCommits(root, pkg) {
236
- if (existsSync(join(root, ".commitlintrc.json")) || existsSync(join(root, ".commitlintrc.js")) || existsSync(join(root, "commitlint.config.js")) || existsSync(join(root, "commitlint.config.mjs"))) return true;
237
- if (hasDep(pkg, "@commitlint/cli") || hasDep(pkg, "@commitlint/config-conventional")) return true;
311
+ if (existsSync(join(root, ".commitlintrc.json")) || existsSync(join(root, ".commitlintrc.js")) || existsSync(join(root, "commitlint.config.js")) || existsSync(join(root, "commitlint.config.mjs"))) {
312
+ return true;
313
+ }
314
+ if (hasDep(pkg, "@commitlint/cli") || hasDep(pkg, "@commitlint/config-conventional"))
315
+ return true;
238
316
  try {
239
317
  const log = execSync("git log --oneline -10 2>/dev/null", { cwd: root, encoding: "utf-8", timeout: 3e3 });
240
- const conventionalPattern = /^[a-f0-9]+ (feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)(\(.+\))?[!]?:/m;
318
+ const conventionalPattern = /^[a-f0-9]+ (feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)(\(.+\))?!?:/m;
241
319
  const lines = log.trim().split("\n").filter(Boolean);
242
320
  const matches = lines.filter((l) => conventionalPattern.test(l));
243
321
  return lines.length > 0 && matches.length / lines.length > 0.5;
@@ -246,9 +324,12 @@ function detectConventionalCommits(root, pkg) {
246
324
  }
247
325
  }
248
326
  function detectGitHooks(root, pkg) {
249
- if (existsSync(join(root, ".husky"))) return true;
250
- if (hasDep(pkg, "husky") || hasDep(pkg, "simple-git-hooks") || hasDep(pkg, "lefthook")) return true;
251
- if (existsSync(join(root, ".lefthook.yml"))) return true;
327
+ if (existsSync(join(root, ".husky")))
328
+ return true;
329
+ if (hasDep(pkg, "husky") || hasDep(pkg, "simple-git-hooks") || hasDep(pkg, "lefthook"))
330
+ return true;
331
+ if (existsSync(join(root, ".lefthook.yml")))
332
+ return true;
252
333
  return false;
253
334
  }
254
335
  function detectCI(root) {
@@ -256,7 +337,8 @@ function detectCI(root) {
256
337
  }
257
338
  function safeRead(path) {
258
339
  try {
259
- if (!existsSync(path)) return "";
340
+ if (!existsSync(path))
341
+ return "";
260
342
  return readFileSync(path, "utf-8");
261
343
  } catch {
262
344
  return "";
@@ -1,5 +1,5 @@
1
1
  import { promises, existsSync } from 'node:fs';
2
- import posix from '../chunks/index9.mjs';
2
+ import posix from '../chunks/index8.mjs';
3
3
  import { glob } from 'tinyglobby';
4
4
  import { p as parse } from './ccjk.BBtCGd_g.mjs';
5
5
 
@@ -682,7 +682,7 @@ async function analyzePythonDependencies(projectPath, packageManager) {
682
682
  const pyprojectPath = posix.join(projectPath, "pyproject.toml");
683
683
  if (await pathExists$5(pyprojectPath)) {
684
684
  try {
685
- const { parse } = await import('../chunks/index7.mjs');
685
+ const { parse } = await import('../chunks/index6.mjs');
686
686
  const content = await promises.readFile(pyprojectPath, "utf-8");
687
687
  const pyproject = parse(content);
688
688
  const deps = pyproject.tool?.poetry?.dependencies || {};
@@ -715,7 +715,7 @@ async function analyzePythonDependencies(projectPath, packageManager) {
715
715
  const pipfilePath = posix.join(projectPath, "Pipfile");
716
716
  if (await pathExists$5(pipfilePath)) {
717
717
  try {
718
- const { parse } = await import('../chunks/index7.mjs');
718
+ const { parse } = await import('../chunks/index6.mjs');
719
719
  const content = await promises.readFile(pipfilePath, "utf-8");
720
720
  const pipfile = parse(content);
721
721
  const deps = pipfile.packages || {};
@@ -823,7 +823,7 @@ async function analyzeRustDependencies(projectPath) {
823
823
  return { direct: [], all: [] };
824
824
  }
825
825
  try {
826
- const { parse } = await import('../chunks/index7.mjs');
826
+ const { parse } = await import('../chunks/index6.mjs');
827
827
  const content = await promises.readFile(cargoTomlPath, "utf-8");
828
828
  const cargoToml = parse(content);
829
829
  const direct = [];
@@ -24,13 +24,17 @@ function isValidPermission(perm) {
24
24
  }
25
25
  function isCoveredByWildcard(perm, wildcardPerm) {
26
26
  const wildcardMatch = wildcardPerm.match(/^(\w+)\((.+)\)$/);
27
- if (!wildcardMatch) return false;
27
+ if (!wildcardMatch)
28
+ return false;
28
29
  const [, tool, wildcardArg] = wildcardMatch;
29
- if (!wildcardArg.includes("*")) return false;
30
+ if (!wildcardArg.includes("*"))
31
+ return false;
30
32
  const permMatch = perm.match(/^(\w+)\((.+)\)$/);
31
- if (!permMatch) return false;
33
+ if (!permMatch)
34
+ return false;
32
35
  const [, permTool, permArg] = permMatch;
33
- if (tool !== permTool) return false;
36
+ if (tool !== permTool)
37
+ return false;
34
38
  const regexStr = wildcardArg.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".+");
35
39
  return new RegExp(`^${regexStr}$`).test(permArg);
36
40
  }