coding-friend-cli 1.33.1 → 1.34.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.
@@ -1,6 +1,15 @@
1
1
  import {
2
- resolveMemoryDir
3
- } from "./chunk-LK6HFD35.js";
2
+ checkLearnMcpHealth,
3
+ checkMemoryMcpHealth,
4
+ listMdFilesRecursive
5
+ } from "./chunk-CZDXMFEZ.js";
6
+ import "./chunk-FI5HEQ43.js";
7
+ import "./chunk-QCKIBJF6.js";
8
+ import {
9
+ resolveDocsDir,
10
+ resolveMemoryDir,
11
+ sanitizeRawConfig
12
+ } from "./chunk-AZ6AK5M4.js";
4
13
  import {
5
14
  getLibPath
6
15
  } from "./chunk-RZRT7NGT.js";
@@ -9,11 +18,11 @@ import {
9
18
  getLatestCliVersion,
10
19
  getLatestVersion,
11
20
  semverCompare
12
- } from "./chunk-UGTNIFBH.js";
21
+ } from "./chunk-G4QGJEV7.js";
13
22
  import {
14
23
  getInstalledVersion
15
- } from "./chunk-XOHLBLN2.js";
16
- import "./chunk-OYPOADCX.js";
24
+ } from "./chunk-LXZ47XCD.js";
25
+ import "./chunk-DHH6SRXV.js";
17
26
  import "./chunk-DMJCO6LJ.js";
18
27
  import {
19
28
  detectPluginScope,
@@ -212,8 +221,76 @@ async function statusCommand() {
212
221
  console.log(`${pad("Daemon", VERSION_COL)}${daemonLabel}`);
213
222
  console.log(`${pad("Documents", VERSION_COL)}${docCount} files`);
214
223
  console.log(chalk.dim(` \u2192 Run "cf memory status" for details`));
215
- const globalConfig = readJson(globalConfigPath());
216
- const localConfig = readJson(localConfigPath());
224
+ console.log();
225
+ console.log(chalk.bold("\u{1F50C} MCP"));
226
+ try {
227
+ const localMcpPath = join(process.cwd(), ".mcp.json");
228
+ console.log(chalk.dim(" Memory MCP (coding-friend-memory)"));
229
+ let memIsDaemonRunning = async () => false;
230
+ const memMcpDir = (() => {
231
+ try {
232
+ return getLibPath("cf-memory");
233
+ } catch {
234
+ return null;
235
+ }
236
+ })();
237
+ const memoryDistPath = memMcpDir ? join(memMcpDir, "dist", "index.js") : "/unavailable";
238
+ if (memMcpDir) {
239
+ try {
240
+ const proc = await import(join(memMcpDir, "dist/daemon/process.js"));
241
+ memIsDaemonRunning = proc.isDaemonRunning;
242
+ } catch {
243
+ }
244
+ }
245
+ const memHealth = await checkMemoryMcpHealth({
246
+ readMcpJson: () => readJson(localMcpPath),
247
+ pathExists: existsSync,
248
+ isDaemonRunning: memIsDaemonRunning,
249
+ memoryDistPath
250
+ });
251
+ let memHasIssues = false;
252
+ for (const check of memHealth.checks) {
253
+ const indicator = check.ok ? chalk.green("\u2713") : check.warn ? chalk.yellow("\u26A0") : chalk.red("\u2717");
254
+ const detail = !check.ok && check.detail ? `: ${check.detail}` : "";
255
+ console.log(` ${indicator} ${pad(check.label, 20)}${detail}`);
256
+ if (!check.ok && !check.warn) memHasIssues = true;
257
+ }
258
+ if (memHasIssues) {
259
+ console.log(chalk.dim(` \u2192 Run "cf mcp" to fix`));
260
+ }
261
+ console.log();
262
+ console.log(chalk.dim(" Learn MCP (coding-friend-learn)"));
263
+ let learnMcpDir = null;
264
+ try {
265
+ learnMcpDir = getLibPath("learn-mcp");
266
+ } catch {
267
+ }
268
+ const learnMcpDistPath = learnMcpDir ? join(learnMcpDir, "dist", "index.js") : "/unavailable";
269
+ const docsDir = resolveDocsDir();
270
+ const learnHealth = await checkLearnMcpHealth({
271
+ readMcpJson: () => readJson(localMcpPath),
272
+ pathExists: existsSync,
273
+ listMdFiles: listMdFilesRecursive,
274
+ docsDir,
275
+ learnMcpDistPath
276
+ });
277
+ let learnHasIssues = false;
278
+ for (const check of learnHealth.checks) {
279
+ const indicator = check.ok ? chalk.green("\u2713") : check.warn ? chalk.yellow("\u26A0") : chalk.red("\u2717");
280
+ const detail = !check.ok && check.detail ? `: ${check.detail}` : "";
281
+ console.log(` ${indicator} ${pad(check.label, 20)}${detail}`);
282
+ if (!check.ok && !check.warn) learnHasIssues = true;
283
+ }
284
+ if (learnHasIssues) {
285
+ console.log(chalk.dim(` \u2192 Run "cf mcp" to fix`));
286
+ }
287
+ } catch {
288
+ console.log(`${pad("MCP", VERSION_COL)}${chalk.dim("unavailable")}`);
289
+ }
290
+ const rawGlobalConfig = readJson(globalConfigPath());
291
+ const rawLocalConfig = readJson(localConfigPath());
292
+ const globalConfig = rawGlobalConfig ? sanitizeRawConfig(rawGlobalConfig) : null;
293
+ const localConfig = rawLocalConfig ? sanitizeRawConfig(rawLocalConfig) : null;
217
294
  if (globalConfig && Object.keys(globalConfig).length > 0) {
218
295
  console.log();
219
296
  console.log(chalk.bold(`\u2699\uFE0F Config (global: ${globalConfigPath()})`));
@@ -8,10 +8,10 @@ import {
8
8
  saveStatuslineConfig,
9
9
  selectStatuslineComponents,
10
10
  writeStatuslineSettings
11
- } from "./chunk-XOHLBLN2.js";
11
+ } from "./chunk-LXZ47XCD.js";
12
12
  import {
13
13
  ALL_COMPONENT_IDS
14
- } from "./chunk-OYPOADCX.js";
14
+ } from "./chunk-DHH6SRXV.js";
15
15
  import "./chunk-TWKNGPBO.js";
16
16
  import {
17
17
  commandExists
@@ -4,9 +4,9 @@ import {
4
4
  getLatestVersion,
5
5
  semverCompare,
6
6
  updateCommand
7
- } from "./chunk-UGTNIFBH.js";
8
- import "./chunk-XOHLBLN2.js";
9
- import "./chunk-OYPOADCX.js";
7
+ } from "./chunk-G4QGJEV7.js";
8
+ import "./chunk-LXZ47XCD.js";
9
+ import "./chunk-DHH6SRXV.js";
10
10
  import "./chunk-DMJCO6LJ.js";
11
11
  import "./chunk-Z5Q533UG.js";
12
12
  import "./chunk-TWKNGPBO.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coding-friend-cli",
3
- "version": "1.33.1",
3
+ "version": "1.34.1",
4
4
  "description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,22 +0,0 @@
1
- import {
2
- buildCodexConfig,
3
- configCommand,
4
- editCodex
5
- } from "./chunk-OV4AUDXL.js";
6
- import "./chunk-NZKIYVIK.js";
7
- import "./chunk-LK6HFD35.js";
8
- import "./chunk-RZRT7NGT.js";
9
- import "./chunk-XOHLBLN2.js";
10
- import "./chunk-OYPOADCX.js";
11
- import "./chunk-DMJCO6LJ.js";
12
- import "./chunk-Z5Q533UG.js";
13
- import "./chunk-TWKNGPBO.js";
14
- import "./chunk-EVGXUDX4.js";
15
- import "./chunk-NREZK463.js";
16
- import "./chunk-O27FVQFU.js";
17
- import "./chunk-5UVDWG5L.js";
18
- export {
19
- buildCodexConfig,
20
- configCommand,
21
- editCodex
22
- };