coding-friend-cli 1.26.0 → 1.27.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.
- package/dist/{chunk-K2PSF7SF.js → chunk-BX3DRKTU.js} +7 -7
- package/dist/{chunk-HEBLANJO.js → chunk-JVYZ72EP.js} +81 -13
- package/dist/{chunk-WAFKFCAB.js → chunk-TOM2FI3W.js} +10 -10
- package/dist/{chunk-OARRVZL4.js → chunk-YCWRBOB3.js} +5 -5
- package/dist/{config-MSVSD3HA.js → config-N55LTJ76.js} +33 -20
- package/dist/{dev-KTEINOFU.js → dev-BSXR55PZ.js} +7 -7
- package/dist/{disable-7BVJGSIP.js → disable-CDOM7SSI.js} +3 -3
- package/dist/{enable-RO2FBKS6.js → enable-SF7742UR.js} +3 -3
- package/dist/{host-USZC44PR.js → host-JVLWYY5A.js} +2 -2
- package/dist/index.js +30 -30
- package/dist/{init-KPUEY6NC.js → init-QP57Q2C6.js} +43 -30
- package/dist/{install-65JCZGCB.js → install-G4XYNVL3.js} +6 -6
- package/dist/{mcp-V7PM4WTE.js → mcp-24NCFFAF.js} +5 -5
- package/dist/{memory-36YZTSSE.js → memory-HLMKDGWY.js} +5 -5
- package/dist/{permission-36BMHDYX.js → permission-K54DWLHN.js} +77 -10
- package/dist/permissions-O24R7WUU.js +37 -0
- package/dist/{session-CZ4ZJP7Q.js → session-DMQZXZ7F.js} +5 -5
- package/dist/{status-IJH4EZBG.js → status-K7TBUAXT.js} +16 -16
- package/dist/{statusline-PUPTHPBR.js → statusline-CDGADB3C.js} +2 -2
- package/dist/{uninstall-5MINSH35.js → uninstall-BOVKPNYN.js} +6 -6
- package/dist/{update-IO27DSZW.js → update-6M3YFHS6.js} +5 -5
- package/lib/cf-memory/README.md +2 -0
- package/lib/cf-memory/src/__tests__/claude-md.test.ts +238 -0
- package/lib/cf-memory/src/__tests__/status-frame.test.ts +136 -0
- package/lib/cf-memory/src/index.ts +9 -1
- package/lib/cf-memory/src/lib/claude-md.ts +217 -0
- package/lib/cf-memory/src/lib/status-frame.ts +63 -0
- package/lib/cf-memory/src/server.ts +9 -3
- package/lib/cf-memory/src/tools/delete.ts +12 -0
- package/lib/cf-memory/src/tools/store.ts +46 -10
- package/lib/cf-memory/src/tools/update.ts +54 -11
- package/lib/learn-mcp/package-lock.json +1385 -166
- package/lib/learn-mcp/package.json +5 -2
- package/lib/learn-mcp/src/__tests__/docs.test.ts +117 -0
- package/lib/learn-mcp/src/lib/docs.ts +23 -6
- package/lib/learn-mcp/src/tools/create-doc.ts +21 -9
- package/lib/learn-mcp/vitest.config.ts +8 -0
- package/package.json +1 -1
- package/dist/{chunk-KFNKH5Z7.js → chunk-2HQVNQB7.js} +3 -3
- package/dist/{chunk-3HTLOI34.js → chunk-GDZTU2Z4.js} +5 -5
- package/dist/{chunk-N2Q224HO.js → chunk-HPNRQYLM.js} +3 -3
- package/dist/{chunk-2TFHVNBI.js → chunk-R6HDMRYL.js} +4 -4
|
@@ -3,18 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-RZRT7NGT.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveMemoryDir
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2HQVNQB7.js";
|
|
7
7
|
import {
|
|
8
8
|
BACK,
|
|
9
9
|
askScope,
|
|
10
10
|
formatScopeLabel,
|
|
11
11
|
injectBackChoice
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
mergeJson,
|
|
15
|
-
readJson,
|
|
16
|
-
writeJson
|
|
17
|
-
} from "./chunk-5UVDWG5L.js";
|
|
12
|
+
} from "./chunk-HPNRQYLM.js";
|
|
18
13
|
import {
|
|
19
14
|
globalConfigPath,
|
|
20
15
|
localConfigPath
|
|
@@ -22,6 +17,11 @@ import {
|
|
|
22
17
|
import {
|
|
23
18
|
log
|
|
24
19
|
} from "./chunk-NREZK463.js";
|
|
20
|
+
import {
|
|
21
|
+
mergeJson,
|
|
22
|
+
readJson,
|
|
23
|
+
writeJson
|
|
24
|
+
} from "./chunk-5UVDWG5L.js";
|
|
25
25
|
|
|
26
26
|
// src/lib/memory-prompts.ts
|
|
27
27
|
import { existsSync } from "fs";
|
|
@@ -245,19 +245,6 @@ var STATIC_RULES = [
|
|
|
245
245
|
description: "[modify] Delete a memory \xB7 Used by: /cf-scan",
|
|
246
246
|
category: "MCP Memory",
|
|
247
247
|
recommended: true
|
|
248
|
-
},
|
|
249
|
-
// Web & Research
|
|
250
|
-
{
|
|
251
|
-
rule: "WebSearch",
|
|
252
|
-
description: "[network] Perform web searches \xB7 Used by: /cf-research",
|
|
253
|
-
category: "Web & Research",
|
|
254
|
-
recommended: false
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
rule: "WebFetch(domain:*)",
|
|
258
|
-
description: "[network] Fetch content from web pages \xB7 Used by: /cf-research",
|
|
259
|
-
category: "Web & Research",
|
|
260
|
-
recommended: false
|
|
261
248
|
}
|
|
262
249
|
];
|
|
263
250
|
var PLUGIN_CACHE_TILDE = "~/.claude/plugins/cache/coding-friend-marketplace/coding-friend";
|
|
@@ -294,6 +281,61 @@ function getAllRules() {
|
|
|
294
281
|
return [...STATIC_RULES, ...buildPluginScriptRules()];
|
|
295
282
|
}
|
|
296
283
|
var PERMISSION_RULES = getAllRules();
|
|
284
|
+
var DANGEROUS_RULE_PATTERNS = [
|
|
285
|
+
{ pattern: /^Bash\(\*\)$/, reason: "Grants execution of any shell command" },
|
|
286
|
+
{
|
|
287
|
+
pattern: /^Bash\(python\*?\)$/,
|
|
288
|
+
reason: "Grants arbitrary Python execution"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
pattern: /^Bash\(python3\*?\)$/,
|
|
292
|
+
reason: "Grants arbitrary Python3 execution"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
pattern: /^Bash\(node\*?\)$/,
|
|
296
|
+
reason: "Grants arbitrary Node.js execution"
|
|
297
|
+
},
|
|
298
|
+
{ pattern: /^Bash\(ruby\*?\)$/, reason: "Grants arbitrary Ruby execution" },
|
|
299
|
+
{ pattern: /^Bash\(perl\*?\)$/, reason: "Grants arbitrary Perl execution" },
|
|
300
|
+
{ pattern: /^Bash\(sh\*?\)$/, reason: "Grants arbitrary shell execution" },
|
|
301
|
+
{ pattern: /^Bash\(bash\*?\)$/, reason: "Grants arbitrary bash execution" },
|
|
302
|
+
// Note: Bash(bash /specific/path/*) is fine — only bare Bash(bash*) is dangerous
|
|
303
|
+
{
|
|
304
|
+
pattern: /^Bash\(npm run\*?\)$/,
|
|
305
|
+
reason: "Grants execution of any npm script"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
pattern: /^Bash\(npx\*?\)$/,
|
|
309
|
+
reason: "Grants execution of any npx package"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
pattern: /^Agent\(\*\)$/,
|
|
313
|
+
reason: "Grants unrestricted subagent delegation"
|
|
314
|
+
}
|
|
315
|
+
];
|
|
316
|
+
function auditDangerousRules(settingsPath) {
|
|
317
|
+
const existing = getExistingRules(settingsPath);
|
|
318
|
+
const matches = [];
|
|
319
|
+
for (const rule of existing) {
|
|
320
|
+
for (const { pattern, reason } of DANGEROUS_RULE_PATTERNS) {
|
|
321
|
+
if (pattern.test(rule)) {
|
|
322
|
+
matches.push({ rule, reason });
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return matches;
|
|
328
|
+
}
|
|
329
|
+
function stripDangerousRules(settingsPath) {
|
|
330
|
+
const dangerous = auditDangerousRules(settingsPath);
|
|
331
|
+
if (dangerous.length === 0) return 0;
|
|
332
|
+
applyPermissions(
|
|
333
|
+
settingsPath,
|
|
334
|
+
[],
|
|
335
|
+
dangerous.map((d) => d.rule)
|
|
336
|
+
);
|
|
337
|
+
return dangerous.length;
|
|
338
|
+
}
|
|
297
339
|
function getExistingRules(settingsPath) {
|
|
298
340
|
const settings = readJson(settingsPath);
|
|
299
341
|
if (!settings) return [];
|
|
@@ -378,6 +420,26 @@ function cleanupStalePluginRules(settingsPath) {
|
|
|
378
420
|
applyPermissions(settingsPath, [], stale);
|
|
379
421
|
return stale.length;
|
|
380
422
|
}
|
|
423
|
+
async function runDangerousRulesAudit(settingsPaths, log, promptConfirm) {
|
|
424
|
+
for (const sp of settingsPaths) {
|
|
425
|
+
const dangerous = auditDangerousRules(sp);
|
|
426
|
+
if (dangerous.length > 0) {
|
|
427
|
+
log.warn(`Found ${dangerous.length} dangerous rule(s) in ${sp}:`);
|
|
428
|
+
for (const d of dangerous) {
|
|
429
|
+
log.dim(` ${d.rule} \u2014 ${d.reason}`);
|
|
430
|
+
}
|
|
431
|
+
const shouldStrip = await promptConfirm(
|
|
432
|
+
"Remove these rules? They would bypass the auto-approve classifier."
|
|
433
|
+
);
|
|
434
|
+
if (shouldStrip) {
|
|
435
|
+
const count = stripDangerousRules(sp);
|
|
436
|
+
log.success(
|
|
437
|
+
`Removed ${count} dangerous rule(s). Restart Claude Code for changes to take effect.`
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
381
443
|
function logPluginScriptWarning(log, chalk) {
|
|
382
444
|
log.warn(
|
|
383
445
|
`Plugin script rules use ${chalk.bold("wide patterns")} that allow executing any script in the Coding Friend plugin cache.`
|
|
@@ -389,7 +451,12 @@ function logPluginScriptWarning(log, chalk) {
|
|
|
389
451
|
|
|
390
452
|
export {
|
|
391
453
|
STATIC_RULES,
|
|
454
|
+
buildPluginScriptRules,
|
|
392
455
|
getAllRules,
|
|
456
|
+
PERMISSION_RULES,
|
|
457
|
+
DANGEROUS_RULE_PATTERNS,
|
|
458
|
+
auditDangerousRules,
|
|
459
|
+
stripDangerousRules,
|
|
393
460
|
getExistingRules,
|
|
394
461
|
getMissingRules,
|
|
395
462
|
buildLearnDirRules,
|
|
@@ -397,5 +464,6 @@ export {
|
|
|
397
464
|
groupByCategory,
|
|
398
465
|
extractTag,
|
|
399
466
|
cleanupStalePluginRules,
|
|
467
|
+
runDangerousRulesAudit,
|
|
400
468
|
logPluginScriptWarning
|
|
401
469
|
};
|
|
@@ -7,24 +7,21 @@ import {
|
|
|
7
7
|
getMemoryMcpStatus,
|
|
8
8
|
memoryConfigMenu,
|
|
9
9
|
writeMemoryMcpEntry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BX3DRKTU.js";
|
|
11
11
|
import {
|
|
12
12
|
getLibPath
|
|
13
13
|
} from "./chunk-RZRT7NGT.js";
|
|
14
14
|
import {
|
|
15
15
|
loadConfig,
|
|
16
16
|
resolveMemoryDir
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2HQVNQB7.js";
|
|
18
18
|
import {
|
|
19
19
|
showConfigHint
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-HPNRQYLM.js";
|
|
21
21
|
import {
|
|
22
22
|
run,
|
|
23
23
|
runWithStderr
|
|
24
24
|
} from "./chunk-EVGXUDX4.js";
|
|
25
|
-
import {
|
|
26
|
-
readJson
|
|
27
|
-
} from "./chunk-5UVDWG5L.js";
|
|
28
25
|
import {
|
|
29
26
|
globalConfigPath,
|
|
30
27
|
localConfigPath
|
|
@@ -33,6 +30,9 @@ import {
|
|
|
33
30
|
log,
|
|
34
31
|
printBanner
|
|
35
32
|
} from "./chunk-NREZK463.js";
|
|
33
|
+
import {
|
|
34
|
+
readJson
|
|
35
|
+
} from "./chunk-5UVDWG5L.js";
|
|
36
36
|
|
|
37
37
|
// src/commands/memory.ts
|
|
38
38
|
import { existsSync, readdirSync, statSync, rmSync } from "fs";
|
|
@@ -258,8 +258,8 @@ async function memorySearchCommand(query) {
|
|
|
258
258
|
[
|
|
259
259
|
"-e",
|
|
260
260
|
`
|
|
261
|
-
import { MarkdownBackend } from
|
|
262
|
-
const backend = new MarkdownBackend(
|
|
261
|
+
import { MarkdownBackend } from ${JSON.stringify(join(mcpDir, "dist/backends/markdown.js"))};
|
|
262
|
+
const backend = new MarkdownBackend(${JSON.stringify(memoryDir)});
|
|
263
263
|
const results = await backend.search({ query: process.env.CF_SEARCH_QUERY, limit: 10 });
|
|
264
264
|
for (const r of results) {
|
|
265
265
|
console.log(\`[\${r.score}] \${r.memory.frontmatter.title}\`);
|
|
@@ -298,8 +298,8 @@ async function memoryListCommand(opts) {
|
|
|
298
298
|
[
|
|
299
299
|
"-e",
|
|
300
300
|
`
|
|
301
|
-
import { MarkdownBackend } from
|
|
302
|
-
const backend = new MarkdownBackend(
|
|
301
|
+
import { MarkdownBackend } from ${JSON.stringify(join(mcpDir, "dist/backends/markdown.js"))};
|
|
302
|
+
const backend = new MarkdownBackend(${JSON.stringify(memoryDir)});
|
|
303
303
|
const metas = await backend.list({});
|
|
304
304
|
if (metas.length === 0) { console.log("No memories found."); process.exit(0); }
|
|
305
305
|
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureStatusline,
|
|
3
3
|
getInstalledVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GDZTU2Z4.js";
|
|
5
5
|
import {
|
|
6
6
|
ensureShellCompletion
|
|
7
7
|
} from "./chunk-DMJCO6LJ.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveScope
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HPNRQYLM.js";
|
|
11
11
|
import {
|
|
12
12
|
commandExists,
|
|
13
13
|
run,
|
|
14
14
|
runWithStderr,
|
|
15
15
|
sleepSync
|
|
16
16
|
} from "./chunk-EVGXUDX4.js";
|
|
17
|
-
import {
|
|
18
|
-
readJson
|
|
19
|
-
} from "./chunk-5UVDWG5L.js";
|
|
20
17
|
import {
|
|
21
18
|
claudeSettingsPath
|
|
22
19
|
} from "./chunk-TWKNGPBO.js";
|
|
@@ -24,6 +21,9 @@ import {
|
|
|
24
21
|
log,
|
|
25
22
|
printBanner
|
|
26
23
|
} from "./chunk-NREZK463.js";
|
|
24
|
+
import {
|
|
25
|
+
readJson
|
|
26
|
+
} from "./chunk-5UVDWG5L.js";
|
|
27
27
|
|
|
28
28
|
// src/commands/update.ts
|
|
29
29
|
import { readFileSync } from "fs";
|
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
memoryConfigMenu
|
|
3
|
+
} from "./chunk-BX3DRKTU.js";
|
|
4
|
+
import "./chunk-RZRT7NGT.js";
|
|
5
|
+
import "./chunk-2HQVNQB7.js";
|
|
5
6
|
import {
|
|
6
7
|
findStatuslineHookPath,
|
|
7
8
|
isStatuslineConfigured,
|
|
8
9
|
saveStatuslineConfig,
|
|
9
10
|
selectStatuslineComponents,
|
|
10
11
|
writeStatuslineSettings
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GDZTU2Z4.js";
|
|
13
|
+
import {
|
|
14
|
+
ALL_COMPONENT_IDS,
|
|
15
|
+
DEFAULT_CONFIG
|
|
16
|
+
} from "./chunk-PRIH34UB.js";
|
|
12
17
|
import {
|
|
13
18
|
ensureShellCompletion,
|
|
14
19
|
hasShellCompletion,
|
|
15
20
|
removeShellCompletion
|
|
16
21
|
} from "./chunk-DMJCO6LJ.js";
|
|
17
|
-
import {
|
|
18
|
-
memoryConfigMenu
|
|
19
|
-
} from "./chunk-K2PSF7SF.js";
|
|
20
|
-
import "./chunk-RZRT7NGT.js";
|
|
21
|
-
import "./chunk-KFNKH5Z7.js";
|
|
22
|
-
import {
|
|
23
|
-
ALL_COMPONENT_IDS,
|
|
24
|
-
DEFAULT_CONFIG
|
|
25
|
-
} from "./chunk-PRIH34UB.js";
|
|
26
22
|
import {
|
|
27
23
|
BACK,
|
|
28
24
|
applyDocsDirChange,
|
|
@@ -32,16 +28,13 @@ import {
|
|
|
32
28
|
getScopeLabel,
|
|
33
29
|
injectBackChoice,
|
|
34
30
|
showConfigHint
|
|
35
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HPNRQYLM.js";
|
|
36
32
|
import {
|
|
37
33
|
run
|
|
38
34
|
} from "./chunk-EVGXUDX4.js";
|
|
39
|
-
import {
|
|
40
|
-
mergeJson,
|
|
41
|
-
readJson
|
|
42
|
-
} from "./chunk-5UVDWG5L.js";
|
|
43
35
|
import {
|
|
44
36
|
claudeLocalSettingsPath,
|
|
37
|
+
claudeProjectSettingsPath,
|
|
45
38
|
claudeSettingsPath,
|
|
46
39
|
globalConfigPath,
|
|
47
40
|
localConfigPath,
|
|
@@ -51,6 +44,14 @@ import {
|
|
|
51
44
|
log,
|
|
52
45
|
printBanner
|
|
53
46
|
} from "./chunk-NREZK463.js";
|
|
47
|
+
import {
|
|
48
|
+
getAllRules,
|
|
49
|
+
getExistingRules
|
|
50
|
+
} from "./chunk-JVYZ72EP.js";
|
|
51
|
+
import {
|
|
52
|
+
mergeJson,
|
|
53
|
+
readJson
|
|
54
|
+
} from "./chunk-5UVDWG5L.js";
|
|
54
55
|
|
|
55
56
|
// src/commands/config.ts
|
|
56
57
|
import { checkbox, confirm, input, select } from "@inquirer/prompts";
|
|
@@ -385,12 +386,24 @@ async function editAutoApprove(globalCfg, localCfg) {
|
|
|
385
386
|
log.dim(`Current: ${currentValue}`);
|
|
386
387
|
}
|
|
387
388
|
const value = await confirm({
|
|
388
|
-
message: "Enable auto-approve? (auto-approves
|
|
389
|
+
message: "Enable auto-approve? (auto-approves read-only tools + working-dir file edits, LLM classifier for unknowns)",
|
|
389
390
|
default: currentValue ?? false
|
|
390
391
|
});
|
|
391
392
|
const scope = await askScope();
|
|
392
393
|
if (scope === "back") return;
|
|
393
394
|
writeToScope(scope, { autoApprove: value });
|
|
395
|
+
if (value) {
|
|
396
|
+
const { runDangerousRulesAudit } = await import("./permissions-O24R7WUU.js");
|
|
397
|
+
await runDangerousRulesAudit(
|
|
398
|
+
[
|
|
399
|
+
claudeProjectSettingsPath(),
|
|
400
|
+
claudeLocalSettingsPath(),
|
|
401
|
+
claudeSettingsPath()
|
|
402
|
+
],
|
|
403
|
+
log,
|
|
404
|
+
(message) => confirm({ message, default: true })
|
|
405
|
+
);
|
|
406
|
+
}
|
|
394
407
|
}
|
|
395
408
|
async function editStatusline() {
|
|
396
409
|
const hookResult = findStatuslineHookPath();
|
|
@@ -557,7 +570,7 @@ async function editPermissions() {
|
|
|
557
570
|
)
|
|
558
571
|
});
|
|
559
572
|
if (choice === BACK) return;
|
|
560
|
-
const { permissionCommand } = await import("./permission-
|
|
573
|
+
const { permissionCommand } = await import("./permission-K54DWLHN.js");
|
|
561
574
|
switch (choice) {
|
|
562
575
|
case "interactive":
|
|
563
576
|
await permissionCommand({});
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureStatusline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GDZTU2Z4.js";
|
|
4
|
+
import "./chunk-PRIH34UB.js";
|
|
4
5
|
import {
|
|
5
6
|
ensureShellCompletion
|
|
6
7
|
} from "./chunk-DMJCO6LJ.js";
|
|
7
8
|
import {
|
|
8
9
|
isMarketplaceRegistered,
|
|
9
10
|
isPluginInstalled
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-PRIH34UB.js";
|
|
11
|
+
} from "./chunk-R6HDMRYL.js";
|
|
12
12
|
import {
|
|
13
13
|
commandExists,
|
|
14
14
|
run
|
|
15
15
|
} from "./chunk-EVGXUDX4.js";
|
|
16
|
-
import {
|
|
17
|
-
readJson,
|
|
18
|
-
writeJson
|
|
19
|
-
} from "./chunk-5UVDWG5L.js";
|
|
20
16
|
import {
|
|
21
17
|
devStatePath,
|
|
22
18
|
knownMarketplacesPath,
|
|
@@ -26,6 +22,10 @@ import {
|
|
|
26
22
|
log,
|
|
27
23
|
printBanner
|
|
28
24
|
} from "./chunk-NREZK463.js";
|
|
25
|
+
import {
|
|
26
|
+
readJson,
|
|
27
|
+
writeJson
|
|
28
|
+
} from "./chunk-5UVDWG5L.js";
|
|
29
29
|
|
|
30
30
|
// src/commands/dev.ts
|
|
31
31
|
import {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPluginDisabled,
|
|
3
3
|
setPluginEnabled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R6HDMRYL.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveScope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HPNRQYLM.js";
|
|
8
8
|
import "./chunk-EVGXUDX4.js";
|
|
9
|
-
import "./chunk-5UVDWG5L.js";
|
|
10
9
|
import "./chunk-TWKNGPBO.js";
|
|
11
10
|
import {
|
|
12
11
|
log
|
|
13
12
|
} from "./chunk-NREZK463.js";
|
|
13
|
+
import "./chunk-5UVDWG5L.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/disable.ts
|
|
16
16
|
import chalk from "chalk";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPluginDisabled,
|
|
3
3
|
setPluginEnabled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R6HDMRYL.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveScope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HPNRQYLM.js";
|
|
8
8
|
import "./chunk-EVGXUDX4.js";
|
|
9
|
-
import "./chunk-5UVDWG5L.js";
|
|
10
9
|
import "./chunk-TWKNGPBO.js";
|
|
11
10
|
import {
|
|
12
11
|
log
|
|
13
12
|
} from "./chunk-NREZK463.js";
|
|
13
|
+
import "./chunk-5UVDWG5L.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/enable.ts
|
|
16
16
|
import chalk from "chalk";
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
} from "./chunk-RZRT7NGT.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveDocsDir
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2HQVNQB7.js";
|
|
7
7
|
import "./chunk-PRIH34UB.js";
|
|
8
8
|
import {
|
|
9
9
|
run,
|
|
10
10
|
streamExec
|
|
11
11
|
} from "./chunk-EVGXUDX4.js";
|
|
12
|
-
import "./chunk-5UVDWG5L.js";
|
|
13
12
|
import "./chunk-TWKNGPBO.js";
|
|
14
13
|
import {
|
|
15
14
|
log,
|
|
16
15
|
printBanner
|
|
17
16
|
} from "./chunk-NREZK463.js";
|
|
17
|
+
import "./chunk-5UVDWG5L.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/host.ts
|
|
20
20
|
import { existsSync, readdirSync } from "fs";
|
package/dist/index.js
CHANGED
|
@@ -14,54 +14,54 @@ program.name("cf").description(
|
|
|
14
14
|
"coding-friend CLI \u2014 host learning docs, setup MCP, init projects"
|
|
15
15
|
).version(pkg.version, "-v, --version");
|
|
16
16
|
program.command("install").description("Install the Coding Friend plugin into Claude Code").option("--user", "Install at user scope (all projects)").option("--global", "Install at user scope (all projects)").option("--project", "Install at project scope (shared via git)").option("--local", "Install at local scope (this machine only)").action(async (opts) => {
|
|
17
|
-
const { installCommand } = await import("./install-
|
|
17
|
+
const { installCommand } = await import("./install-G4XYNVL3.js");
|
|
18
18
|
await installCommand(opts);
|
|
19
19
|
});
|
|
20
20
|
program.command("uninstall").description("Uninstall the Coding Friend plugin from Claude Code").option("--user", "Uninstall from user scope (all projects)").option("--global", "Uninstall from user scope (all projects)").option("--project", "Uninstall from project scope").option("--local", "Uninstall from local scope").action(async (opts) => {
|
|
21
|
-
const { uninstallCommand } = await import("./uninstall-
|
|
21
|
+
const { uninstallCommand } = await import("./uninstall-BOVKPNYN.js");
|
|
22
22
|
await uninstallCommand(opts);
|
|
23
23
|
});
|
|
24
24
|
program.command("disable").description("Disable the Coding Friend plugin without uninstalling").option("--user", "Disable at user scope (all projects)").option("--global", "Disable at user scope (all projects)").option("--project", "Disable at project scope").option("--local", "Disable at local scope").action(async (opts) => {
|
|
25
|
-
const { disableCommand } = await import("./disable-
|
|
25
|
+
const { disableCommand } = await import("./disable-CDOM7SSI.js");
|
|
26
26
|
await disableCommand(opts);
|
|
27
27
|
});
|
|
28
28
|
program.command("enable").description("Re-enable the Coding Friend plugin").option("--user", "Enable at user scope (all projects)").option("--global", "Enable at user scope (all projects)").option("--project", "Enable at project scope").option("--local", "Enable at local scope").action(async (opts) => {
|
|
29
|
-
const { enableCommand } = await import("./enable-
|
|
29
|
+
const { enableCommand } = await import("./enable-SF7742UR.js");
|
|
30
30
|
await enableCommand(opts);
|
|
31
31
|
});
|
|
32
32
|
program.command("init").description("Initialize coding-friend in current project").action(async () => {
|
|
33
|
-
const { initCommand } = await import("./init-
|
|
33
|
+
const { initCommand } = await import("./init-QP57Q2C6.js");
|
|
34
34
|
await initCommand();
|
|
35
35
|
});
|
|
36
36
|
program.command("config").description("Manage Coding Friend configuration").action(async () => {
|
|
37
|
-
const { configCommand } = await import("./config-
|
|
37
|
+
const { configCommand } = await import("./config-N55LTJ76.js");
|
|
38
38
|
await configCommand();
|
|
39
39
|
});
|
|
40
40
|
program.command("host").description("Build and serve learning docs as a static website").argument("[path]", "path to docs folder").option("-p, --port <port>", "port number", "3333").action(async (path, opts) => {
|
|
41
|
-
const { hostCommand } = await import("./host-
|
|
41
|
+
const { hostCommand } = await import("./host-JVLWYY5A.js");
|
|
42
42
|
await hostCommand(path, opts);
|
|
43
43
|
});
|
|
44
44
|
program.command("mcp").description("Setup MCP server for learning docs").argument("[path]", "path to docs folder").action(async (path) => {
|
|
45
|
-
const { mcpCommand } = await import("./mcp-
|
|
45
|
+
const { mcpCommand } = await import("./mcp-24NCFFAF.js");
|
|
46
46
|
await mcpCommand(path);
|
|
47
47
|
});
|
|
48
48
|
program.command("permission").description("Manage Claude Code permission rules for Coding Friend").option("--all", "Apply all recommended permissions without prompts").option("--user", "Save to user-level settings (~/.claude/settings.json)").option(
|
|
49
49
|
"--project",
|
|
50
50
|
"Save to project-level settings (.claude/settings.local.json)"
|
|
51
51
|
).action(async (opts) => {
|
|
52
|
-
const { permissionCommand } = await import("./permission-
|
|
52
|
+
const { permissionCommand } = await import("./permission-K54DWLHN.js");
|
|
53
53
|
await permissionCommand(opts);
|
|
54
54
|
});
|
|
55
55
|
program.command("statusline").description("Setup coding-friend statusline in Claude Code").action(async () => {
|
|
56
|
-
const { statuslineCommand } = await import("./statusline-
|
|
56
|
+
const { statuslineCommand } = await import("./statusline-CDGADB3C.js");
|
|
57
57
|
await statuslineCommand();
|
|
58
58
|
});
|
|
59
59
|
program.command("update").description("Update coding-friend plugin, CLI, and statusline").option("--cli", "Update only the CLI (npm package)").option("--plugin", "Update only the Claude Code plugin").option("--statusline", "Update only the statusline").option("--user", "Update plugin at user scope (all projects)").option("--global", "Update plugin at user scope (all projects)").option("--project", "Update plugin at project scope").option("--local", "Update plugin at local scope").action(async (opts) => {
|
|
60
|
-
const { updateCommand } = await import("./update-
|
|
60
|
+
const { updateCommand } = await import("./update-6M3YFHS6.js");
|
|
61
61
|
await updateCommand(opts);
|
|
62
62
|
});
|
|
63
63
|
program.command("status").description("Show comprehensive Coding Friend status").action(async () => {
|
|
64
|
-
const { statusCommand } = await import("./status-
|
|
64
|
+
const { statusCommand } = await import("./status-K7TBUAXT.js");
|
|
65
65
|
await statusCommand();
|
|
66
66
|
});
|
|
67
67
|
var session = program.command("session").description("Save and load Claude Code sessions across machines");
|
|
@@ -76,11 +76,11 @@ session.command("save").description("Save current Claude Code session to sync fo
|
|
|
76
76
|
"-s, --session-id <id>",
|
|
77
77
|
"session UUID to save (default: auto-detect newest)"
|
|
78
78
|
).option("-l, --label <label>", "label for this session").action(async (opts) => {
|
|
79
|
-
const { sessionSaveCommand } = await import("./session-
|
|
79
|
+
const { sessionSaveCommand } = await import("./session-DMQZXZ7F.js");
|
|
80
80
|
await sessionSaveCommand(opts);
|
|
81
81
|
});
|
|
82
82
|
session.command("load").description("Load a saved session from sync folder").action(async () => {
|
|
83
|
-
const { sessionLoadCommand } = await import("./session-
|
|
83
|
+
const { sessionLoadCommand } = await import("./session-DMQZXZ7F.js");
|
|
84
84
|
await sessionLoadCommand();
|
|
85
85
|
});
|
|
86
86
|
var memory = program.command("memory").description("AI memory system \u2014 store and search project knowledge");
|
|
@@ -100,43 +100,43 @@ Memory subcommands:
|
|
|
100
100
|
memory mcp Show MCP server setup instructions`
|
|
101
101
|
);
|
|
102
102
|
memory.command("status").description("Show memory system status").action(async () => {
|
|
103
|
-
const { memoryStatusCommand } = await import("./memory-
|
|
103
|
+
const { memoryStatusCommand } = await import("./memory-HLMKDGWY.js");
|
|
104
104
|
await memoryStatusCommand();
|
|
105
105
|
});
|
|
106
106
|
memory.command("search").description("Search memories by query").argument("<query>", "search query").action(async (query) => {
|
|
107
|
-
const { memorySearchCommand } = await import("./memory-
|
|
107
|
+
const { memorySearchCommand } = await import("./memory-HLMKDGWY.js");
|
|
108
108
|
await memorySearchCommand(query);
|
|
109
109
|
});
|
|
110
110
|
memory.command("list").description(
|
|
111
111
|
"List memories in current project, or all projects with --projects"
|
|
112
112
|
).option("--projects", "List all project databases with size and metadata").action(async (opts) => {
|
|
113
|
-
const { memoryListCommand } = await import("./memory-
|
|
113
|
+
const { memoryListCommand } = await import("./memory-HLMKDGWY.js");
|
|
114
114
|
await memoryListCommand(opts);
|
|
115
115
|
});
|
|
116
116
|
memory.command("init").description(
|
|
117
117
|
"Initialize memory system \u2014 interactive wizard (first time) or config menu"
|
|
118
118
|
).action(async () => {
|
|
119
|
-
const { memoryInitCommand } = await import("./memory-
|
|
119
|
+
const { memoryInitCommand } = await import("./memory-HLMKDGWY.js");
|
|
120
120
|
await memoryInitCommand();
|
|
121
121
|
});
|
|
122
122
|
memory.command("config").description("Configure memory system settings").action(async () => {
|
|
123
|
-
const { memoryConfigCommand } = await import("./memory-
|
|
123
|
+
const { memoryConfigCommand } = await import("./memory-HLMKDGWY.js");
|
|
124
124
|
await memoryConfigCommand();
|
|
125
125
|
});
|
|
126
126
|
memory.command("start-daemon").description("Start the memory daemon (Tier 2 \u2014 MiniSearch)").action(async () => {
|
|
127
|
-
const { memoryStartDaemonCommand } = await import("./memory-
|
|
127
|
+
const { memoryStartDaemonCommand } = await import("./memory-HLMKDGWY.js");
|
|
128
128
|
await memoryStartDaemonCommand();
|
|
129
129
|
});
|
|
130
130
|
memory.command("stop-daemon").description("Stop the memory daemon").action(async () => {
|
|
131
|
-
const { memoryStopDaemonCommand } = await import("./memory-
|
|
131
|
+
const { memoryStopDaemonCommand } = await import("./memory-HLMKDGWY.js");
|
|
132
132
|
await memoryStopDaemonCommand();
|
|
133
133
|
});
|
|
134
134
|
memory.command("rebuild").description("Rebuild the daemon search index").action(async () => {
|
|
135
|
-
const { memoryRebuildCommand } = await import("./memory-
|
|
135
|
+
const { memoryRebuildCommand } = await import("./memory-HLMKDGWY.js");
|
|
136
136
|
await memoryRebuildCommand();
|
|
137
137
|
});
|
|
138
138
|
memory.command("mcp").description("Show MCP server setup instructions").action(async () => {
|
|
139
|
-
const { memoryMcpCommand } = await import("./memory-
|
|
139
|
+
const { memoryMcpCommand } = await import("./memory-HLMKDGWY.js");
|
|
140
140
|
await memoryMcpCommand();
|
|
141
141
|
});
|
|
142
142
|
memory.command("rm").description("Remove a project database").option("--project-id <id>", "Project ID to remove").option("--all", "Remove all project databases").option(
|
|
@@ -144,7 +144,7 @@ memory.command("rm").description("Remove a project database").option("--project-
|
|
|
144
144
|
"Remove orphaned projects (source dir missing or 0 memories)"
|
|
145
145
|
).action(
|
|
146
146
|
async (opts) => {
|
|
147
|
-
const { memoryRmCommand } = await import("./memory-
|
|
147
|
+
const { memoryRmCommand } = await import("./memory-HLMKDGWY.js");
|
|
148
148
|
await memoryRmCommand(opts);
|
|
149
149
|
}
|
|
150
150
|
);
|
|
@@ -161,35 +161,35 @@ Dev subcommands:
|
|
|
161
161
|
dev update [path] Update local dev plugin to latest version`
|
|
162
162
|
);
|
|
163
163
|
dev.command("on").description("Switch to local plugin source").argument("[path]", "path to local coding-friend repo (default: cwd)").action(async (path) => {
|
|
164
|
-
const { devOnCommand } = await import("./dev-
|
|
164
|
+
const { devOnCommand } = await import("./dev-BSXR55PZ.js");
|
|
165
165
|
await devOnCommand(path);
|
|
166
166
|
});
|
|
167
167
|
dev.command("off").description("Switch back to remote marketplace").action(async () => {
|
|
168
|
-
const { devOffCommand } = await import("./dev-
|
|
168
|
+
const { devOffCommand } = await import("./dev-BSXR55PZ.js");
|
|
169
169
|
await devOffCommand();
|
|
170
170
|
});
|
|
171
171
|
dev.command("status").description("Show current dev mode").action(async () => {
|
|
172
|
-
const { devStatusCommand } = await import("./dev-
|
|
172
|
+
const { devStatusCommand } = await import("./dev-BSXR55PZ.js");
|
|
173
173
|
await devStatusCommand();
|
|
174
174
|
});
|
|
175
175
|
dev.command("sync").description(
|
|
176
176
|
"Copy local source files to plugin cache (no version bump needed)"
|
|
177
177
|
).action(async () => {
|
|
178
|
-
const { devSyncCommand } = await import("./dev-
|
|
178
|
+
const { devSyncCommand } = await import("./dev-BSXR55PZ.js");
|
|
179
179
|
await devSyncCommand();
|
|
180
180
|
});
|
|
181
181
|
dev.command("restart").description("Reinstall local dev plugin (off + on)").argument(
|
|
182
182
|
"[path]",
|
|
183
183
|
"path to local coding-friend repo (default: saved path or cwd)"
|
|
184
184
|
).action(async (path) => {
|
|
185
|
-
const { devRestartCommand } = await import("./dev-
|
|
185
|
+
const { devRestartCommand } = await import("./dev-BSXR55PZ.js");
|
|
186
186
|
await devRestartCommand(path);
|
|
187
187
|
});
|
|
188
188
|
dev.command("update").description("Update local dev plugin to latest version (off + on)").argument(
|
|
189
189
|
"[path]",
|
|
190
190
|
"path to local coding-friend repo (default: saved path or cwd)"
|
|
191
191
|
).action(async (path) => {
|
|
192
|
-
const { devUpdateCommand } = await import("./dev-
|
|
192
|
+
const { devUpdateCommand } = await import("./dev-BSXR55PZ.js");
|
|
193
193
|
await devUpdateCommand(path);
|
|
194
194
|
});
|
|
195
195
|
program.hook("postAction", async () => {
|