coding-friend-cli 1.35.8 → 1.36.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/README.md +5 -3
- package/dist/{chunk-HA7E7QZ4.js → chunk-2MOPHSMC.js} +16 -11
- package/dist/{chunk-RLUNNJWJ.js → chunk-667NMPN4.js} +47 -4
- package/dist/{chunk-UIPLDRGI.js → chunk-76GDRS54.js} +11 -7
- package/dist/{chunk-UCYGDDFS.js → chunk-7SMP5CZ4.js} +6 -6
- package/dist/{chunk-R6HDMRYL.js → chunk-GZT3YPAP.js} +5 -5
- package/dist/{chunk-ASNR6LFD.js → chunk-HF7Y63JR.js} +36 -16
- package/dist/{chunk-UXIWEBI2.js → chunk-HILXDUVZ.js} +4 -4
- package/dist/{chunk-TAPL6NF3.js → chunk-IKLMHJH6.js} +4 -4
- package/dist/{chunk-O27FVQFU.js → chunk-O5ZKLFSL.js} +6 -4
- package/dist/{chunk-TWKNGPBO.js → chunk-X2H7JJMR.js} +15 -10
- package/dist/{chunk-WSUYLIYX.js → chunk-YIXAQ4R2.js} +1 -1
- package/dist/{chunk-5Z5TZUHZ.js → chunk-YOXXIXMQ.js} +5 -17
- package/dist/{clean-PAYOM4FV.js → clean-HOVZN7PF.js} +23 -24
- package/dist/{config-NPKT6NN3.js → config-NG46PYON.js} +17 -17
- package/dist/{dev-MD5TNAKI.js → dev-GKD52XE6.js} +8 -8
- package/dist/{disable-5UK4QINT.js → disable-HL5OEURT.js} +4 -4
- package/dist/{enable-UQZNZRPI.js → enable-CZIOCKKJ.js} +4 -4
- package/dist/{guide-LQ2BHU5Y.js → guide-CO2V4ZLZ.js} +4 -4
- package/dist/{host-DKGDDAGO.js → host-SN27RONR.js} +10 -5
- package/dist/index.js +52 -36
- package/dist/{init-ZIUTSR4U.js → init-ZEGE7T5H.js} +28 -28
- package/dist/{install-VFD6C3LZ.js → install-H5VELYYZ.js} +7 -7
- package/dist/learn-27FL56ZT.js +111 -0
- package/dist/{mcp-T3UG4PS3.js → mcp-4ODYPJ4N.js} +16 -16
- package/dist/{mcp-serve-learn-OKVC5WV3.js → mcp-serve-learn-OF3ZJUJC.js} +4 -4
- package/dist/{memory-R57VRQZL.js → memory-5U6GGTVI.js} +11 -9
- package/dist/{permission-KLT2TLZY.js → permission-I3OFJUYA.js} +17 -17
- package/dist/{permissions-LYADLYYK.js → permissions-J46VP6US.js} +2 -1
- package/dist/postinstall.js +1 -1
- package/dist/{session-MVH6IYHM.js → session-YIQMX4BQ.js} +6 -6
- package/dist/{status-YWABL222.js → status-EAVPCBVN.js} +18 -18
- package/dist/{statusline-EYTWM5X6.js → statusline-WDTN3OI4.js} +3 -3
- package/dist/{uninstall-MLSKOCOZ.js → uninstall-ASLHT3MH.js} +8 -8
- package/dist/{update-G5YXZRMQ.js → update-DHY2EIY6.js} +6 -6
- package/dist/{update-check-BPCQ25AR.js → update-check-25SCLHZO.js} +1 -1
- package/lib/learn-host/README.md +8 -9
- package/lib/learn-host/src/components/Breadcrumbs.tsx +30 -19
- package/package.json +1 -1
- package/lib/learn-host/tsconfig.tsbuildinfo +0 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getLatestVersion,
|
|
3
3
|
semverCompare
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-76GDRS54.js";
|
|
5
5
|
import {
|
|
6
6
|
getInstalledVersion
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7SMP5CZ4.js";
|
|
8
8
|
import "./chunk-57EGAXYI.js";
|
|
9
9
|
import {
|
|
10
10
|
ensureShellCompletion
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-667NMPN4.js";
|
|
12
12
|
import {
|
|
13
13
|
enableMarketplaceAutoUpdate,
|
|
14
14
|
isMarketplaceRegistered,
|
|
15
15
|
isPluginDisabled
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GZT3YPAP.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveScope
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IKLMHJH6.js";
|
|
20
20
|
import {
|
|
21
21
|
commandExists,
|
|
22
22
|
run
|
|
23
23
|
} from "./chunk-EVGXUDX4.js";
|
|
24
|
+
import "./chunk-5UVDWG5L.js";
|
|
24
25
|
import {
|
|
25
26
|
devStatePath
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-X2H7JJMR.js";
|
|
27
28
|
import {
|
|
28
29
|
log,
|
|
29
30
|
printBanner
|
|
30
31
|
} from "./chunk-NREZK463.js";
|
|
31
|
-
import "./chunk-5UVDWG5L.js";
|
|
32
32
|
|
|
33
33
|
// src/commands/install.ts
|
|
34
34
|
import { existsSync } from "fs";
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveLearnDir
|
|
3
|
+
} from "./chunk-YOXXIXMQ.js";
|
|
4
|
+
import "./chunk-57EGAXYI.js";
|
|
5
|
+
import {
|
|
6
|
+
commandExists,
|
|
7
|
+
run,
|
|
8
|
+
runWithStderr,
|
|
9
|
+
streamExec
|
|
10
|
+
} from "./chunk-EVGXUDX4.js";
|
|
11
|
+
import {
|
|
12
|
+
readJson
|
|
13
|
+
} from "./chunk-5UVDWG5L.js";
|
|
14
|
+
import {
|
|
15
|
+
globalConfigPath
|
|
16
|
+
} from "./chunk-X2H7JJMR.js";
|
|
17
|
+
import {
|
|
18
|
+
log,
|
|
19
|
+
printBanner
|
|
20
|
+
} from "./chunk-NREZK463.js";
|
|
21
|
+
|
|
22
|
+
// src/commands/learn.ts
|
|
23
|
+
import { existsSync } from "fs";
|
|
24
|
+
import { resolve } from "path";
|
|
25
|
+
import { confirm } from "@inquirer/prompts";
|
|
26
|
+
async function learnPushCommand(path) {
|
|
27
|
+
const globalCfg = readJson(globalConfigPath());
|
|
28
|
+
const learnDir = resolveLearnDir(globalCfg, path);
|
|
29
|
+
printBanner("\u2728 Coding Friend Learn Push \u2728");
|
|
30
|
+
if (!existsSync(learnDir)) {
|
|
31
|
+
log.error(`Learn folder not found: ${learnDir}`);
|
|
32
|
+
log.dim("Run /cf-learn first to generate some docs.");
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
if (!commandExists("git")) {
|
|
36
|
+
log.error("git is not installed or not on PATH.");
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
const top = run("git", ["rev-parse", "--show-toplevel"], { cwd: learnDir });
|
|
40
|
+
if (top === null) {
|
|
41
|
+
log.error(`Learn folder is not inside a git repository: ${learnDir}`);
|
|
42
|
+
log.dim("Initialize a git repo there, or push it manually.");
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
const gitRoot = resolve(top);
|
|
46
|
+
const resolvedLearnDir = resolve(learnDir);
|
|
47
|
+
const isGitRoot = gitRoot === resolvedLearnDir;
|
|
48
|
+
log.info(`Learn folder: ${resolvedLearnDir}`);
|
|
49
|
+
log.info(`Git root: ${gitRoot}`);
|
|
50
|
+
console.log();
|
|
51
|
+
if (!isGitRoot) {
|
|
52
|
+
log.warn(
|
|
53
|
+
"The learn folder is NOT the root of its git repository \u2014 it lives inside a larger repo."
|
|
54
|
+
);
|
|
55
|
+
log.warn(
|
|
56
|
+
"Pushing will commit and push EVERYTHING in that repo, not just the learn folder."
|
|
57
|
+
);
|
|
58
|
+
const proceed = await confirm({
|
|
59
|
+
message: "Continue anyway?",
|
|
60
|
+
default: false
|
|
61
|
+
});
|
|
62
|
+
if (!proceed) {
|
|
63
|
+
log.dim("Aborted.");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const remotes = run("git", ["remote"], { cwd: gitRoot });
|
|
68
|
+
if (remotes === null || !remotes.split("\n").includes("origin")) {
|
|
69
|
+
log.error("No `origin` remote configured in this repository.");
|
|
70
|
+
log.dim("Add one with: git remote add origin <url>");
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
const status = run("git", ["status", "--porcelain"], { cwd: gitRoot });
|
|
74
|
+
if (status === null) {
|
|
75
|
+
log.error("Failed to read git status.");
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
if (status === "") {
|
|
79
|
+
log.info("Nothing to commit \u2014 working tree is clean.");
|
|
80
|
+
} else {
|
|
81
|
+
log.step("Staging and committing changes...");
|
|
82
|
+
const stage = runWithStderr("git", ["add", "-A"], { cwd: gitRoot });
|
|
83
|
+
if (stage.exitCode !== 0) {
|
|
84
|
+
log.error(`git add failed: ${stage.stderr}`);
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
const commit = runWithStderr(
|
|
88
|
+
"git",
|
|
89
|
+
["commit", "-m", "docs(learn): update learning notes"],
|
|
90
|
+
{ cwd: gitRoot }
|
|
91
|
+
);
|
|
92
|
+
if (commit.exitCode !== 0) {
|
|
93
|
+
log.error(`git commit failed: ${commit.stderr || commit.stdout}`);
|
|
94
|
+
process.exit(1);
|
|
95
|
+
}
|
|
96
|
+
log.success("Committed.");
|
|
97
|
+
}
|
|
98
|
+
console.log();
|
|
99
|
+
log.step("Pushing to origin...");
|
|
100
|
+
const pushCode = await streamExec("git", ["push", "origin", "HEAD"], {
|
|
101
|
+
cwd: gitRoot
|
|
102
|
+
});
|
|
103
|
+
if (pushCode !== 0) {
|
|
104
|
+
log.error("git push failed.");
|
|
105
|
+
process.exit(1);
|
|
106
|
+
}
|
|
107
|
+
log.success("Pushed.");
|
|
108
|
+
}
|
|
109
|
+
export {
|
|
110
|
+
learnPushCommand
|
|
111
|
+
};
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listMdFilesRecursive
|
|
3
|
+
} from "./chunk-2DTXVMPQ.js";
|
|
4
|
+
import {
|
|
5
|
+
isLearnMcpRegistered,
|
|
6
|
+
registerLearnMcp
|
|
7
|
+
} from "./chunk-YIXAQ4R2.js";
|
|
1
8
|
import {
|
|
2
9
|
ensureMemoryBuilt,
|
|
3
10
|
printMemoryMcpConfig
|
|
4
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HF7Y63JR.js";
|
|
5
12
|
import {
|
|
6
13
|
checkLearnMcpHealth,
|
|
7
14
|
checkMemoryMcpHealth,
|
|
8
15
|
detectMemoryMcpState,
|
|
9
16
|
printHealthSection,
|
|
10
17
|
warnStaleMcpJson
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
listMdFilesRecursive
|
|
14
|
-
} from "./chunk-2DTXVMPQ.js";
|
|
15
|
-
import {
|
|
16
|
-
isLearnMcpRegistered,
|
|
17
|
-
registerLearnMcp
|
|
18
|
-
} from "./chunk-WSUYLIYX.js";
|
|
18
|
+
} from "./chunk-HILXDUVZ.js";
|
|
19
19
|
import {
|
|
20
20
|
getMemoryMcpStatus,
|
|
21
21
|
writeMemoryMcpEntry
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2MOPHSMC.js";
|
|
23
23
|
import {
|
|
24
24
|
resolveLearnDir,
|
|
25
25
|
resolveMemoryDir
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-YOXXIXMQ.js";
|
|
27
27
|
import {
|
|
28
28
|
getLibPath
|
|
29
29
|
} from "./chunk-RZRT7NGT.js";
|
|
30
30
|
import "./chunk-57EGAXYI.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-IKLMHJH6.js";
|
|
32
32
|
import {
|
|
33
33
|
run
|
|
34
34
|
} from "./chunk-EVGXUDX4.js";
|
|
35
|
+
import {
|
|
36
|
+
readJson
|
|
37
|
+
} from "./chunk-5UVDWG5L.js";
|
|
35
38
|
import {
|
|
36
39
|
globalConfigPath
|
|
37
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-X2H7JJMR.js";
|
|
38
41
|
import {
|
|
39
42
|
log,
|
|
40
43
|
printBanner
|
|
41
44
|
} from "./chunk-NREZK463.js";
|
|
42
|
-
import {
|
|
43
|
-
readJson
|
|
44
|
-
} from "./chunk-5UVDWG5L.js";
|
|
45
45
|
|
|
46
46
|
// src/commands/mcp.ts
|
|
47
47
|
import { confirm } from "@inquirer/prompts";
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
runWithStderr
|
|
6
6
|
} from "./chunk-EVGXUDX4.js";
|
|
7
|
+
import {
|
|
8
|
+
readJson
|
|
9
|
+
} from "./chunk-5UVDWG5L.js";
|
|
7
10
|
import {
|
|
8
11
|
globalConfigPath
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-X2H7JJMR.js";
|
|
10
13
|
import {
|
|
11
14
|
log
|
|
12
15
|
} from "./chunk-NREZK463.js";
|
|
13
|
-
import {
|
|
14
|
-
readJson
|
|
15
|
-
} from "./chunk-5UVDWG5L.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/mcp-serve-learn.ts
|
|
18
18
|
import { spawn } from "child_process";
|
|
@@ -12,18 +12,19 @@ import {
|
|
|
12
12
|
memoryStartDaemonCommand,
|
|
13
13
|
memoryStatusCommand,
|
|
14
14
|
memoryStopDaemonCommand,
|
|
15
|
-
printMemoryMcpConfig
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
15
|
+
printMemoryMcpConfig,
|
|
16
|
+
refreshMemoryAfterUpdate
|
|
17
|
+
} from "./chunk-HF7Y63JR.js";
|
|
18
|
+
import "./chunk-HILXDUVZ.js";
|
|
19
|
+
import "./chunk-2MOPHSMC.js";
|
|
20
|
+
import "./chunk-YOXXIXMQ.js";
|
|
20
21
|
import "./chunk-RZRT7NGT.js";
|
|
21
22
|
import "./chunk-57EGAXYI.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-IKLMHJH6.js";
|
|
23
24
|
import "./chunk-EVGXUDX4.js";
|
|
24
|
-
import "./chunk-TWKNGPBO.js";
|
|
25
|
-
import "./chunk-NREZK463.js";
|
|
26
25
|
import "./chunk-5UVDWG5L.js";
|
|
26
|
+
import "./chunk-X2H7JJMR.js";
|
|
27
|
+
import "./chunk-NREZK463.js";
|
|
27
28
|
export {
|
|
28
29
|
ensureMemoryBuilt,
|
|
29
30
|
isMemoryInitialized,
|
|
@@ -38,5 +39,6 @@ export {
|
|
|
38
39
|
memoryStartDaemonCommand,
|
|
39
40
|
memoryStatusCommand,
|
|
40
41
|
memoryStopDaemonCommand,
|
|
41
|
-
printMemoryMcpConfig
|
|
42
|
+
printMemoryMcpConfig,
|
|
43
|
+
refreshMemoryAfterUpdate
|
|
42
44
|
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
STATIC_RULES,
|
|
3
|
+
applyPermissions,
|
|
4
|
+
cleanupStalePluginRules,
|
|
5
|
+
extractTag,
|
|
6
|
+
getAllRules,
|
|
7
|
+
getExistingRules,
|
|
8
|
+
groupByCategory,
|
|
9
|
+
logPluginScriptWarning,
|
|
10
|
+
runDangerousRulesAudit
|
|
11
|
+
} from "./chunk-O5ZKLFSL.js";
|
|
1
12
|
import {
|
|
2
13
|
askScope,
|
|
3
14
|
formatScopeLabel,
|
|
4
15
|
getMergedValue,
|
|
5
16
|
getScopeLabel
|
|
6
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IKLMHJH6.js";
|
|
7
18
|
import "./chunk-EVGXUDX4.js";
|
|
19
|
+
import {
|
|
20
|
+
mergeJson,
|
|
21
|
+
readJson
|
|
22
|
+
} from "./chunk-5UVDWG5L.js";
|
|
8
23
|
import {
|
|
9
24
|
claudeLocalSettingsPath,
|
|
10
25
|
claudeProjectSettingsPath,
|
|
11
26
|
claudeSettingsPath,
|
|
12
27
|
globalConfigPath,
|
|
13
28
|
localConfigPath
|
|
14
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-X2H7JJMR.js";
|
|
15
30
|
import {
|
|
16
31
|
log,
|
|
17
32
|
printBanner
|
|
18
33
|
} from "./chunk-NREZK463.js";
|
|
19
|
-
import {
|
|
20
|
-
STATIC_RULES,
|
|
21
|
-
applyPermissions,
|
|
22
|
-
cleanupStalePluginRules,
|
|
23
|
-
extractTag,
|
|
24
|
-
getAllRules,
|
|
25
|
-
getExistingRules,
|
|
26
|
-
groupByCategory,
|
|
27
|
-
logPluginScriptWarning,
|
|
28
|
-
runDangerousRulesAudit
|
|
29
|
-
} from "./chunk-O27FVQFU.js";
|
|
30
|
-
import {
|
|
31
|
-
mergeJson,
|
|
32
|
-
readJson
|
|
33
|
-
} from "./chunk-5UVDWG5L.js";
|
|
34
34
|
|
|
35
35
|
// src/commands/permission.ts
|
|
36
36
|
import { checkbox, confirm, select } from "@inquirer/prompts";
|
|
@@ -15,8 +15,9 @@ import {
|
|
|
15
15
|
logPluginScriptWarning,
|
|
16
16
|
runDangerousRulesAudit,
|
|
17
17
|
stripDangerousRules
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-O5ZKLFSL.js";
|
|
19
19
|
import "./chunk-5UVDWG5L.js";
|
|
20
|
+
import "./chunk-X2H7JJMR.js";
|
|
20
21
|
export {
|
|
21
22
|
DANGEROUS_RULE_PATTERNS,
|
|
22
23
|
PERMISSION_RULES,
|
package/dist/postinstall.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YOXXIXMQ.js";
|
|
4
4
|
import "./chunk-57EGAXYI.js";
|
|
5
|
+
import {
|
|
6
|
+
readJson,
|
|
7
|
+
writeJson
|
|
8
|
+
} from "./chunk-5UVDWG5L.js";
|
|
5
9
|
import {
|
|
6
10
|
claudeSessionDir,
|
|
7
11
|
encodeProjectPath,
|
|
8
12
|
resolvePath
|
|
9
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-X2H7JJMR.js";
|
|
10
14
|
import {
|
|
11
15
|
log
|
|
12
16
|
} from "./chunk-NREZK463.js";
|
|
13
|
-
import {
|
|
14
|
-
readJson,
|
|
15
|
-
writeJson
|
|
16
|
-
} from "./chunk-5UVDWG5L.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/session.ts
|
|
19
19
|
import { input, select } from "@inquirer/prompts";
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-UXIWEBI2.js";
|
|
2
|
+
getExistingRules
|
|
3
|
+
} from "./chunk-O5ZKLFSL.js";
|
|
5
4
|
import {
|
|
6
5
|
listMdFilesRecursive
|
|
7
6
|
} from "./chunk-2DTXVMPQ.js";
|
|
8
7
|
import {
|
|
9
8
|
isLearnMcpRegistered
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import
|
|
9
|
+
} from "./chunk-YIXAQ4R2.js";
|
|
10
|
+
import {
|
|
11
|
+
checkLearnMcpHealth,
|
|
12
|
+
checkMemoryMcpHealth
|
|
13
|
+
} from "./chunk-HILXDUVZ.js";
|
|
14
|
+
import "./chunk-2MOPHSMC.js";
|
|
12
15
|
import {
|
|
13
16
|
resolveLearnDir,
|
|
14
17
|
resolveMemoryDir,
|
|
15
18
|
sanitizeRawConfig
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YOXXIXMQ.js";
|
|
17
20
|
import {
|
|
18
21
|
getLibPath
|
|
19
22
|
} from "./chunk-RZRT7NGT.js";
|
|
@@ -22,31 +25,28 @@ import {
|
|
|
22
25
|
getLatestCliVersion,
|
|
23
26
|
getLatestVersion,
|
|
24
27
|
semverCompare
|
|
25
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-76GDRS54.js";
|
|
26
29
|
import {
|
|
27
30
|
getInstalledVersion
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7SMP5CZ4.js";
|
|
29
32
|
import "./chunk-57EGAXYI.js";
|
|
30
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-667NMPN4.js";
|
|
31
34
|
import {
|
|
32
35
|
detectPluginScope,
|
|
33
36
|
isPluginDisabled
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-GZT3YPAP.js";
|
|
38
|
+
import "./chunk-IKLMHJH6.js";
|
|
36
39
|
import "./chunk-EVGXUDX4.js";
|
|
40
|
+
import {
|
|
41
|
+
readJson
|
|
42
|
+
} from "./chunk-5UVDWG5L.js";
|
|
37
43
|
import {
|
|
38
44
|
claudeSettingsPath,
|
|
39
45
|
devStatePath,
|
|
40
46
|
globalConfigPath,
|
|
41
47
|
localConfigPath
|
|
42
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-X2H7JJMR.js";
|
|
43
49
|
import "./chunk-NREZK463.js";
|
|
44
|
-
import {
|
|
45
|
-
getExistingRules
|
|
46
|
-
} from "./chunk-O27FVQFU.js";
|
|
47
|
-
import {
|
|
48
|
-
readJson
|
|
49
|
-
} from "./chunk-5UVDWG5L.js";
|
|
50
50
|
|
|
51
51
|
// src/commands/status.ts
|
|
52
52
|
import { existsSync, readdirSync } from "fs";
|
|
@@ -8,19 +8,19 @@ import {
|
|
|
8
8
|
saveStatuslineConfig,
|
|
9
9
|
selectStatuslineComponents,
|
|
10
10
|
writeStatuslineSettings
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7SMP5CZ4.js";
|
|
12
12
|
import {
|
|
13
13
|
ALL_COMPONENT_IDS
|
|
14
14
|
} from "./chunk-57EGAXYI.js";
|
|
15
15
|
import {
|
|
16
16
|
commandExists
|
|
17
17
|
} from "./chunk-EVGXUDX4.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5UVDWG5L.js";
|
|
19
|
+
import "./chunk-X2H7JJMR.js";
|
|
19
20
|
import {
|
|
20
21
|
log,
|
|
21
22
|
printBanner
|
|
22
23
|
} from "./chunk-NREZK463.js";
|
|
23
|
-
import "./chunk-5UVDWG5L.js";
|
|
24
24
|
|
|
25
25
|
// src/commands/statusline.ts
|
|
26
26
|
import { confirm } from "@inquirer/prompts";
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hasShellCompletion,
|
|
3
3
|
removeShellCompletion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-667NMPN4.js";
|
|
5
5
|
import {
|
|
6
6
|
isMarketplaceRegistered,
|
|
7
7
|
isPluginInstalled
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GZT3YPAP.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveScope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IKLMHJH6.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";
|
|
16
20
|
import {
|
|
17
21
|
claudeSettingsPath,
|
|
18
22
|
devStatePath,
|
|
@@ -20,15 +24,11 @@ import {
|
|
|
20
24
|
marketplaceCachePath,
|
|
21
25
|
marketplaceClonePath,
|
|
22
26
|
memoryDepsDir
|
|
23
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-X2H7JJMR.js";
|
|
24
28
|
import {
|
|
25
29
|
log,
|
|
26
30
|
printBanner
|
|
27
31
|
} from "./chunk-NREZK463.js";
|
|
28
|
-
import {
|
|
29
|
-
readJson,
|
|
30
|
-
writeJson
|
|
31
|
-
} from "./chunk-5UVDWG5L.js";
|
|
32
32
|
|
|
33
33
|
// src/commands/uninstall.ts
|
|
34
34
|
import { existsSync, rmSync } from "fs";
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
getLatestVersion,
|
|
5
5
|
semverCompare,
|
|
6
6
|
updateCommand
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-76GDRS54.js";
|
|
8
|
+
import "./chunk-7SMP5CZ4.js";
|
|
9
9
|
import "./chunk-57EGAXYI.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-667NMPN4.js";
|
|
11
|
+
import "./chunk-IKLMHJH6.js";
|
|
12
12
|
import "./chunk-EVGXUDX4.js";
|
|
13
|
-
import "./chunk-TWKNGPBO.js";
|
|
14
|
-
import "./chunk-NREZK463.js";
|
|
15
13
|
import "./chunk-5UVDWG5L.js";
|
|
14
|
+
import "./chunk-X2H7JJMR.js";
|
|
15
|
+
import "./chunk-NREZK463.js";
|
|
16
16
|
export {
|
|
17
17
|
getCliVersion,
|
|
18
18
|
getLatestCliVersion,
|
package/lib/learn-host/README.md
CHANGED
|
@@ -5,9 +5,9 @@ Next.js app that renders your `/cf-learn` docs as a browsable website with searc
|
|
|
5
5
|
## Usage (via CLI)
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
cf host
|
|
9
|
-
cf host ./my-docs
|
|
10
|
-
cf host -p 4000
|
|
8
|
+
cf learn host # serves docs/learn/ on port 3333
|
|
9
|
+
cf learn host ./my-docs # serves a custom directory
|
|
10
|
+
cf learn host -p 4000 # custom port
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
The CLI handles deps install, build, and serving automatically.
|
|
@@ -25,12 +25,11 @@ npm install
|
|
|
25
25
|
|
|
26
26
|
### 2. Point to a docs directory
|
|
27
27
|
|
|
28
|
-
The app
|
|
28
|
+
The app reads the docs directory from the `DOCS_DIR` env var, which the CLI sets by resolving (in order):
|
|
29
29
|
|
|
30
|
-
1. `
|
|
31
|
-
2.
|
|
32
|
-
3.
|
|
33
|
-
4. Default: `docs/learn/` relative to project root
|
|
30
|
+
1. Explicit path argument (`cf learn host <path>`)
|
|
31
|
+
2. Global `~/.coding-friend/config.json` → `learn.outputDir`
|
|
32
|
+
3. Default: `~/.coding-friend/learn`
|
|
34
33
|
|
|
35
34
|
For local dev, set `DOCS_DIR` to any directory with the expected structure:
|
|
36
35
|
|
|
@@ -104,7 +103,7 @@ src/
|
|
|
104
103
|
## How It Fits Together
|
|
105
104
|
|
|
106
105
|
```
|
|
107
|
-
cf host [path]
|
|
106
|
+
cf learn host [path]
|
|
108
107
|
└─ resolves docs dir
|
|
109
108
|
└─ npm install (one-time)
|
|
110
109
|
└─ npm run build (with DOCS_DIR env)
|
|
@@ -7,27 +7,38 @@ interface Crumb {
|
|
|
7
7
|
|
|
8
8
|
export default function Breadcrumbs({ crumbs }: { crumbs: Crumb[] }) {
|
|
9
9
|
return (
|
|
10
|
-
<nav className="mb-4 flex items-center gap-2 text-sm text-slate-500 dark:text-slate-400">
|
|
11
|
-
<Link
|
|
10
|
+
<nav className="mb-4 flex min-w-0 items-center gap-2 whitespace-nowrap text-sm text-slate-500 dark:text-slate-400">
|
|
11
|
+
<Link
|
|
12
|
+
href="/"
|
|
13
|
+
className="shrink-0 hover:text-amber-600 dark:hover:text-amber-400"
|
|
14
|
+
>
|
|
12
15
|
Home
|
|
13
16
|
</Link>
|
|
14
|
-
{crumbs.map((crumb, i) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
{crumbs.map((crumb, i) => {
|
|
18
|
+
const isLast = i === crumbs.length - 1;
|
|
19
|
+
return (
|
|
20
|
+
<span
|
|
21
|
+
key={i}
|
|
22
|
+
className={`flex items-center gap-2 ${isLast ? "min-w-0" : "shrink-0"}`}
|
|
23
|
+
>
|
|
24
|
+
<span className="shrink-0">/</span>
|
|
25
|
+
{crumb.href ? (
|
|
26
|
+
<Link
|
|
27
|
+
href={crumb.href}
|
|
28
|
+
className="capitalize hover:text-amber-600 dark:hover:text-amber-400"
|
|
29
|
+
>
|
|
30
|
+
{crumb.label}
|
|
31
|
+
</Link>
|
|
32
|
+
) : (
|
|
33
|
+
<span
|
|
34
|
+
className={`text-slate-800 dark:text-slate-200 ${isLast ? "truncate" : ""}`}
|
|
35
|
+
>
|
|
36
|
+
{crumb.label}
|
|
37
|
+
</span>
|
|
38
|
+
)}
|
|
39
|
+
</span>
|
|
40
|
+
);
|
|
41
|
+
})}
|
|
31
42
|
</nav>
|
|
32
43
|
);
|
|
33
44
|
}
|