ccjk 14.1.11 → 14.2.1
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.
- package/dist/chunks/api-cli.mjs +3 -2
- package/dist/chunks/api-config-selector.mjs +8 -6
- package/dist/chunks/auto-updater.mjs +1 -1
- package/dist/chunks/ccjk-agents.mjs +2 -2
- package/dist/chunks/ccjk-all.mjs +6 -6
- package/dist/chunks/ccjk-hooks.mjs +2 -2
- package/dist/chunks/ccjk-mcp.mjs +5 -5
- package/dist/chunks/ccjk-setup.mjs +4 -4
- package/dist/chunks/ccjk-skills.mjs +2 -2
- package/dist/chunks/ccr.mjs +11 -9
- package/dist/chunks/check-updates.mjs +2 -1
- package/dist/chunks/claude-code-incremental-manager.mjs +8 -6
- package/dist/chunks/claude-config.mjs +594 -62
- package/dist/chunks/claude-config2.mjs +62 -0
- package/dist/chunks/clavue-config.mjs +1390 -0
- package/dist/chunks/code-type-resolver.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +1 -0
- package/dist/chunks/codex-provider-manager.mjs +2 -1
- package/dist/chunks/codex.mjs +4 -3
- package/dist/chunks/config-switch.mjs +6 -4
- package/dist/chunks/config.mjs +23 -1974
- package/dist/chunks/config2.mjs +8 -7
- package/dist/chunks/config3.mjs +1 -0
- package/dist/chunks/doctor.mjs +178 -8
- package/dist/chunks/features.mjs +9 -7
- package/dist/chunks/index10.mjs +14 -5365
- package/dist/chunks/index9.mjs +5379 -14
- package/dist/chunks/init.mjs +12 -10
- package/dist/chunks/installer.mjs +7 -5
- package/dist/chunks/interview.mjs +1 -1
- package/dist/chunks/mcp-cli.mjs +23 -22
- package/dist/chunks/mcp.mjs +8 -7
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/platform.mjs +1 -1
- package/dist/chunks/quick-provider.mjs +7 -5
- package/dist/chunks/quick-setup.mjs +7 -5
- package/dist/chunks/simple-config.mjs +3 -2
- package/dist/chunks/slash-commands.mjs +1 -1
- package/dist/chunks/thinking.mjs +1 -1
- package/dist/chunks/uninstall.mjs +1 -1
- package/dist/chunks/update.mjs +10 -9
- package/dist/chunks/version-checker.mjs +1 -1
- package/dist/chunks/zero-config.mjs +4 -3
- package/dist/cli.mjs +3 -3
- package/dist/index.mjs +7 -6
- package/dist/shared/{ccjk.DGllfVCZ.mjs → ccjk.BtrioX1Z.mjs} +1 -1
- package/dist/shared/{ccjk.DOw7Fawt.mjs → ccjk.C1Be3aJN.mjs} +2 -2
- package/dist/shared/{ccjk.BCzOWT1L.mjs → ccjk.C94P8gCY.mjs} +2 -2
- package/dist/shared/{ccjk.Cgv_cFVX.mjs → ccjk.CTr4yCZ1.mjs} +2 -2
- package/dist/shared/{ccjk.Cv13QsGp.mjs → ccjk.CoCHVXl3.mjs} +1 -1
- package/dist/shared/{ccjk.f3TBLJSt.mjs → ccjk.CwGZSTAK.mjs} +7 -7
- package/dist/shared/{ccjk.CfKJnpbB.mjs → ccjk.D-magaEx.mjs} +2 -2
- package/dist/shared/{ccjk.CbWVbtb9.mjs → ccjk.DhJ1kyDR.mjs} +1 -1
- package/dist/shared/{ccjk.zFGcZT7Y.mjs → ccjk.OJKHVSOb.mjs} +1 -1
- package/dist/templates/agents/README.md +78 -0
- package/dist/templates/common/error-prevention.md +267 -0
- package/dist/templates/common/karpathy-baseline.md +83 -0
- package/dist/templates/common/output-styles/zh-CN/carmack-mode.md +381 -0
- package/dist/templates/common/output-styles/zh-CN/dhh-mode.md +265 -0
- package/dist/templates/common/output-styles/zh-CN/evan-you-mode.md +539 -0
- package/dist/templates/common/output-styles/zh-CN/jobs-mode.md +369 -0
- package/dist/templates/common/output-styles/zh-CN/linus-mode.md +135 -0
- package/dist/templates/common/output-styles/zh-CN/uncle-bob-mode.md +221 -0
- package/dist/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +628 -0
- package/dist/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +628 -0
- package/dist/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +187 -0
- package/dist/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +191 -0
- package/dist/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +249 -0
- package/dist/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +277 -0
- package/dist/templates/common/workflow/essential/en/agents/get-current-datetime.md +29 -0
- package/dist/templates/common/workflow/essential/en/agents/init-architect.md +115 -0
- package/dist/templates/common/workflow/essential/en/agents/ui-ux-designer.md +91 -0
- package/dist/templates/common/workflow/essential/en/feat.md +92 -0
- package/dist/templates/common/workflow/essential/en/goal.md +147 -0
- package/dist/templates/common/workflow/essential/en/init-project.md +53 -0
- package/dist/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +29 -0
- package/dist/templates/common/workflow/essential/zh-CN/agents/init-architect.md +115 -0
- package/dist/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +91 -0
- package/dist/templates/common/workflow/essential/zh-CN/feat.md +315 -0
- package/dist/templates/common/workflow/essential/zh-CN/goal.md +146 -0
- package/dist/templates/common/workflow/essential/zh-CN/init-project.md +53 -0
- package/dist/templates/common/workflow/git/en/git-cleanBranches.md +102 -0
- package/dist/templates/common/workflow/git/en/git-commit.md +205 -0
- package/dist/templates/common/workflow/git/en/git-rollback.md +90 -0
- package/dist/templates/common/workflow/git/en/git-worktree.md +276 -0
- package/dist/templates/common/workflow/git/zh-CN/git-cleanBranches.md +102 -0
- package/dist/templates/common/workflow/git/zh-CN/git-commit.md +205 -0
- package/dist/templates/common/workflow/git/zh-CN/git-rollback.md +90 -0
- package/dist/templates/common/workflow/git/zh-CN/git-worktree.md +276 -0
- package/dist/templates/common/workflow/interview/en/interview.md +67 -0
- package/dist/templates/common/workflow/interview/zh-CN/interview.md +67 -0
- package/dist/templates/common/workflow/linearMethod/en/linear-method.md +651 -0
- package/dist/templates/common/workflow/linearMethod/zh-CN/linear-method.md +752 -0
- package/dist/templates/common/workflow/refactoringMaster/en/refactoring-master.md +516 -0
- package/dist/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +812 -0
- package/dist/templates/common/workflow/sixStep/en/workflow.md +83 -0
- package/dist/templates/common/workflow/sixStep/zh-CN/workflow.md +359 -0
- package/dist/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +364 -0
- package/dist/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +366 -0
- package/dist/templates/hooks/README.md +212 -0
- package/dist/templates/hooks/git-workflow-hooks.md +551 -0
- package/dist/templates/hooks/post-test-coverage.md +434 -0
- package/dist/templates/hooks/pre-commit-black.md +274 -0
- package/dist/templates/hooks/pre-commit-eslint.md +153 -0
- package/dist/templates/hooks/pre-commit-gofmt.md +284 -0
- package/dist/templates/hooks/pre-commit-prettier.md +212 -0
- package/dist/templates/hooks/pre-commit-type-check.md +377 -0
- package/dist/templates/skills/ccjk-init.md +154 -0
- package/dist/templates/skills/ccjk-mcp-setup.md +205 -0
- package/dist/templates/skills/ccjk-troubleshoot.md +228 -0
- package/dist/templates/skills/django-patterns.md +1016 -0
- package/dist/templates/skills/git-workflow.md +748 -0
- package/dist/templates/skills/go-idioms.md +963 -0
- package/dist/templates/skills/nextjs-optimization.md +694 -0
- package/dist/templates/skills/python-pep8.md +852 -0
- package/dist/templates/skills/react-patterns.md +686 -0
- package/dist/templates/skills/rust-patterns.md +1057 -0
- package/dist/templates/skills/security-best-practices.md +1413 -0
- package/dist/templates/skills/testing-best-practices.md +1315 -0
- package/dist/templates/skills/ts-best-practices.md +354 -0
- package/package.json +1 -1
- package/templates/common/karpathy-baseline.md +83 -0
- package/templates/common/output-styles/zh-CN/carmack-mode.md +14 -0
- package/templates/common/output-styles/zh-CN/dhh-mode.md +14 -0
- package/templates/common/output-styles/zh-CN/evan-you-mode.md +14 -0
- package/templates/common/output-styles/zh-CN/jobs-mode.md +14 -0
- package/templates/common/output-styles/zh-CN/linus-mode.md +14 -0
- package/templates/common/output-styles/zh-CN/uncle-bob-mode.md +14 -0
- package/templates/common/workflow/linearMethod/zh-CN/linear-method.md +2 -0
- package/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +2 -0
- package/templates/common/workflow/sixStep/zh-CN/workflow.md +2 -0
- package/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +2 -0
package/dist/chunks/config2.mjs
CHANGED
|
@@ -7,8 +7,9 @@ import a from './index5.mjs';
|
|
|
7
7
|
import { d as dayjs } from '../shared/ccjk.RyizuzOI.mjs';
|
|
8
8
|
import { i as inquirer } from './index6.mjs';
|
|
9
9
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
10
|
-
import {
|
|
10
|
+
import { h as setPrimaryApiKey, i as addCompletedOnboarding } from './claude-config.mjs';
|
|
11
11
|
import { r as resolveClaudeFamilySettingsTarget, n as normalizeClaudeFamilySettings } from '../shared/ccjk.DDL-4C-k.mjs';
|
|
12
|
+
import { h as clearLegacyTopLevelRuntimeSettings, b as backupExistingConfig } from './config.mjs';
|
|
12
13
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
13
14
|
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
14
15
|
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
@@ -27,15 +28,15 @@ import 'buffer';
|
|
|
27
28
|
import 'string_decoder';
|
|
28
29
|
import 'node:url';
|
|
29
30
|
import './constants.mjs';
|
|
31
|
+
import './platform.mjs';
|
|
32
|
+
import './main.mjs';
|
|
33
|
+
import 'module';
|
|
34
|
+
import 'node:stream';
|
|
30
35
|
import './ccjk-config.mjs';
|
|
31
36
|
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
32
37
|
import './index3.mjs';
|
|
33
38
|
import './fs-operations.mjs';
|
|
34
39
|
import 'node:fs/promises';
|
|
35
|
-
import './platform.mjs';
|
|
36
|
-
import './main.mjs';
|
|
37
|
-
import 'module';
|
|
38
|
-
import 'node:stream';
|
|
39
40
|
import '../shared/ccjk.DeWpAShp.mjs';
|
|
40
41
|
|
|
41
42
|
const PROVIDER_PRESETS_URL = "https://pub-0dc3e1677e894f07bbea11b17a29e032.r2.dev/providers.json";
|
|
@@ -420,7 +421,7 @@ async function setupCcrConfiguration(codeTool) {
|
|
|
420
421
|
console.log(a.yellow(`${i18n.t("ccr:keepingExistingConfig")}`));
|
|
421
422
|
await configureCcrProxy(existingConfig, codeTool);
|
|
422
423
|
try {
|
|
423
|
-
const { manageApiKeyApproval } = await import('./config.mjs').then(function (n) { return n.
|
|
424
|
+
const { manageApiKeyApproval } = await import('./claude-config.mjs').then(function (n) { return n.n; });
|
|
424
425
|
const apiKey = existingConfig.APIKEY || "sk-ccjk-x-ccr";
|
|
425
426
|
manageApiKeyApproval(apiKey, resolveClaudeFamilySettingsTarget(codeTool).codeTool);
|
|
426
427
|
console.log(a.green(`\u2714 ${i18n.t("ccr:apiKeyApprovalSuccess")}`));
|
|
@@ -454,7 +455,7 @@ async function setupCcrConfiguration(codeTool) {
|
|
|
454
455
|
console.error(a.red(i18n.t("errors:failedToSetOnboarding")), error);
|
|
455
456
|
}
|
|
456
457
|
try {
|
|
457
|
-
const { manageApiKeyApproval } = await import('./config.mjs').then(function (n) { return n.
|
|
458
|
+
const { manageApiKeyApproval } = await import('./claude-config.mjs').then(function (n) { return n.n; });
|
|
458
459
|
const apiKey = config.APIKEY || "sk-ccjk-x-ccr";
|
|
459
460
|
manageApiKeyApproval(apiKey, resolveClaudeFamilySettingsTarget(codeTool).codeTool);
|
|
460
461
|
console.log(a.green(`\u2714 ${i18n.t("ccr:apiKeyApprovalSuccess")}`));
|
package/dist/chunks/config3.mjs
CHANGED
package/dist/chunks/doctor.mjs
CHANGED
|
@@ -7,9 +7,9 @@ import { SETTINGS_FILE, CLAUDE_DIR, CODEX_DIR, CODEX_CONFIG_FILE, getCodeToolRun
|
|
|
7
7
|
import { i18n } from './index2.mjs';
|
|
8
8
|
import { g as getPermissionManager } from '../shared/ccjk.DsZsc4LR.mjs';
|
|
9
9
|
import { i as isCcrInstalled } from '../shared/ccjk.DFRPtmK_.mjs';
|
|
10
|
-
import { i as inspectClaudeFamilyCoreFeatures } from '../shared/ccjk.
|
|
11
|
-
import {
|
|
12
|
-
import { b as backupExistingConfig,
|
|
10
|
+
import { i as inspectClaudeFamilyCoreFeatures } from '../shared/ccjk.C1Be3aJN.mjs';
|
|
11
|
+
import { a as readCodexConfig, g as readCodexGoalsFeatureEnabled } from './codex.mjs';
|
|
12
|
+
import { b as backupExistingConfig, c as copyConfigFiles } from './config.mjs';
|
|
13
13
|
import { c as commandExists } from './platform.mjs';
|
|
14
14
|
import { P as ProviderHealthMonitor } from '../shared/ccjk.J8YiPsOw.mjs';
|
|
15
15
|
import { r as resolveClaudeFamilySettingsTarget } from '../shared/ccjk.DDL-4C-k.mjs';
|
|
@@ -42,11 +42,12 @@ import './version-checker.mjs';
|
|
|
42
42
|
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
43
43
|
import 'module';
|
|
44
44
|
import 'node:stream';
|
|
45
|
-
import '
|
|
46
|
-
import 'node:fs/promises';
|
|
45
|
+
import './claude-config.mjs';
|
|
47
46
|
import './json-config.mjs';
|
|
48
47
|
import '../shared/ccjk.RyizuzOI.mjs';
|
|
49
|
-
import '
|
|
48
|
+
import 'node:fs/promises';
|
|
49
|
+
import '../shared/ccjk.BLsIiTqO.mjs';
|
|
50
|
+
import '../shared/ccjk.C94P8gCY.mjs';
|
|
50
51
|
import './ccjk-config.mjs';
|
|
51
52
|
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
52
53
|
import './index3.mjs';
|
|
@@ -622,6 +623,26 @@ async function checkSettings(codeType) {
|
|
|
622
623
|
if (settings.plansDirectory === null) {
|
|
623
624
|
issues.push("plansDirectory should not be null");
|
|
624
625
|
}
|
|
626
|
+
const env = settings.env || {};
|
|
627
|
+
const hasAnthropicModelVars = Boolean(
|
|
628
|
+
env.ANTHROPIC_MODEL || env.ANTHROPIC_DEFAULT_OPUS_MODEL || env.ANTHROPIC_DEFAULT_SONNET_MODEL || env.ANTHROPIC_DEFAULT_HAIKU_MODEL
|
|
629
|
+
);
|
|
630
|
+
if (settings.model && hasAnthropicModelVars) {
|
|
631
|
+
issues.push(`settings.model="${settings.model}" overrides ANTHROPIC_* env vars (custom model selection broken)`);
|
|
632
|
+
}
|
|
633
|
+
const sonnet = env.ANTHROPIC_DEFAULT_SONNET_MODEL;
|
|
634
|
+
if (typeof sonnet === "string" && /opus/i.test(sonnet)) {
|
|
635
|
+
issues.push(`ANTHROPIC_DEFAULT_SONNET_MODEL="${sonnet}" looks like an Opus model (slot misrouted)`);
|
|
636
|
+
}
|
|
637
|
+
const preToolUse = settings.hooks?.PreToolUse;
|
|
638
|
+
if (Array.isArray(preToolUse)) {
|
|
639
|
+
const hasGatekeeper = preToolUse.some(
|
|
640
|
+
(h) => h?.matcher === "mcp__.*" && Array.isArray(h?.hooks) && h.hooks.some((c) => typeof c?.command === "string" && c.command.includes("mcp-gatekeeper"))
|
|
641
|
+
);
|
|
642
|
+
if (hasGatekeeper) {
|
|
643
|
+
issues.push("mcp-gatekeeper PreToolUse hook is enabled (forks bash+node per MCP call; disabled by default)");
|
|
644
|
+
}
|
|
645
|
+
}
|
|
625
646
|
if (issues.length > 0) {
|
|
626
647
|
return {
|
|
627
648
|
name: "settings.json",
|
|
@@ -717,6 +738,50 @@ async function checkCcr() {
|
|
|
717
738
|
fix: "Run: npx ccjk zero-config dev"
|
|
718
739
|
};
|
|
719
740
|
}
|
|
741
|
+
async function checkDisciplineBaseline(codeType) {
|
|
742
|
+
const target = resolveClaudeFamilySettingsTarget(codeType);
|
|
743
|
+
const memoryFile = target.instructionsFile;
|
|
744
|
+
if (!existsSync(memoryFile)) {
|
|
745
|
+
return {
|
|
746
|
+
name: "Discipline Baseline",
|
|
747
|
+
status: "warning",
|
|
748
|
+
message: "No memory file found",
|
|
749
|
+
fix: "Run: npx ccjk init"
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
const { readFileSync } = await import('node:fs');
|
|
753
|
+
const text = readFileSync(memoryFile, "utf-8");
|
|
754
|
+
const required = [
|
|
755
|
+
"# Coding Discipline Baseline",
|
|
756
|
+
"Think before coding",
|
|
757
|
+
"Simplicity first",
|
|
758
|
+
"Surgical changes",
|
|
759
|
+
"Goal-driven execution"
|
|
760
|
+
];
|
|
761
|
+
const missing = required.filter((m) => !text.includes(m));
|
|
762
|
+
if (missing.length === 0) {
|
|
763
|
+
return {
|
|
764
|
+
name: "Discipline Baseline",
|
|
765
|
+
status: "ok",
|
|
766
|
+
message: "All 4 principles present"
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
if (missing.length === required.length) {
|
|
770
|
+
return {
|
|
771
|
+
name: "Discipline Baseline",
|
|
772
|
+
status: "warning",
|
|
773
|
+
message: "Baseline not installed (memory file exists but has no discipline section)",
|
|
774
|
+
fix: "Run: npx ccjk init"
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
return {
|
|
778
|
+
name: "Discipline Baseline",
|
|
779
|
+
status: "error",
|
|
780
|
+
message: `Baseline partially missing: ${missing.length}/${required.length} markers absent`,
|
|
781
|
+
fix: "Run: npx ccjk init (will rewrite CLAUDE.md with full baseline)",
|
|
782
|
+
details: missing
|
|
783
|
+
};
|
|
784
|
+
}
|
|
720
785
|
async function checkOutputStyles(codeType) {
|
|
721
786
|
const target = resolveClaudeFamilySettingsTarget(codeType);
|
|
722
787
|
const stylesDir = join(target.configDir, "output-styles");
|
|
@@ -794,6 +859,62 @@ async function checkCodexToml() {
|
|
|
794
859
|
message: "Valid configuration"
|
|
795
860
|
};
|
|
796
861
|
}
|
|
862
|
+
async function checkCodexFieldValues() {
|
|
863
|
+
if (!existsSync(CODEX_CONFIG_FILE)) {
|
|
864
|
+
return { name: "Codex Field Values", status: "ok", message: "Skipped (no config)" };
|
|
865
|
+
}
|
|
866
|
+
const { readFileSync } = await import('node:fs');
|
|
867
|
+
const text = readFileSync(CODEX_CONFIG_FILE, "utf-8");
|
|
868
|
+
const issues = [];
|
|
869
|
+
const validEffort = /* @__PURE__ */ new Set(["minimal", "low", "medium", "high"]);
|
|
870
|
+
const validTier = /* @__PURE__ */ new Set(["default", "flex", "priority"]);
|
|
871
|
+
const effortMatch = text.match(/^model_reasoning_effort\s*=\s*"([^"]+)"/m);
|
|
872
|
+
if (effortMatch && !validEffort.has(effortMatch[1])) {
|
|
873
|
+
issues.push(`model_reasoning_effort="${effortMatch[1]}" (valid: ${[...validEffort].join("/")})`);
|
|
874
|
+
}
|
|
875
|
+
const tierMatch = text.match(/^service_tier\s*=\s*"([^"]+)"/m);
|
|
876
|
+
if (tierMatch && !validTier.has(tierMatch[1])) {
|
|
877
|
+
issues.push(`service_tier="${tierMatch[1]}" (valid: ${[...validTier].join("/")})`);
|
|
878
|
+
}
|
|
879
|
+
if (issues.length === 0) {
|
|
880
|
+
return { name: "Codex Field Values", status: "ok", message: "All fields valid" };
|
|
881
|
+
}
|
|
882
|
+
return {
|
|
883
|
+
name: "Codex Field Values",
|
|
884
|
+
status: "warning",
|
|
885
|
+
message: `${issues.length} non-standard value(s) \u2014 Codex silently uses defaults`,
|
|
886
|
+
fix: "Edit ~/.codex/config.toml",
|
|
887
|
+
details: issues
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
async function checkCodexTrustedProjects() {
|
|
891
|
+
if (!existsSync(CODEX_CONFIG_FILE)) {
|
|
892
|
+
return { name: "Codex Trusted Projects", status: "ok", message: "Skipped (no config)" };
|
|
893
|
+
}
|
|
894
|
+
const { readFileSync } = await import('node:fs');
|
|
895
|
+
const text = readFileSync(CODEX_CONFIG_FILE, "utf-8");
|
|
896
|
+
const trusted = [];
|
|
897
|
+
const re = /\[projects\."([^"]+)"\]/g;
|
|
898
|
+
let m;
|
|
899
|
+
while ((m = re.exec(text)) !== null) {
|
|
900
|
+
trusted.push(m[1]);
|
|
901
|
+
}
|
|
902
|
+
const stale = trusted.filter((p) => !existsSync(p));
|
|
903
|
+
if (stale.length === 0) {
|
|
904
|
+
return {
|
|
905
|
+
name: "Codex Trusted Projects",
|
|
906
|
+
status: "ok",
|
|
907
|
+
message: `${trusted.length} entries, all paths exist`
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
return {
|
|
911
|
+
name: "Codex Trusted Projects",
|
|
912
|
+
status: "warning",
|
|
913
|
+
message: `${stale.length} of ${trusted.length} trusted paths no longer exist on disk`,
|
|
914
|
+
fix: "Edit ~/.codex/config.toml to remove dead entries",
|
|
915
|
+
details: stale.slice(0, 10)
|
|
916
|
+
};
|
|
917
|
+
}
|
|
797
918
|
async function checkCodexMcp() {
|
|
798
919
|
const config = readCodexConfig();
|
|
799
920
|
const count = config?.mcpServices.length || 0;
|
|
@@ -843,6 +964,50 @@ async function checkClavueNativeGoals() {
|
|
|
843
964
|
fix: "Run: npm install -g clavue"
|
|
844
965
|
};
|
|
845
966
|
}
|
|
967
|
+
async function checkCcjkProfiles() {
|
|
968
|
+
const { homedir } = await import('node:os');
|
|
969
|
+
const ccjkConfigPath = join(homedir(), ".ccjk", "config.toml");
|
|
970
|
+
if (!existsSync(ccjkConfigPath)) {
|
|
971
|
+
return { name: "CCJK Profiles", status: "ok", message: "Skipped (no config)" };
|
|
972
|
+
}
|
|
973
|
+
const { readFileSync } = await import('node:fs');
|
|
974
|
+
const text = readFileSync(ccjkConfigPath, "utf-8");
|
|
975
|
+
const suspicious = [];
|
|
976
|
+
const sectionRe = /^\[claudeCode\.profiles\.([^\]]+)\]$([\s\S]*?)(?=^\[|\z)/gm;
|
|
977
|
+
let m;
|
|
978
|
+
while ((m = sectionRe.exec(text)) !== null) {
|
|
979
|
+
const name = m[1];
|
|
980
|
+
const body = m[2];
|
|
981
|
+
const apiKey = body.match(/apiKey\s*=\s*"([^"]*)"/)?.[1] ?? "";
|
|
982
|
+
const baseUrl = body.match(/baseUrl\s*=\s*"([^"]*)"/)?.[1] ?? "";
|
|
983
|
+
const reasons = [];
|
|
984
|
+
if (/^\d+$/.test(name)) {
|
|
985
|
+
reasons.push("numeric-only name");
|
|
986
|
+
}
|
|
987
|
+
if (apiKey && apiKey.length < 10) {
|
|
988
|
+
reasons.push(`apiKey too short (${apiKey.length} chars)`);
|
|
989
|
+
}
|
|
990
|
+
if (baseUrl && !/^https?:\/\/[^\s/]+\.[^\s/]/.test(baseUrl)) {
|
|
991
|
+
reasons.push(`baseUrl looks invalid: ${baseUrl}`);
|
|
992
|
+
}
|
|
993
|
+
if (apiKey.startsWith("sk-ant-test-") || /test-?\d+/i.test(apiKey)) {
|
|
994
|
+
reasons.push("apiKey looks like a test placeholder");
|
|
995
|
+
}
|
|
996
|
+
if (reasons.length > 0) {
|
|
997
|
+
suspicious.push(`${name}: ${reasons.join("; ")}`);
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
if (suspicious.length === 0) {
|
|
1001
|
+
return { name: "CCJK Profiles", status: "ok", message: "No junk profiles detected" };
|
|
1002
|
+
}
|
|
1003
|
+
return {
|
|
1004
|
+
name: "CCJK Profiles",
|
|
1005
|
+
status: "warning",
|
|
1006
|
+
message: `${suspicious.length} suspicious profile(s) in ~/.ccjk/config.toml`,
|
|
1007
|
+
fix: "Use ccjk menu to remove or rename them",
|
|
1008
|
+
details: suspicious
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
846
1011
|
async function checkCodexProviders() {
|
|
847
1012
|
const config = readCodexConfig();
|
|
848
1013
|
if (!config) {
|
|
@@ -1017,18 +1182,23 @@ async function doctor(options = {}) {
|
|
|
1017
1182
|
checkCodexCli,
|
|
1018
1183
|
checkCodexDir,
|
|
1019
1184
|
checkCodexToml,
|
|
1185
|
+
checkCodexFieldValues,
|
|
1186
|
+
checkCodexTrustedProjects,
|
|
1020
1187
|
checkCodexMcp,
|
|
1021
|
-
checkCodexNativeGoals
|
|
1188
|
+
checkCodexNativeGoals,
|
|
1189
|
+
checkCcjkProfiles
|
|
1022
1190
|
] : [
|
|
1023
1191
|
() => checkClaudeCode(options.codeType),
|
|
1024
1192
|
() => checkClaudeDir(options.codeType),
|
|
1025
1193
|
() => checkSettings(options.codeType),
|
|
1194
|
+
() => checkDisciplineBaseline(options.codeType),
|
|
1026
1195
|
() => checkWorkflows(options.codeType),
|
|
1027
1196
|
() => checkMcp(options.codeType),
|
|
1028
1197
|
() => checkPermissionRules(options.codeType),
|
|
1029
1198
|
checkCcr,
|
|
1030
1199
|
() => checkOutputStyles(options.codeType),
|
|
1031
|
-
...options.codeType === "clavue" ? [checkClavueNativeGoals] : []
|
|
1200
|
+
...options.codeType === "clavue" ? [checkClavueNativeGoals] : [],
|
|
1201
|
+
checkCcjkProfiles
|
|
1032
1202
|
];
|
|
1033
1203
|
if (options.checkProviders) {
|
|
1034
1204
|
checks.push(options.codeType === "codex" ? checkCodexProviders : () => checkProviders(options.codeType));
|
package/dist/chunks/features.mjs
CHANGED
|
@@ -3,13 +3,15 @@ import { homedir } from 'node:os';
|
|
|
3
3
|
import process__default from 'node:process';
|
|
4
4
|
import a from './index5.mjs';
|
|
5
5
|
import { i as inquirer } from './index6.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { r as readMcpConfig, f as fixWindowsMcpConfig, w as writeMcpConfig, c as backupMcpConfig, g as getMcpServices, b as buildMcpServerConfig, m as mergeMcpServers } from './claude-config.mjs';
|
|
7
7
|
import { SUPPORTED_LANGS, LANG_LABELS } from './constants.mjs';
|
|
8
8
|
import { ensureI18nInitialized, i18n, changeLanguage } from './index2.mjs';
|
|
9
9
|
import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { s as syncClavueActiveProviderModelSelection } from './clavue-config.mjs';
|
|
11
|
+
import { g as getExistingModelConfig, a as getExistingCustomModelConfig, u as updateCustomModel, d as updateDefaultModel, e as getExistingApiConfig, p as promptApiConfigurationAction, f as configureApi } from './config.mjs';
|
|
12
|
+
import { m as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.CTr4yCZ1.mjs';
|
|
13
|
+
import { s as selectMcpServices } from '../shared/ccjk.DhJ1kyDR.mjs';
|
|
14
|
+
import { a as configureOutputStyle } from '../shared/ccjk.C94P8gCY.mjs';
|
|
13
15
|
import { i as isWindows } from './platform.mjs';
|
|
14
16
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
15
17
|
import { openSettingsJson, importRecommendedPermissions, importRecommendedEnv } from './simple-config.mjs';
|
|
@@ -29,13 +31,13 @@ import 'node:path';
|
|
|
29
31
|
import 'node:crypto';
|
|
30
32
|
import 'buffer';
|
|
31
33
|
import 'string_decoder';
|
|
32
|
-
import 'node:url';
|
|
33
|
-
import '../shared/ccjk.RyizuzOI.mjs';
|
|
34
34
|
import 'node:child_process';
|
|
35
35
|
import '../shared/ccjk.DDL-4C-k.mjs';
|
|
36
|
+
import './json-config.mjs';
|
|
37
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
36
38
|
import './fs-operations.mjs';
|
|
37
39
|
import 'node:fs/promises';
|
|
38
|
-
import '
|
|
40
|
+
import 'node:url';
|
|
39
41
|
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
40
42
|
import './index3.mjs';
|
|
41
43
|
import './main.mjs';
|