ccjk 9.7.0 → 9.8.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.
@@ -2,20 +2,21 @@ import { execSync } from 'node:child_process';
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
3
  import { homedir } from 'node:os';
4
4
  import { join } from 'pathe';
5
- import { b as getPlatform } from '../chunks/platform.mjs';
6
- import { DEFAULT_CODE_TOOL_TYPE } from '../chunks/constants.mjs';
7
- import { i18n } from '../chunks/index.mjs';
8
- import { readZcfConfigAsync, saveZcfConfig } from '../chunks/ccjk-config.mjs';
5
+ import { d as getPlatform } from './platform.mjs';
6
+ import { s as scanProject } from '../shared/ccjk.DKojSRzw.mjs';
7
+ import 'node:process';
8
+ import 'tinyexec';
9
9
 
10
10
  class SmartDefaultsDetector {
11
11
  /**
12
12
  * Detect environment and generate smart defaults
13
13
  */
14
- async detect() {
14
+ async detect(cwd) {
15
15
  const platform = getPlatform();
16
16
  const apiKey = this.detectApiKey();
17
17
  const apiProvider = this.detectApiProvider(apiKey);
18
18
  const ccVersion = this.detectClaudeCodeVersion();
19
+ const projectContext = scanProject(cwd);
19
20
  return {
20
21
  // Environment detection
21
22
  platform,
@@ -23,18 +24,18 @@ class SmartDefaultsDetector {
23
24
  // API configuration
24
25
  apiKey,
25
26
  apiProvider,
26
- // Recommended MCP services based on platform
27
- mcpServices: this.getRecommendedMcpServices(platform),
28
- // Essential skills (common 5)
29
- skills: [
27
+ // Recommended MCP services based on platform + project
28
+ mcpServices: this.getRecommendedMcpServices(platform, projectContext),
29
+ // Essential skills — reduced in CI/container (non-interactive)
30
+ skills: projectContext.runtime.isCI || projectContext.runtime.isContainer ? ["ccjk:git-commit"] : [
30
31
  "ccjk:git-commit",
31
32
  "ccjk:feat",
32
33
  "ccjk:workflow",
33
34
  "ccjk:init-project",
34
35
  "ccjk:git-worktree"
35
36
  ],
36
- // Core agents (universal 2)
37
- agents: [
37
+ // Core agents — skip in CI/container (non-interactive)
38
+ agents: projectContext.runtime.isCI || projectContext.runtime.isContainer ? [] : [
38
39
  "typescript-cli-architect",
39
40
  "ccjk-testing-specialist"
40
41
  ],
@@ -43,7 +44,7 @@ class SmartDefaultsDetector {
43
44
  // Workflow preferences
44
45
  workflows: {
45
46
  outputStyle: "engineer-professional",
46
- gitWorkflow: "conventional-commits",
47
+ gitWorkflow: projectContext.usesConventionalCommits ? "conventional-commits" : "conventional-commits",
47
48
  sixStepWorkflow: true
48
49
  },
49
50
  // Tool integrations
@@ -54,7 +55,13 @@ class SmartDefaultsDetector {
54
55
  },
55
56
  // Claude Code native features
56
57
  claudeCodeVersion: ccVersion,
57
- nativeFeatures: this.detectNativeFeatures(ccVersion)
58
+ nativeFeatures: this.detectNativeFeatures(ccVersion),
59
+ // Project context
60
+ projectContext,
61
+ // Recommended hooks based on project toolchain
62
+ recommendedHooks: this.getRecommendedHooks(projectContext),
63
+ // SSH session flag for quick-setup notice
64
+ sshDetected: projectContext.runtime.isSSH || void 0
58
65
  };
59
66
  }
60
67
  /**
@@ -200,20 +207,67 @@ class SmartDefaultsDetector {
200
207
  return ccusagePaths.some((path) => existsSync(path));
201
208
  }
202
209
  /**
203
- * Get recommended MCP services based on environment
210
+ * Get recommended MCP services based on environment + project context
204
211
  */
205
- getRecommendedMcpServices(platform) {
212
+ getRecommendedMcpServices(platform, project) {
213
+ const runtime = project?.runtime;
214
+ if (runtime?.isCI) {
215
+ return ["context7", "mcp-deepwiki"];
216
+ }
217
+ if (runtime?.isContainer) {
218
+ return ["context7", "mcp-deepwiki"];
219
+ }
206
220
  const core = ["context7", "mcp-deepwiki", "open-websearch"];
207
- if (platform === "darwin") {
208
- return [...core, "Playwright", "sqlite"];
221
+ const extras = [];
222
+ const hasBrowser = runtime?.hasBrowser ?? (platform === "darwin" || platform === "win32");
223
+ if (hasBrowser) {
224
+ extras.push("Playwright");
225
+ }
226
+ extras.push("sqlite");
227
+ if (project && ["typescript", "java", "csharp"].includes(project.language)) {
228
+ if (!runtime?.isHeadless) {
229
+ extras.push("serena");
230
+ }
209
231
  }
210
- if (platform === "linux") {
211
- return [...core, "sqlite"];
232
+ return [...core, ...extras];
233
+ }
234
+ /**
235
+ * Get recommended hook template IDs based on project toolchain
236
+ */
237
+ getRecommendedHooks(project) {
238
+ const runtime = project.runtime;
239
+ if (runtime.isCI) {
240
+ const hooks2 = [];
241
+ if (project.linter !== "none") hooks2.push("pre-commit-lint-check");
242
+ if (project.testRunner !== "none") hooks2.push("test-before-commit");
243
+ return hooks2;
212
244
  }
213
- if (platform === "win32") {
214
- return [...core, "Playwright", "sqlite"];
245
+ if (runtime.isContainer) {
246
+ const hooks2 = [];
247
+ if (project.linter !== "none") hooks2.push("pre-commit-lint-check");
248
+ if (project.testRunner !== "none") hooks2.push("test-before-commit");
249
+ return hooks2;
215
250
  }
216
- return core;
251
+ const hooks = [];
252
+ if (!runtime.isHeadless) {
253
+ hooks.push("block-dev-server");
254
+ }
255
+ hooks.push("git-push-confirm");
256
+ const jsLangs = ["typescript", "javascript"];
257
+ if (jsLangs.includes(project.language)) {
258
+ hooks.push("warn-console-log");
259
+ }
260
+ hooks.push("block-unwanted-docs");
261
+ if (project.testRunner !== "none") {
262
+ hooks.push("test-before-commit");
263
+ }
264
+ if (project.formatter !== "none") {
265
+ hooks.push("auto-format-on-save");
266
+ }
267
+ if (project.linter !== "none") {
268
+ hooks.push("pre-commit-lint-check");
269
+ }
270
+ return hooks;
217
271
  }
218
272
  /**
219
273
  * Get recommended skills based on user type
@@ -273,60 +327,4 @@ function detectCodeToolType() {
273
327
  return SmartDefaultsDetector.detectCodeToolType();
274
328
  }
275
329
 
276
- const CODE_TYPE_ABBREVIATIONS = {
277
- cc: "claude-code",
278
- cx: "codex"
279
- };
280
- async function resolveCodeType(codeTypeParam) {
281
- if (codeTypeParam) {
282
- const normalizedParam = codeTypeParam.toLowerCase().trim();
283
- if (normalizedParam in CODE_TYPE_ABBREVIATIONS) {
284
- return CODE_TYPE_ABBREVIATIONS[normalizedParam];
285
- }
286
- if (isValidCodeType(normalizedParam)) {
287
- return normalizedParam;
288
- }
289
- const validAbbreviations = Object.keys(CODE_TYPE_ABBREVIATIONS);
290
- const validFullTypes = Object.values(CODE_TYPE_ABBREVIATIONS);
291
- const validOptions = [...validAbbreviations, ...validFullTypes].join(", ");
292
- let defaultValue = DEFAULT_CODE_TOOL_TYPE;
293
- try {
294
- const config = await readZcfConfigAsync();
295
- if (config?.codeToolType && isValidCodeType(config.codeToolType)) {
296
- defaultValue = config.codeToolType;
297
- }
298
- } catch {
299
- }
300
- throw new Error(
301
- i18n.t("errors:invalidCodeType", { value: codeTypeParam, validOptions, defaultValue })
302
- );
303
- }
304
- try {
305
- const freshDetected = detectCodeToolType();
306
- if (isValidCodeType(freshDetected)) {
307
- try {
308
- const config = await readZcfConfigAsync();
309
- if (config && config.codeToolType !== freshDetected) {
310
- config.codeToolType = freshDetected;
311
- await saveZcfConfig(config);
312
- }
313
- } catch {
314
- }
315
- return freshDetected;
316
- }
317
- } catch {
318
- }
319
- try {
320
- const config = await readZcfConfigAsync();
321
- if (config?.codeToolType && isValidCodeType(config.codeToolType)) {
322
- return config.codeToolType;
323
- }
324
- } catch {
325
- }
326
- return DEFAULT_CODE_TOOL_TYPE;
327
- }
328
- function isValidCodeType(value) {
329
- return ["claude-code", "codex"].includes(value);
330
- }
331
-
332
- export { detectSmartDefaults as d, resolveCodeType as r };
330
+ export { SmartDefaultsDetector, detectCodeToolType, detectSmartDefaults };
@@ -1,10 +1,12 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+ import process__default from 'node:process';
1
4
  import ansis from 'ansis';
2
- import { r as runHealthCheck, a as analyzeProject, g as getRecommendations } from '../shared/ccjk.CSkyCZIM.mjs';
3
- import 'node:fs';
4
- import 'node:process';
5
- import 'pathe';
5
+ import { join } from 'pathe';
6
+ import { s as scanProject } from '../shared/ccjk.DKojSRzw.mjs';
7
+ import { r as runHealthCheck } from '../shared/ccjk.Bndhan7G.mjs';
8
+ import 'node:child_process';
6
9
  import './constants.mjs';
7
- import 'node:os';
8
10
  import './index.mjs';
9
11
  import 'node:url';
10
12
  import 'i18next';
@@ -23,18 +25,19 @@ const STATUS_ICONS = {
23
25
  warn: ansis.yellow("\u26A0"),
24
26
  fail: ansis.red("\u2717")
25
27
  };
26
- function stripAnsi(s) {
27
- return s.replace(/\x1B\[[0-9;]*m/g, "");
28
+ const INSTALLED = ansis.green("\u2713");
29
+ const MISSING = ansis.gray("\u2212");
30
+ function label(text) {
31
+ return ansis.gray(text);
28
32
  }
29
- function renderBox(lines, width = 55) {
30
- const top = ansis.gray(`\u256D${"\u2500".repeat(width - 2)}\u256E`);
31
- const bot = ansis.gray(`\u2570${"\u2500".repeat(width - 2)}\u256F`);
32
- const pad = (s) => {
33
- const stripped = stripAnsi(s);
34
- const remaining = width - 4 - stripped.length;
35
- return `${ansis.gray("\u2502")} ${s}${" ".repeat(Math.max(0, remaining))} ${ansis.gray("\u2502")}`;
36
- };
37
- return [top, ...lines.map(pad), bot].join("\n");
33
+ function val(text) {
34
+ return ansis.white(text);
35
+ }
36
+ function heading(text) {
37
+ return ansis.cyan.bold(text);
38
+ }
39
+ function divider() {
40
+ return ansis.gray("\u2500".repeat(44));
38
41
  }
39
42
  function renderScoreBar(score) {
40
43
  const filled = Math.round(score / 5);
@@ -48,112 +51,211 @@ function renderScoreBar(score) {
48
51
  bar += ansis.gray("\u2591".repeat(empty));
49
52
  return bar;
50
53
  }
51
- function renderHeader(report, profile) {
52
- const gradeColor = GRADE_COLORS[report.grade] || ((s) => s);
54
+ function loadInstalledSettings() {
55
+ const settingsPath = join(homedir(), ".claude", "settings.json");
56
+ try {
57
+ if (!existsSync(settingsPath)) return { mcpServers: {}, hooks: {} };
58
+ const data = JSON.parse(readFileSync(settingsPath, "utf-8"));
59
+ return {
60
+ mcpServers: data.mcpServers || {},
61
+ hooks: data.hooks || {}
62
+ };
63
+ } catch {
64
+ return { mcpServers: {}, hooks: {} };
65
+ }
66
+ }
67
+ async function loadSmartDefaults() {
68
+ try {
69
+ const { detectSmartDefaults } = await import('./smart-defaults.mjs');
70
+ return await detectSmartDefaults();
71
+ } catch {
72
+ return null;
73
+ }
74
+ }
75
+ function renderProjectSection(ctx) {
53
76
  const lines = [];
54
- lines.push("");
55
- lines.push(ansis.cyan.bold("\u{1F9E0} CCJK Brain Dashboard"));
56
- lines.push("");
57
- lines.push(`${renderScoreBar(report.totalScore)} ${gradeColor(report.grade)} ${ansis.bold(`${report.totalScore}/100`)}`);
58
- lines.push("");
59
- if (profile.projectName) {
60
- const stackParts = [];
61
- if (profile.language !== "unknown")
62
- stackParts.push(profile.language);
63
- stackParts.push(...profile.frameworks.slice(0, 3));
64
- const stack = stackParts.length > 0 ? ansis.gray(` (${stackParts.join(", ")})`) : "";
65
- lines.push(ansis.gray("Project: ") + ansis.white(profile.projectName) + stack);
77
+ lines.push(heading("Project"));
78
+ const fields = [
79
+ ["Language", ctx.language],
80
+ ["Framework", ctx.framework],
81
+ ["Test Runner", ctx.testRunner],
82
+ ["Pkg Manager", ctx.packageManager],
83
+ ["Linter", ctx.linter],
84
+ ["Formatter", ctx.formatter],
85
+ ["Database", ctx.database === "none" ? "none" : ctx.database]
86
+ ];
87
+ for (const [k, v] of fields) {
88
+ const display = v === "none" || v === "unknown" ? ansis.gray(v) : val(v);
89
+ lines.push(` ${label(`${k}:`.padEnd(14))} ${display}`);
90
+ }
91
+ const flags = [];
92
+ if (ctx.isMonorepo) flags.push("monorepo");
93
+ if (ctx.hasDocker) flags.push("docker");
94
+ if (ctx.hasCI) flags.push("CI");
95
+ if (ctx.hasGitHooks) flags.push("git-hooks");
96
+ if (ctx.usesConventionalCommits) flags.push("conventional-commits");
97
+ if (flags.length > 0) {
98
+ lines.push(` ${label("Flags:".padEnd(14))} ${val(flags.join(", "))}`);
66
99
  }
67
100
  return lines;
68
101
  }
69
- function renderSetupStatus(results) {
102
+ function renderRuntimeSection(ctx) {
70
103
  const lines = [];
71
- lines.push("");
72
- lines.push(ansis.yellow.bold("Setup Status"));
73
- lines.push("");
74
- for (const r of results) {
75
- const icon = STATUS_ICONS[r.status] || "?";
76
- const name = r.name.padEnd(16);
77
- const msg = r.status === "pass" ? ansis.green(r.message) : r.status === "warn" ? ansis.yellow(r.message) : ansis.red(r.message);
78
- lines.push(`${icon} ${ansis.bold(name)} ${msg}`);
104
+ lines.push(heading("Runtime"));
105
+ const rt = ctx.runtime;
106
+ lines.push(` ${label("Platform:".padEnd(14))} ${val(process__default.platform)} ${ansis.gray(`(${process__default.arch})`)}`);
107
+ const envFlags = [];
108
+ if (rt.isContainer) envFlags.push("container");
109
+ if (rt.isHeadless) envFlags.push("headless");
110
+ if (rt.isSSH) envFlags.push("SSH");
111
+ if (rt.isCI) envFlags.push("CI");
112
+ if (rt.isWSL) envFlags.push("WSL");
113
+ if (envFlags.length > 0) {
114
+ lines.push(` ${label("Environment:".padEnd(14))} ${val(envFlags.join(", "))}`);
115
+ } else {
116
+ lines.push(` ${label("Environment:".padEnd(14))} ${ansis.gray("standard")}`);
79
117
  }
118
+ lines.push(` ${label("Browser:".padEnd(14))} ${rt.hasBrowser ? ansis.green("available") : ansis.gray("unavailable")}`);
80
119
  return lines;
81
120
  }
82
- function renderRecommendations(recs, maxShow = 4) {
83
- if (recs.length === 0)
84
- return [];
121
+ function renderMcpSection(recommended, installed) {
85
122
  const lines = [];
86
- lines.push("");
87
- lines.push(ansis.yellow.bold("Recommendations"));
88
- lines.push("");
89
- for (const rec of recs.slice(0, maxShow)) {
90
- const icon = rec.priority === "high" ? ansis.red("\u2192") : ansis.yellow("\u2192");
91
- lines.push(`${icon} ${rec.description}`);
92
- if (rec.command) {
93
- lines.push(` ${ansis.cyan(rec.command)}`);
94
- }
123
+ lines.push(heading("MCP Services"));
124
+ const installedNames = Object.keys(installed);
125
+ if (recommended.length === 0 && installedNames.length === 0) {
126
+ lines.push(` ${ansis.gray("No MCP services detected")}`);
127
+ return lines;
95
128
  }
96
- if (recs.length > maxShow) {
97
- lines.push(ansis.gray(` ... and ${recs.length - maxShow} more`));
129
+ const shown = /* @__PURE__ */ new Set();
130
+ for (const svc of recommended) {
131
+ const isInstalled = installedNames.some(
132
+ (name) => name.toLowerCase().includes(svc.toLowerCase()) || svc.toLowerCase().includes(name.toLowerCase())
133
+ );
134
+ const icon = isInstalled ? INSTALLED : MISSING;
135
+ lines.push(` ${icon} ${isInstalled ? val(svc) : ansis.gray(svc)}`);
136
+ shown.add(svc.toLowerCase());
137
+ }
138
+ for (const name of installedNames) {
139
+ if (!shown.has(name.toLowerCase()) && !recommended.some((r) => r.toLowerCase() === name.toLowerCase())) {
140
+ lines.push(` ${INSTALLED} ${val(name)} ${ansis.gray("(extra)")}`);
141
+ }
98
142
  }
99
143
  return lines;
100
144
  }
101
- function renderProjectRecs(profile) {
102
- const { skills, mcpServices } = getRecommendations(profile);
103
- if (skills.length === 0 && mcpServices.length === 0)
104
- return [];
145
+ function renderHooksSection(recommended, installed) {
105
146
  const lines = [];
106
- lines.push("");
107
- lines.push(ansis.yellow.bold("For Your Project"));
108
- lines.push("");
109
- if (skills.length > 0) {
110
- lines.push(`${ansis.cyan(String(skills.length))} skills match your stack:`);
111
- for (const s of skills.slice(0, 3)) {
112
- lines.push(` ${ansis.green("+")} ${s.name} ${ansis.gray(`- ${s.reason}`)}`);
147
+ lines.push(heading("Hooks"));
148
+ const installedEvents = Object.keys(installed);
149
+ const hasAnyHooks = installedEvents.length > 0;
150
+ if (recommended.length === 0 && !hasAnyHooks) {
151
+ lines.push(` ${ansis.gray("No hooks detected")}`);
152
+ return lines;
153
+ }
154
+ for (const hookId of recommended) {
155
+ const isInstalled = hasAnyHooks;
156
+ const icon = isInstalled ? INSTALLED : MISSING;
157
+ lines.push(` ${icon} ${isInstalled ? val(hookId) : ansis.gray(hookId)}`);
158
+ }
159
+ if (hasAnyHooks) {
160
+ const totalHookCount = installedEvents.reduce((sum, event) => {
161
+ const eventHooks = installed[event];
162
+ return sum + (Array.isArray(eventHooks) ? eventHooks.length : 0);
163
+ }, 0);
164
+ if (totalHookCount > 0) {
165
+ lines.push(` ${ansis.gray(`${totalHookCount} hook(s) across ${installedEvents.length} event(s)`)}`);
113
166
  }
114
- lines.push(` ${ansis.cyan("ccjk ccjk:skills --dry-run")}`);
115
167
  }
116
- if (mcpServices.length > 0) {
117
- lines.push(`${ansis.cyan(String(mcpServices.length))} MCP services recommended`);
118
- lines.push(` ${ansis.cyan("ccjk ccjk:mcp --dry-run")}`);
168
+ return lines;
169
+ }
170
+ function renderClaudeCodeSection(defaults) {
171
+ const lines = [];
172
+ lines.push(heading("Claude Code"));
173
+ const version = defaults?.claudeCodeVersion;
174
+ lines.push(` ${label("Version:".padEnd(14))} ${version ? val(version) : ansis.gray("not detected")}`);
175
+ if (defaults?.nativeFeatures) {
176
+ const nf = defaults.nativeFeatures;
177
+ const features = [];
178
+ if (nf.hooks) features.push("hooks");
179
+ if (nf.memory) features.push("memory");
180
+ if (nf.subagents) features.push("subagents");
181
+ if (nf.toolSearch) features.push("tool-search");
182
+ if (features.length > 0) {
183
+ lines.push(` ${label("Features:".padEnd(14))} ${val(features.join(", "))}`);
184
+ }
119
185
  }
120
186
  return lines;
121
187
  }
122
- function renderQuickActions() {
123
- return [
124
- "",
125
- ansis.yellow.bold("Quick Actions"),
126
- "",
127
- `${ansis.cyan("ccjk boost")} Auto-apply recommendations`,
128
- `${ansis.cyan("ccjk ccjk:skills")} Install project-matched skills`,
129
- `${ansis.cyan("ccjk ccjk:mcp")} Install recommended MCP services`,
130
- `${ansis.cyan("ccjk doctor")} Full environment diagnostics`
131
- ];
188
+ function renderHealthSection(report, compact) {
189
+ const lines = [];
190
+ lines.push(heading("Brain Dashboard"));
191
+ const gradeColor = GRADE_COLORS[report.grade] || ((s) => s);
192
+ const scoreBar = renderScoreBar(report.totalScore);
193
+ lines.push(` ${label("Score:".padEnd(14))} ${scoreBar} ${gradeColor(report.grade)} ${ansis.gray(`(${report.totalScore}/100)`)}`);
194
+ if (!compact) {
195
+ lines.push("");
196
+ for (const r of report.results) {
197
+ const icon = STATUS_ICONS[r.status];
198
+ const scoreText = ansis.gray(`${r.score}/${r.weight}`);
199
+ lines.push(` ${icon} ${r.name.padEnd(18)} ${scoreText.padEnd(10)} ${ansis.gray(r.message)}`);
200
+ }
201
+ }
202
+ if (report.recommendations.length > 0) {
203
+ lines.push("");
204
+ lines.push(ansis.yellow.bold(" Recommendations:"));
205
+ for (const rec of report.recommendations.slice(0, 3)) {
206
+ const priority = rec.priority === "high" ? ansis.red("!") : rec.priority === "medium" ? ansis.yellow("\u2022") : ansis.gray("\xB7");
207
+ lines.push(` ${priority} ${rec.title}`);
208
+ if (rec.command) {
209
+ lines.push(` ${ansis.gray("\u2192")} ${ansis.cyan(rec.command)}`);
210
+ }
211
+ }
212
+ }
213
+ return lines;
132
214
  }
133
- async function status(options = {}) {
134
- const [report, profile] = await Promise.all([
135
- runHealthCheck(),
136
- Promise.resolve(analyzeProject())
137
- ]);
138
- if (options.json) {
139
- console.log(JSON.stringify({
140
- score: report.totalScore,
141
- grade: report.grade,
142
- results: report.results.map((r) => ({ name: r.name, status: r.status, score: r.score, message: r.message })),
143
- recommendations: report.recommendations,
144
- project: { name: profile.projectName, language: profile.language, frameworks: profile.frameworks, tags: profile.tags }
145
- }, null, 2));
146
- return;
215
+ async function statusCommand(options = {}) {
216
+ try {
217
+ const [ctx, defaults, installed, health] = await Promise.all([
218
+ scanProject(),
219
+ loadSmartDefaults(),
220
+ Promise.resolve(loadInstalledSettings()),
221
+ runHealthCheck()
222
+ ]);
223
+ if (options.json) {
224
+ console.log(JSON.stringify({
225
+ project: ctx,
226
+ smartDefaults: defaults,
227
+ installed,
228
+ health
229
+ }, null, 2));
230
+ return;
231
+ }
232
+ const sections = [];
233
+ sections.push(renderProjectSection(ctx));
234
+ sections.push(renderRuntimeSection(ctx));
235
+ if (defaults) {
236
+ sections.push(renderMcpSection(defaults.mcpServices, installed.mcpServers));
237
+ sections.push(renderHooksSection(defaults.recommendedHooks, installed.hooks));
238
+ sections.push(renderClaudeCodeSection(defaults));
239
+ } else {
240
+ sections.push(renderMcpSection([], installed.mcpServers));
241
+ sections.push(renderHooksSection([], installed.hooks));
242
+ sections.push(renderClaudeCodeSection(null));
243
+ }
244
+ sections.push(renderHealthSection(health, options.compact || false));
245
+ console.log();
246
+ for (let i = 0; i < sections.length; i++) {
247
+ console.log(sections[i].join("\n"));
248
+ if (i < sections.length - 1) {
249
+ console.log();
250
+ console.log(divider());
251
+ console.log();
252
+ }
253
+ }
254
+ console.log();
255
+ } catch (error) {
256
+ console.error(ansis.red("Error running status command:"), error);
257
+ process__default.exit(1);
147
258
  }
148
- const allLines = [
149
- ...renderHeader(report, profile),
150
- ...renderSetupStatus(report.results),
151
- ...renderRecommendations(report.recommendations),
152
- ...renderProjectRecs(profile),
153
- ...renderQuickActions(),
154
- ""
155
- ];
156
- console.log(renderBox(allLines));
157
259
  }
158
260
 
159
- export { status };
261
+ export { statusCommand };
@@ -3,7 +3,7 @@ import inquirer from 'inquirer';
3
3
  import { ZCF_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, isCodeToolType } from './constants.mjs';
4
4
  import { i18n, ensureI18nInitialized } from './index.mjs';
5
5
  import { readZcfConfig } from './ccjk-config.mjs';
6
- import { r as resolveCodeType } from '../shared/ccjk.q1koQxEE.mjs';
6
+ import { r as resolveCodeType } from '../shared/ccjk.CeE8RLG2.mjs';
7
7
  import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.DvIrK0wz.mjs';
8
8
  import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
9
9
  import { p as promptBoolean } from '../shared/ccjk.DHbrGcgg.mjs';
@@ -21,8 +21,10 @@ import 'smol-toml';
21
21
  import './fs-operations.mjs';
22
22
  import 'node:crypto';
23
23
  import 'node:fs/promises';
24
+ import './smart-defaults.mjs';
24
25
  import 'node:child_process';
25
26
  import './platform.mjs';
27
+ import '../shared/ccjk.DKojSRzw.mjs';
26
28
  import 'inquirer-toggle';
27
29
  import 'dayjs';
28
30
  import 'trash';
@@ -4,7 +4,7 @@ import * as path from 'node:path';
4
4
  import process__default from 'node:process';
5
5
  import { promisify } from 'node:util';
6
6
  import * as semver from 'semver';
7
- import { b as getPlatform, f as findCommandPath, e as getHomebrewCommandPaths } from './platform.mjs';
7
+ import { d as getPlatform, f as findCommandPath, e as getHomebrewCommandPaths } from './platform.mjs';
8
8
  import 'node:os';
9
9
  import 'pathe';
10
10
  import 'tinyexec';
package/dist/cli.mjs CHANGED
@@ -1258,9 +1258,9 @@ ${ansis.yellow("By Status:")}`);
1258
1258
  { flags: "--compact", description: "Compact output" }
1259
1259
  ],
1260
1260
  loader: async () => {
1261
- const { status } = await import('./chunks/status.mjs');
1261
+ const { statusCommand } = await import('./chunks/status.mjs');
1262
1262
  return async (options) => {
1263
- await status({
1263
+ await statusCommand({
1264
1264
  json: options.json,
1265
1265
  compact: options.compact
1266
1266
  });