ccjk 9.6.1 → 9.8.0

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 (56) hide show
  1. package/dist/chunks/boost.mjs +246 -7
  2. package/dist/chunks/ccjk-mcp.mjs +1 -1
  3. package/dist/chunks/ccr.mjs +25 -28
  4. package/dist/chunks/check-updates.mjs +4 -3
  5. package/dist/chunks/claude-code-config-manager.mjs +1 -1
  6. package/dist/chunks/claude-code-incremental-manager.mjs +1 -1
  7. package/dist/chunks/claude-config.mjs +1 -1
  8. package/dist/chunks/codex-config-switch.mjs +3 -4
  9. package/dist/chunks/codex-provider-manager.mjs +1 -2
  10. package/dist/chunks/codex.mjs +204 -3
  11. package/dist/chunks/config-switch.mjs +2 -3
  12. package/dist/chunks/config.mjs +1 -1
  13. package/dist/chunks/doctor.mjs +1 -1
  14. package/dist/chunks/features.mjs +24 -15
  15. package/dist/chunks/hook-installer.mjs +44 -0
  16. package/dist/chunks/index3.mjs +32 -32
  17. package/dist/chunks/init.mjs +129 -87
  18. package/dist/chunks/installer2.mjs +1 -1
  19. package/dist/chunks/interview.mjs +1 -1
  20. package/dist/chunks/mcp.mjs +1058 -17
  21. package/dist/chunks/menu.mjs +140 -56
  22. package/dist/chunks/package.mjs +2 -210
  23. package/dist/chunks/platform.mjs +1 -1
  24. package/dist/chunks/quick-setup.mjs +35 -18
  25. package/dist/chunks/simple-config.mjs +1 -1
  26. package/dist/{shared/ccjk.q1koQxEE.mjs → chunks/smart-defaults.mjs} +77 -79
  27. package/dist/chunks/status.mjs +208 -101
  28. package/dist/chunks/thinking.mjs +1 -1
  29. package/dist/chunks/uninstall.mjs +6 -4
  30. package/dist/chunks/update.mjs +4 -7
  31. package/dist/chunks/version-checker.mjs +1 -1
  32. package/dist/cli.mjs +4 -80
  33. package/dist/index.d.mts +17 -1482
  34. package/dist/index.d.ts +17 -1482
  35. package/dist/index.mjs +12 -4191
  36. package/dist/shared/{ccjk.CSkyCZIM.mjs → ccjk.Bndhan7G.mjs} +4 -242
  37. package/dist/shared/ccjk.CeE8RLG2.mjs +62 -0
  38. package/dist/shared/ccjk.DKojSRzw.mjs +266 -0
  39. package/dist/shared/{ccjk.CItD1fpl.mjs → ccjk.DvIrK0wz.mjs} +1 -1
  40. package/dist/shared/ccjk.LsPZ2PYo.mjs +1048 -0
  41. package/package.json +1 -1
  42. package/dist/chunks/api-adapter.mjs +0 -180
  43. package/dist/chunks/cli.mjs +0 -2227
  44. package/dist/chunks/context-menu.mjs +0 -913
  45. package/dist/chunks/hooks-sync.mjs +0 -1627
  46. package/dist/chunks/mcp-market.mjs +0 -1077
  47. package/dist/chunks/mcp-server.mjs +0 -776
  48. package/dist/chunks/project-detector.mjs +0 -131
  49. package/dist/chunks/provider-registry.mjs +0 -92
  50. package/dist/chunks/setup-wizard.mjs +0 -362
  51. package/dist/chunks/tools.mjs +0 -143
  52. package/dist/chunks/workflows2.mjs +0 -232
  53. package/dist/shared/ccjk.C0pb50xH.mjs +0 -347
  54. package/dist/shared/ccjk.ChMkBmdL.mjs +0 -490
  55. package/dist/shared/ccjk.CtSfXUSh.mjs +0 -209
  56. package/dist/shared/ccjk.xfAjmbJp.mjs +0 -75
@@ -1,143 +0,0 @@
1
- import ansis from 'ansis';
2
- import inquirer from 'inquirer';
3
- import { existsSync } from 'node:fs';
4
- import { homedir } from 'node:os';
5
- import { join } from 'pathe';
6
- import { ensureI18nInitialized, i18n } from './index.mjs';
7
- import { runCcrStop, runCcrStart, runCcrRestart, runCcrStatus, runCcrUi } from './commands2.mjs';
8
- import { readCcrConfig, configureCcrFeature } from './config3.mjs';
9
- import { i as isCcrInstalled, a as installCcr } from '../shared/ccjk.xfAjmbJp.mjs';
10
- import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.CItD1fpl.mjs';
11
- import { p as promptBoolean } from '../shared/ccjk.DHbrGcgg.mjs';
12
-
13
- function isCcrConfigured() {
14
- const CCR_CONFIG_FILE = join(homedir(), ".claude-code-router", "config.json");
15
- if (!existsSync(CCR_CONFIG_FILE)) {
16
- return false;
17
- }
18
- const config = readCcrConfig();
19
- return config !== null;
20
- }
21
- async function showCcrMenu() {
22
- try {
23
- ensureI18nInitialized();
24
- console.log(`
25
- ${ansis.green("\u2550".repeat(50))}`);
26
- console.log(ansis.bold.cyan(` ${i18n.t("ccr:ccrMenuTitle")}`));
27
- console.log(`${ansis.green("\u2550".repeat(50))}
28
- `);
29
- console.log(` ${ansis.green("1.")} ${i18n.t("ccr:ccrMenuOptions.initCcr")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.initCcr")}`)}`);
30
- console.log(` ${ansis.green("2.")} ${i18n.t("ccr:ccrMenuOptions.startUi")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.startUi")}`)}`);
31
- console.log(` ${ansis.green("3.")} ${i18n.t("ccr:ccrMenuOptions.checkStatus")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.checkStatus")}`)}`);
32
- console.log(` ${ansis.green("4.")} ${i18n.t("ccr:ccrMenuOptions.restart")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.restart")}`)}`);
33
- console.log(` ${ansis.green("5.")} ${i18n.t("ccr:ccrMenuOptions.start")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.start")}`)}`);
34
- console.log(` ${ansis.green("6.")} ${i18n.t("ccr:ccrMenuOptions.stop")} ${ansis.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.stop")}`)}`);
35
- console.log(` ${ansis.yellow("0.")} ${i18n.t("ccr:ccrMenuOptions.back")}`);
36
- console.log("");
37
- const { choice } = await inquirer.prompt({
38
- type: "input",
39
- name: "choice",
40
- message: i18n.t("common:enterChoice"),
41
- validate: (value) => {
42
- const valid = ["1", "2", "3", "4", "5", "6", "0"];
43
- return valid.includes(value) || i18n.t("common:invalidChoice");
44
- }
45
- });
46
- switch (choice) {
47
- case "1": {
48
- const ccrStatus = await isCcrInstalled();
49
- if (!ccrStatus.hasCorrectPackage) {
50
- await installCcr();
51
- } else {
52
- console.log(ansis.green(`\u2714 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
53
- }
54
- await configureCcrFeature();
55
- console.log(ansis.green(`
56
- \u2714 ${i18n.t("ccr:ccrSetupComplete")}`));
57
- break;
58
- }
59
- case "2":
60
- if (!isCcrConfigured()) {
61
- console.log(ansis.yellow(`
62
- \u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
63
- console.log(ansis.green(` ${i18n.t("ccr:pleaseInitFirst")}
64
- `));
65
- } else {
66
- const config = readCcrConfig();
67
- await runCcrUi(config?.APIKEY);
68
- }
69
- break;
70
- case "3":
71
- if (!isCcrConfigured()) {
72
- console.log(ansis.yellow(`
73
- \u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
74
- console.log(ansis.green(` ${i18n.t("ccr:pleaseInitFirst")}
75
- `));
76
- } else {
77
- await runCcrStatus();
78
- }
79
- break;
80
- case "4":
81
- if (!isCcrConfigured()) {
82
- console.log(ansis.yellow(`
83
- \u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
84
- console.log(ansis.green(` ${i18n.t("ccr:pleaseInitFirst")}
85
- `));
86
- } else {
87
- await runCcrRestart();
88
- }
89
- break;
90
- case "5":
91
- if (!isCcrConfigured()) {
92
- console.log(ansis.yellow(`
93
- \u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
94
- console.log(ansis.green(` ${i18n.t("ccr:pleaseInitFirst")}
95
- `));
96
- } else {
97
- await runCcrStart();
98
- }
99
- break;
100
- case "6":
101
- if (!isCcrConfigured()) {
102
- console.log(ansis.yellow(`
103
- \u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
104
- console.log(ansis.green(` ${i18n.t("ccr:pleaseInitFirst")}
105
- `));
106
- } else {
107
- await runCcrStop();
108
- }
109
- break;
110
- case "0":
111
- return false;
112
- }
113
- if (choice !== "0") {
114
- console.log(`
115
- ${ansis.dim("\u2500".repeat(50))}
116
- `);
117
- const continueInCcr = await promptBoolean({
118
- message: i18n.t("common:returnToMenu"),
119
- defaultValue: true
120
- });
121
- if (continueInCcr) {
122
- return await showCcrMenu();
123
- }
124
- }
125
- return false;
126
- } catch (error) {
127
- if (!handleExitPromptError(error)) {
128
- handleGeneralError(error);
129
- }
130
- return false;
131
- }
132
- }
133
-
134
- async function runCcrMenuFeature() {
135
- await showCcrMenu();
136
- }
137
-
138
- const tools = {
139
- __proto__: null,
140
- runCcrMenuFeature: runCcrMenuFeature
141
- };
142
-
143
- export { runCcrMenuFeature as r, showCcrMenu as s, tools as t };
@@ -1,232 +0,0 @@
1
- import { ensureI18nInitialized, i18n } from './index.mjs';
2
- import 'node:fs';
3
- import 'node:process';
4
- import 'node:url';
5
- import 'i18next';
6
- import 'i18next-fs-backend';
7
- import 'pathe';
8
-
9
- const WORKFLOW_CONFIG_BASE = [
10
- {
11
- id: "interviewWorkflow",
12
- defaultSelected: true,
13
- order: 1,
14
- commands: ["interview.md"],
15
- agents: [],
16
- autoInstallAgents: false,
17
- category: "interview",
18
- displayCategory: "planning",
19
- outputDir: "interview",
20
- metadata: {
21
- version: "1.0.0",
22
- addedDate: "2025-01",
23
- tags: ["recommended", "popular"],
24
- difficulty: "beginner"
25
- }
26
- },
27
- {
28
- id: "essentialTools",
29
- defaultSelected: true,
30
- order: 2,
31
- commands: ["init-project.md", "feat.md"],
32
- agents: [
33
- { id: "init-architect", filename: "init-architect.md", required: true },
34
- { id: "get-current-datetime", filename: "get-current-datetime.md", required: true },
35
- { id: "planner", filename: "planner.md", required: true },
36
- { id: "ui-ux-designer", filename: "ui-ux-designer.md", required: true }
37
- ],
38
- autoInstallAgents: true,
39
- category: "essential",
40
- displayCategory: "planning",
41
- outputDir: "essential",
42
- metadata: {
43
- version: "1.0.0",
44
- addedDate: "2025-01",
45
- tags: ["essential"],
46
- difficulty: "beginner"
47
- }
48
- },
49
- {
50
- id: "gitWorkflow",
51
- defaultSelected: true,
52
- order: 3,
53
- commands: ["git-commit.md", "git-rollback.md", "git-cleanBranches.md", "git-worktree.md"],
54
- agents: [],
55
- autoInstallAgents: false,
56
- category: "git",
57
- displayCategory: "versionControl",
58
- outputDir: "git",
59
- metadata: {
60
- version: "1.0.0",
61
- addedDate: "2025-01",
62
- tags: ["popular"],
63
- difficulty: "beginner"
64
- }
65
- },
66
- {
67
- id: "sixStepsWorkflow",
68
- defaultSelected: false,
69
- order: 4,
70
- commands: ["workflow.md"],
71
- agents: [],
72
- autoInstallAgents: false,
73
- category: "sixStep",
74
- displayCategory: "development",
75
- outputDir: "workflow",
76
- metadata: {
77
- version: "1.0.0",
78
- addedDate: "2025-01",
79
- tags: ["professional"],
80
- difficulty: "intermediate"
81
- }
82
- },
83
- {
84
- id: "specFirstTDD",
85
- defaultSelected: false,
86
- order: 5,
87
- commands: ["spec-first-tdd.md"],
88
- agents: [],
89
- autoInstallAgents: false,
90
- category: "specFirstTDD",
91
- displayCategory: "quality",
92
- outputDir: "spec-first-tdd",
93
- metadata: {
94
- version: "1.0.0",
95
- addedDate: "2025-02",
96
- tags: ["professional", "new"],
97
- difficulty: "advanced"
98
- }
99
- },
100
- {
101
- id: "continuousDelivery",
102
- defaultSelected: false,
103
- order: 6,
104
- commands: ["continuous-delivery.md"],
105
- agents: [],
106
- autoInstallAgents: false,
107
- category: "continuousDelivery",
108
- displayCategory: "quality",
109
- outputDir: "continuous-delivery",
110
- metadata: {
111
- version: "1.0.0",
112
- addedDate: "2025-02",
113
- tags: ["professional", "new"],
114
- difficulty: "advanced"
115
- }
116
- },
117
- {
118
- id: "refactoringMaster",
119
- defaultSelected: false,
120
- order: 7,
121
- commands: ["refactoring-master.md"],
122
- agents: [],
123
- autoInstallAgents: false,
124
- category: "refactoringMaster",
125
- displayCategory: "quality",
126
- outputDir: "refactoring-master",
127
- metadata: {
128
- version: "1.0.0",
129
- addedDate: "2025-02",
130
- tags: ["professional", "new"],
131
- difficulty: "advanced"
132
- }
133
- },
134
- {
135
- id: "linearMethod",
136
- defaultSelected: false,
137
- order: 8,
138
- commands: ["linear-method.md"],
139
- agents: [],
140
- autoInstallAgents: false,
141
- category: "linearMethod",
142
- displayCategory: "planning",
143
- outputDir: "linear-method",
144
- metadata: {
145
- version: "1.0.0",
146
- addedDate: "2025-02",
147
- tags: ["new"],
148
- difficulty: "intermediate"
149
- }
150
- }
151
- ];
152
- function getWorkflowConfigs() {
153
- ensureI18nInitialized();
154
- const workflowTranslations = [
155
- {
156
- id: "interviewWorkflow",
157
- name: i18n.t("workflow:workflowOption.interviewWorkflow"),
158
- description: i18n.t("workflow:workflowDescription.interviewWorkflow"),
159
- stats: i18n.t("workflow:workflowStats.interviewWorkflow")
160
- },
161
- {
162
- id: "essentialTools",
163
- name: i18n.t("workflow:workflowOption.essentialTools"),
164
- description: i18n.t("workflow:workflowDescription.essentialTools"),
165
- stats: i18n.t("workflow:workflowStats.essentialTools")
166
- },
167
- {
168
- id: "gitWorkflow",
169
- name: i18n.t("workflow:workflowOption.gitWorkflow"),
170
- description: i18n.t("workflow:workflowDescription.gitWorkflow"),
171
- stats: i18n.t("workflow:workflowStats.gitWorkflow")
172
- },
173
- {
174
- id: "sixStepsWorkflow",
175
- name: i18n.t("workflow:workflowOption.sixStepsWorkflow"),
176
- description: i18n.t("workflow:workflowDescription.sixStepsWorkflow"),
177
- stats: i18n.t("workflow:workflowStats.sixStepsWorkflow")
178
- },
179
- {
180
- id: "specFirstTDD",
181
- name: i18n.t("workflow:workflowOption.specFirstTDD"),
182
- description: i18n.t("workflow:workflowDescription.specFirstTDD"),
183
- stats: i18n.t("workflow:workflowStats.specFirstTDD")
184
- },
185
- {
186
- id: "continuousDelivery",
187
- name: i18n.t("workflow:workflowOption.continuousDelivery"),
188
- description: i18n.t("workflow:workflowDescription.continuousDelivery"),
189
- stats: i18n.t("workflow:workflowStats.continuousDelivery")
190
- },
191
- {
192
- id: "refactoringMaster",
193
- name: i18n.t("workflow:workflowOption.refactoringMaster"),
194
- description: i18n.t("workflow:workflowDescription.refactoringMaster"),
195
- stats: i18n.t("workflow:workflowStats.refactoringMaster")
196
- },
197
- {
198
- id: "linearMethod",
199
- name: i18n.t("workflow:workflowOption.linearMethod"),
200
- description: i18n.t("workflow:workflowDescription.linearMethod"),
201
- stats: i18n.t("workflow:workflowStats.linearMethod")
202
- }
203
- ];
204
- return WORKFLOW_CONFIG_BASE.map((baseConfig) => {
205
- const translation = workflowTranslations.find((t) => t.id === baseConfig.id);
206
- return {
207
- ...baseConfig,
208
- name: translation?.name || baseConfig.id,
209
- description: translation?.description,
210
- stats: translation?.stats
211
- };
212
- });
213
- }
214
- function getWorkflowConfig(workflowId) {
215
- return getWorkflowConfigs().find((config) => config.id === workflowId);
216
- }
217
- function getOrderedWorkflows() {
218
- return getWorkflowConfigs().sort((a, b) => a.order - b.order);
219
- }
220
- function getTagLabel(tag) {
221
- ensureI18nInitialized();
222
- const tagKeys = {
223
- recommended: "workflow:tags.recommended",
224
- popular: "workflow:tags.popular",
225
- new: "workflow:tags.new",
226
- essential: "workflow:tags.essential",
227
- professional: "workflow:tags.professional"
228
- };
229
- return i18n.t(tagKeys[tag]);
230
- }
231
-
232
- export { WORKFLOW_CONFIG_BASE, getOrderedWorkflows, getTagLabel, getWorkflowConfig, getWorkflowConfigs };