cc-proficiency 0.1.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/.claude-plugin/plugin.json +11 -0
- package/LICENSE +201 -0
- package/README.md +345 -0
- package/README.zh-CN.md +284 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +543 -0
- package/dist/cli.js.map +1 -0
- package/dist/gist/uploader.d.ts +26 -0
- package/dist/gist/uploader.d.ts.map +1 -0
- package/dist/gist/uploader.js +99 -0
- package/dist/gist/uploader.js.map +1 -0
- package/dist/hooks/session-end.js +64 -0
- package/dist/i18n/locales.d.ts +30 -0
- package/dist/i18n/locales.d.ts.map +1 -0
- package/dist/i18n/locales.js +64 -0
- package/dist/i18n/locales.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/config-parser.d.ts +25 -0
- package/dist/parsers/config-parser.d.ts.map +1 -0
- package/dist/parsers/config-parser.js +262 -0
- package/dist/parsers/config-parser.js.map +1 -0
- package/dist/parsers/history-parser.d.ts +13 -0
- package/dist/parsers/history-parser.d.ts.map +1 -0
- package/dist/parsers/history-parser.js +50 -0
- package/dist/parsers/history-parser.js.map +1 -0
- package/dist/parsers/normalizer.d.ts +8 -0
- package/dist/parsers/normalizer.d.ts.map +1 -0
- package/dist/parsers/normalizer.js +105 -0
- package/dist/parsers/normalizer.js.map +1 -0
- package/dist/parsers/transcript-parser.d.ts +23 -0
- package/dist/parsers/transcript-parser.d.ts.map +1 -0
- package/dist/parsers/transcript-parser.js +112 -0
- package/dist/parsers/transcript-parser.js.map +1 -0
- package/dist/renderer/svg.d.ts +10 -0
- package/dist/renderer/svg.d.ts.map +1 -0
- package/dist/renderer/svg.js +209 -0
- package/dist/renderer/svg.js.map +1 -0
- package/dist/scoring/curves.d.ts +34 -0
- package/dist/scoring/curves.d.ts.map +1 -0
- package/dist/scoring/curves.js +60 -0
- package/dist/scoring/curves.js.map +1 -0
- package/dist/scoring/engine.d.ts +16 -0
- package/dist/scoring/engine.d.ts.map +1 -0
- package/dist/scoring/engine.js +137 -0
- package/dist/scoring/engine.js.map +1 -0
- package/dist/scoring/rule-engine.d.ts +30 -0
- package/dist/scoring/rule-engine.d.ts.map +1 -0
- package/dist/scoring/rule-engine.js +151 -0
- package/dist/scoring/rule-engine.js.map +1 -0
- package/dist/scoring/rules.d.ts +32 -0
- package/dist/scoring/rules.d.ts.map +1 -0
- package/dist/scoring/rules.js +443 -0
- package/dist/scoring/rules.js.map +1 -0
- package/dist/scoring/signals.d.ts +7 -0
- package/dist/scoring/signals.d.ts.map +1 -0
- package/dist/scoring/signals.js +245 -0
- package/dist/scoring/signals.js.map +1 -0
- package/dist/store/local-store.d.ts +12 -0
- package/dist/store/local-store.d.ts.map +1 -0
- package/dist/store/local-store.js +107 -0
- package/dist/store/local-store.js.map +1 -0
- package/dist/store/queue.d.ts +24 -0
- package/dist/store/queue.d.ts.map +1 -0
- package/dist/store/queue.js +105 -0
- package/dist/store/queue.js.map +1 -0
- package/dist/types.d.ts +264 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/ci-detect.d.ts +6 -0
- package/dist/utils/ci-detect.d.ts.map +1 -0
- package/dist/utils/ci-detect.js +19 -0
- package/dist/utils/ci-detect.js.map +1 -0
- package/hooks/hooks.json +15 -0
- package/hooks/session-end.ts +71 -0
- package/hooks/tsconfig.json +13 -0
- package/package.json +43 -0
- package/skills/proficiency/SKILL.md +15 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isGhAuthenticated = isGhAuthenticated;
|
|
4
|
+
exports.getGhUsername = getGhUsername;
|
|
5
|
+
exports.createGist = createGist;
|
|
6
|
+
exports.updateGist = updateGist;
|
|
7
|
+
exports.getGistRawUrl = getGistRawUrl;
|
|
8
|
+
const node_child_process_1 = require("node:child_process");
|
|
9
|
+
const node_fs_1 = require("node:fs");
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const node_os_1 = require("node:os");
|
|
12
|
+
/**
|
|
13
|
+
* Check if gh CLI is installed and authenticated.
|
|
14
|
+
*/
|
|
15
|
+
function isGhAuthenticated() {
|
|
16
|
+
try {
|
|
17
|
+
(0, node_child_process_1.execFileSync)("gh", ["auth", "status"], { stdio: "pipe", timeout: 10_000 });
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get GitHub username from gh CLI.
|
|
26
|
+
*/
|
|
27
|
+
function getGhUsername() {
|
|
28
|
+
try {
|
|
29
|
+
const result = (0, node_child_process_1.execFileSync)("gh", ["api", "user", "--jq", ".login"], {
|
|
30
|
+
encoding: "utf-8",
|
|
31
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
32
|
+
timeout: 10_000,
|
|
33
|
+
});
|
|
34
|
+
return result.trim() || undefined;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Create a new Gist with the SVG badge.
|
|
42
|
+
*/
|
|
43
|
+
function createGist(svgContent, isPublic) {
|
|
44
|
+
const tmpFile = (0, node_path_1.join)((0, node_os_1.tmpdir)(), "cc-proficiency.svg");
|
|
45
|
+
try {
|
|
46
|
+
(0, node_fs_1.writeFileSync)(tmpFile, svgContent, "utf-8");
|
|
47
|
+
const args = ["gist", "create", "-d", "Claude Code Proficiency Badge", tmpFile];
|
|
48
|
+
if (isPublic)
|
|
49
|
+
args.splice(2, 0, "--public");
|
|
50
|
+
const result = (0, node_child_process_1.execFileSync)("gh", args, {
|
|
51
|
+
encoding: "utf-8",
|
|
52
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
53
|
+
timeout: 30_000,
|
|
54
|
+
});
|
|
55
|
+
const url = result.trim();
|
|
56
|
+
const gistId = url.split("/").pop();
|
|
57
|
+
return { success: true, url: gistId };
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
return { success: false, error: String(err) };
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
try {
|
|
64
|
+
(0, node_fs_1.unlinkSync)(tmpFile);
|
|
65
|
+
}
|
|
66
|
+
catch { /* ignore */ }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Update an existing Gist with new SVG content.
|
|
71
|
+
*/
|
|
72
|
+
function updateGist(gistId, svgContent, filename = "cc-proficiency.svg") {
|
|
73
|
+
const tmpFile = (0, node_path_1.join)((0, node_os_1.tmpdir)(), filename);
|
|
74
|
+
try {
|
|
75
|
+
(0, node_fs_1.writeFileSync)(tmpFile, svgContent, "utf-8");
|
|
76
|
+
(0, node_child_process_1.execFileSync)("gh", ["gist", "edit", gistId, "-a", tmpFile], {
|
|
77
|
+
encoding: "utf-8",
|
|
78
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
79
|
+
timeout: 30_000,
|
|
80
|
+
});
|
|
81
|
+
return { success: true };
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
return { success: false, error: String(err) };
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
try {
|
|
88
|
+
(0, node_fs_1.unlinkSync)(tmpFile);
|
|
89
|
+
}
|
|
90
|
+
catch { /* ignore */ }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Get the raw URL for a gist file.
|
|
95
|
+
*/
|
|
96
|
+
function getGistRawUrl(username, gistId, filename = "cc-proficiency.svg") {
|
|
97
|
+
return `https://gist.githubusercontent.com/${username}/${gistId}/raw/${filename}`;
|
|
98
|
+
}
|
|
99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QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;YAC/B,OAAO,EAAE,MAAM;SAChB,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IAChD,CAAC;YAAS,CAAC;QACT,IAAI,CAAC;YAAC,IAAA,oBAAU,EAAC,OAAO,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,QAAgB,EAAE,MAAc,EAAE,WAAmB,oBAAoB;IACrG,OAAO,sCAAsC,QAAQ,IAAI,MAAM,QAAQ,QAAQ,EAAE,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Stop hook for cc-proficiency.
|
|
5
|
+
* Reads session info from stdin, appends to queue, spawns processor.
|
|
6
|
+
* Must exit 0 in <1 second.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const node_child_process_1 = require("node:child_process");
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const node_os_1 = require("node:os");
|
|
12
|
+
const node_fs_1 = require("node:fs");
|
|
13
|
+
const STORE_DIR = (0, node_path_1.join)((0, node_os_1.homedir)(), ".cc-proficiency");
|
|
14
|
+
const QUEUE_FILE = (0, node_path_1.join)(STORE_DIR, "queue.jsonl");
|
|
15
|
+
// CI/CD detection — skip if non-interactive
|
|
16
|
+
const CI_VARS = ["CI", "GITHUB_ACTIONS", "GITLAB_CI", "CODESPACES", "BUILDKITE", "CIRCLECI", "TRAVIS"];
|
|
17
|
+
if (CI_VARS.some((v) => process.env[v] === "true") || process.env.JENKINS_URL) {
|
|
18
|
+
process.exit(0);
|
|
19
|
+
}
|
|
20
|
+
// Read stdin (hook payload)
|
|
21
|
+
let input = "";
|
|
22
|
+
process.stdin.setEncoding("utf-8");
|
|
23
|
+
process.stdin.on("data", (chunk) => { input += chunk; });
|
|
24
|
+
process.stdin.on("end", () => {
|
|
25
|
+
try {
|
|
26
|
+
const payload = JSON.parse(input);
|
|
27
|
+
const entry = {
|
|
28
|
+
sessionId: payload.session_id ?? "",
|
|
29
|
+
transcriptPath: payload.transcript_path ?? "",
|
|
30
|
+
cwd: payload.cwd ?? "",
|
|
31
|
+
timestamp: new Date().toISOString(),
|
|
32
|
+
};
|
|
33
|
+
if (!entry.sessionId || !entry.transcriptPath) {
|
|
34
|
+
process.exit(0);
|
|
35
|
+
}
|
|
36
|
+
// Ensure store dir
|
|
37
|
+
if (!(0, node_fs_1.existsSync)(STORE_DIR)) {
|
|
38
|
+
(0, node_fs_1.mkdirSync)(STORE_DIR, { recursive: true });
|
|
39
|
+
}
|
|
40
|
+
// Append to queue
|
|
41
|
+
(0, node_fs_1.appendFileSync)(QUEUE_FILE, JSON.stringify(entry) + "\n", "utf-8");
|
|
42
|
+
// Spawn processor as detached child (fire-and-forget)
|
|
43
|
+
try {
|
|
44
|
+
// When compiled: dist/hooks/session-end.js → dist/cli.js is at ../cli.js
|
|
45
|
+
const processorPath = (0, node_path_1.join)(__dirname, "..", "cli.js");
|
|
46
|
+
if ((0, node_fs_1.existsSync)(processorPath)) {
|
|
47
|
+
const child = (0, node_child_process_1.spawn)("node", [processorPath, "process"], {
|
|
48
|
+
detached: true,
|
|
49
|
+
stdio: "ignore",
|
|
50
|
+
});
|
|
51
|
+
child.unref();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
// Processor spawn failed — user can run manually
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
// Invalid JSON or other error — exit cleanly
|
|
60
|
+
}
|
|
61
|
+
process.exit(0);
|
|
62
|
+
});
|
|
63
|
+
// Timeout safety — exit after 4 seconds regardless
|
|
64
|
+
setTimeout(() => process.exit(0), 4000);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type Locale = "en" | "zh-CN";
|
|
2
|
+
export interface LocaleStrings {
|
|
3
|
+
title: string;
|
|
4
|
+
calibrating: string;
|
|
5
|
+
needMore: (n: number) => string;
|
|
6
|
+
sessions: string;
|
|
7
|
+
projects: string;
|
|
8
|
+
setup: string;
|
|
9
|
+
earlyResults: string;
|
|
10
|
+
ccMastery: string;
|
|
11
|
+
toolMcp: string;
|
|
12
|
+
agentic: string;
|
|
13
|
+
promptCraft: string;
|
|
14
|
+
contextMgmt: string;
|
|
15
|
+
hooks: string;
|
|
16
|
+
plugins: string;
|
|
17
|
+
skills: string;
|
|
18
|
+
mcp: string;
|
|
19
|
+
agents: string;
|
|
20
|
+
plan: string;
|
|
21
|
+
memory: string;
|
|
22
|
+
rules: string;
|
|
23
|
+
claudeMd: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function getLocale(locale?: Locale): LocaleStrings;
|
|
26
|
+
/**
|
|
27
|
+
* Detect locale from environment or config.
|
|
28
|
+
*/
|
|
29
|
+
export declare function detectLocale(): Locale;
|
|
30
|
+
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../src/i18n/locales.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC;AAEpC,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IAErB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAoDD,wBAAgB,SAAS,CAAC,MAAM,GAAE,MAAa,GAAG,aAAa,CAE9D;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAIrC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLocale = getLocale;
|
|
4
|
+
exports.detectLocale = detectLocale;
|
|
5
|
+
const en = {
|
|
6
|
+
title: "Claude Code Proficiency",
|
|
7
|
+
calibrating: "Analyzing usage patterns...",
|
|
8
|
+
needMore: (n) => `Need ${n} more for scoring`,
|
|
9
|
+
sessions: "sessions",
|
|
10
|
+
projects: "projects",
|
|
11
|
+
setup: "Setup",
|
|
12
|
+
earlyResults: "early results",
|
|
13
|
+
ccMastery: "CC Mastery",
|
|
14
|
+
toolMcp: "Tool & MCP",
|
|
15
|
+
agentic: "Agentic",
|
|
16
|
+
promptCraft: "Prompt Craft",
|
|
17
|
+
contextMgmt: "Context Mgmt",
|
|
18
|
+
hooks: "Hooks",
|
|
19
|
+
plugins: "Plugins",
|
|
20
|
+
skills: "Skills",
|
|
21
|
+
mcp: "MCP",
|
|
22
|
+
agents: "Agents",
|
|
23
|
+
plan: "Plan",
|
|
24
|
+
memory: "Memory",
|
|
25
|
+
rules: "Rules",
|
|
26
|
+
claudeMd: "CLAUDE.md",
|
|
27
|
+
};
|
|
28
|
+
const zhCN = {
|
|
29
|
+
title: "Claude Code \u80FD\u529B\u6982\u89C8",
|
|
30
|
+
calibrating: "\u6B63\u5728\u5206\u6790\u4F7F\u7528\u6A21\u5F0F...",
|
|
31
|
+
needMore: (n) => `\u8FD8\u9700 ${n} \u6B21\u4F1A\u8BDD\u624D\u80FD\u8BC4\u5206`,
|
|
32
|
+
sessions: "\u4F1A\u8BDD",
|
|
33
|
+
projects: "\u9879\u76EE",
|
|
34
|
+
setup: "\u914D\u7F6E",
|
|
35
|
+
earlyResults: "\u521D\u6B65\u7ED3\u679C",
|
|
36
|
+
ccMastery: "CC \u638C\u63E1",
|
|
37
|
+
toolMcp: "\u5DE5\u5177 & MCP",
|
|
38
|
+
agentic: "\u667A\u80FD\u4F53",
|
|
39
|
+
promptCraft: "\u63D0\u793A\u8BCD",
|
|
40
|
+
contextMgmt: "\u4E0A\u4E0B\u6587",
|
|
41
|
+
hooks: "\u94A9\u5B50",
|
|
42
|
+
plugins: "\u63D2\u4EF6",
|
|
43
|
+
skills: "\u6280\u80FD",
|
|
44
|
+
mcp: "MCP",
|
|
45
|
+
agents: "\u4EE3\u7406",
|
|
46
|
+
plan: "\u8BA1\u5212",
|
|
47
|
+
memory: "\u8BB0\u5FC6",
|
|
48
|
+
rules: "\u89C4\u5219",
|
|
49
|
+
claudeMd: "CLAUDE.md",
|
|
50
|
+
};
|
|
51
|
+
const LOCALES = { en, "zh-CN": zhCN };
|
|
52
|
+
function getLocale(locale = "en") {
|
|
53
|
+
return LOCALES[locale] ?? LOCALES.en;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Detect locale from environment or config.
|
|
57
|
+
*/
|
|
58
|
+
function detectLocale() {
|
|
59
|
+
const lang = process.env.LANG ?? process.env.LC_ALL ?? process.env.LANGUAGE ?? "";
|
|
60
|
+
if (lang.startsWith("zh"))
|
|
61
|
+
return "zh-CN";
|
|
62
|
+
return "en";
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.js","sourceRoot":"","sources":["../../src/i18n/locales.ts"],"names":[],"mappings":";;AA+EA,8BAEC;AAKD,oCAIC;AA7DD,MAAM,EAAE,GAAkB;IACxB,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,6BAA6B;IAC1C,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,mBAAmB;IAC7C,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,YAAY,EAAE,eAAe;IAC7B,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,cAAc;IAC3B,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,IAAI,GAAkB;IAC1B,KAAK,EAAE,sCAAsC;IAC7C,WAAW,EAAE,qDAAqD;IAClE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,6CAA6C;IAC/E,QAAQ,EAAE,cAAc;IACxB,QAAQ,EAAE,cAAc;IACxB,KAAK,EAAE,cAAc;IACrB,YAAY,EAAE,0BAA0B;IACxC,SAAS,EAAE,iBAAiB;IAC5B,OAAO,EAAE,oBAAoB;IAC7B,OAAO,EAAE,oBAAoB;IAC7B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,oBAAoB;IACjC,KAAK,EAAE,cAAc;IACrB,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,cAAc;IACtB,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,cAAc;IACtB,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,cAAc;IACrB,QAAQ,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,OAAO,GAAkC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAErE,SAAgB,SAAS,CAAC,SAAiB,IAAI;IAC7C,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,EAAE,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,SAAgB,YAAY;IAC1B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;IAClF,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,OAAO,CAAC;IAC1C,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type { ProficiencyResult, DomainScore, ExtractedSignals, SetupChecklist, FeatureInventory, CCProficiencyConfig, LocalStore, SessionSnapshot, QueueEntry, } from "./types.js";
|
|
2
|
+
export { parseTranscript, sanitizeProjectSlug } from "./parsers/transcript-parser.js";
|
|
3
|
+
export { normalizeEntry } from "./parsers/normalizer.js";
|
|
4
|
+
export { parseClaudeConfig, buildSetupChecklist } from "./parsers/config-parser.js";
|
|
5
|
+
export { parseHistory } from "./parsers/history-parser.js";
|
|
6
|
+
export { extractSignals } from "./scoring/signals.js";
|
|
7
|
+
export { computeProficiency, extractFeatureInventory, getPhase, getConfidence, getRecencyWeight, SCORING_VERSION } from "./scoring/engine.js";
|
|
8
|
+
export { fireRules, aggregateToBuckets, bucketsToScores, extractFeatureScores } from "./scoring/rule-engine.js";
|
|
9
|
+
export { RULES } from "./scoring/rules.js";
|
|
10
|
+
export { logCurve, cappedRatio, binary, ratioToScore, weightedSum } from "./scoring/curves.js";
|
|
11
|
+
export { isCIEnvironment } from "./utils/ci-detect.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,UAAU,GACX,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,QAAQ,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC9I,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isCIEnvironment = exports.weightedSum = exports.ratioToScore = exports.binary = exports.cappedRatio = exports.logCurve = exports.RULES = exports.extractFeatureScores = exports.bucketsToScores = exports.aggregateToBuckets = exports.fireRules = exports.SCORING_VERSION = exports.getRecencyWeight = exports.getConfidence = exports.getPhase = exports.extractFeatureInventory = exports.computeProficiency = exports.extractSignals = exports.parseHistory = exports.buildSetupChecklist = exports.parseClaudeConfig = exports.normalizeEntry = exports.sanitizeProjectSlug = exports.parseTranscript = void 0;
|
|
4
|
+
var transcript_parser_js_1 = require("./parsers/transcript-parser.js");
|
|
5
|
+
Object.defineProperty(exports, "parseTranscript", { enumerable: true, get: function () { return transcript_parser_js_1.parseTranscript; } });
|
|
6
|
+
Object.defineProperty(exports, "sanitizeProjectSlug", { enumerable: true, get: function () { return transcript_parser_js_1.sanitizeProjectSlug; } });
|
|
7
|
+
var normalizer_js_1 = require("./parsers/normalizer.js");
|
|
8
|
+
Object.defineProperty(exports, "normalizeEntry", { enumerable: true, get: function () { return normalizer_js_1.normalizeEntry; } });
|
|
9
|
+
var config_parser_js_1 = require("./parsers/config-parser.js");
|
|
10
|
+
Object.defineProperty(exports, "parseClaudeConfig", { enumerable: true, get: function () { return config_parser_js_1.parseClaudeConfig; } });
|
|
11
|
+
Object.defineProperty(exports, "buildSetupChecklist", { enumerable: true, get: function () { return config_parser_js_1.buildSetupChecklist; } });
|
|
12
|
+
var history_parser_js_1 = require("./parsers/history-parser.js");
|
|
13
|
+
Object.defineProperty(exports, "parseHistory", { enumerable: true, get: function () { return history_parser_js_1.parseHistory; } });
|
|
14
|
+
var signals_js_1 = require("./scoring/signals.js");
|
|
15
|
+
Object.defineProperty(exports, "extractSignals", { enumerable: true, get: function () { return signals_js_1.extractSignals; } });
|
|
16
|
+
var engine_js_1 = require("./scoring/engine.js");
|
|
17
|
+
Object.defineProperty(exports, "computeProficiency", { enumerable: true, get: function () { return engine_js_1.computeProficiency; } });
|
|
18
|
+
Object.defineProperty(exports, "extractFeatureInventory", { enumerable: true, get: function () { return engine_js_1.extractFeatureInventory; } });
|
|
19
|
+
Object.defineProperty(exports, "getPhase", { enumerable: true, get: function () { return engine_js_1.getPhase; } });
|
|
20
|
+
Object.defineProperty(exports, "getConfidence", { enumerable: true, get: function () { return engine_js_1.getConfidence; } });
|
|
21
|
+
Object.defineProperty(exports, "getRecencyWeight", { enumerable: true, get: function () { return engine_js_1.getRecencyWeight; } });
|
|
22
|
+
Object.defineProperty(exports, "SCORING_VERSION", { enumerable: true, get: function () { return engine_js_1.SCORING_VERSION; } });
|
|
23
|
+
var rule_engine_js_1 = require("./scoring/rule-engine.js");
|
|
24
|
+
Object.defineProperty(exports, "fireRules", { enumerable: true, get: function () { return rule_engine_js_1.fireRules; } });
|
|
25
|
+
Object.defineProperty(exports, "aggregateToBuckets", { enumerable: true, get: function () { return rule_engine_js_1.aggregateToBuckets; } });
|
|
26
|
+
Object.defineProperty(exports, "bucketsToScores", { enumerable: true, get: function () { return rule_engine_js_1.bucketsToScores; } });
|
|
27
|
+
Object.defineProperty(exports, "extractFeatureScores", { enumerable: true, get: function () { return rule_engine_js_1.extractFeatureScores; } });
|
|
28
|
+
var rules_js_1 = require("./scoring/rules.js");
|
|
29
|
+
Object.defineProperty(exports, "RULES", { enumerable: true, get: function () { return rules_js_1.RULES; } });
|
|
30
|
+
var curves_js_1 = require("./scoring/curves.js");
|
|
31
|
+
Object.defineProperty(exports, "logCurve", { enumerable: true, get: function () { return curves_js_1.logCurve; } });
|
|
32
|
+
Object.defineProperty(exports, "cappedRatio", { enumerable: true, get: function () { return curves_js_1.cappedRatio; } });
|
|
33
|
+
Object.defineProperty(exports, "binary", { enumerable: true, get: function () { return curves_js_1.binary; } });
|
|
34
|
+
Object.defineProperty(exports, "ratioToScore", { enumerable: true, get: function () { return curves_js_1.ratioToScore; } });
|
|
35
|
+
Object.defineProperty(exports, "weightedSum", { enumerable: true, get: function () { return curves_js_1.weightedSum; } });
|
|
36
|
+
var ci_detect_js_1 = require("./utils/ci-detect.js");
|
|
37
|
+
Object.defineProperty(exports, "isCIEnvironment", { enumerable: true, get: function () { return ci_detect_js_1.isCIEnvironment; } });
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAYA,uEAAsF;AAA7E,uHAAA,eAAe,OAAA;AAAE,2HAAA,mBAAmB,OAAA;AAC7C,yDAAyD;AAAhD,+GAAA,cAAc,OAAA;AACvB,+DAAoF;AAA3E,qHAAA,iBAAiB,OAAA;AAAE,uHAAA,mBAAmB,OAAA;AAC/C,iEAA2D;AAAlD,iHAAA,YAAY,OAAA;AACrB,mDAAsD;AAA7C,4GAAA,cAAc,OAAA;AACvB,iDAA8I;AAArI,+GAAA,kBAAkB,OAAA;AAAE,oHAAA,uBAAuB,OAAA;AAAE,qGAAA,QAAQ,OAAA;AAAE,0GAAA,aAAa,OAAA;AAAE,6GAAA,gBAAgB,OAAA;AAAE,4GAAA,eAAe,OAAA;AAChH,2DAAgH;AAAvG,2GAAA,SAAS,OAAA;AAAE,oHAAA,kBAAkB,OAAA;AAAE,iHAAA,eAAe,OAAA;AAAE,sHAAA,oBAAoB,OAAA;AAC7E,+CAA2C;AAAlC,iGAAA,KAAK,OAAA;AACd,iDAA+F;AAAtF,qGAAA,QAAQ,OAAA;AAAE,wGAAA,WAAW,OAAA;AAAE,mGAAA,MAAM,OAAA;AAAE,yGAAA,YAAY,OAAA;AAAE,wGAAA,WAAW,OAAA;AACjE,qDAAuD;AAA9C,+GAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SetupChecklist } from "../types.js";
|
|
2
|
+
export interface ConfigSignals {
|
|
3
|
+
hasGlobalClaudeMd: boolean;
|
|
4
|
+
globalClaudeMdHasImports: boolean;
|
|
5
|
+
projectClaudeMdCount: number;
|
|
6
|
+
hasCustomHooks: boolean;
|
|
7
|
+
hookWithMatcherCount: number;
|
|
8
|
+
pluginCount: number;
|
|
9
|
+
pluginNames: string[];
|
|
10
|
+
hasRulesFiles: boolean;
|
|
11
|
+
hasMcpServers: boolean;
|
|
12
|
+
hasMemoryFiles: boolean;
|
|
13
|
+
memoryFileCount: number;
|
|
14
|
+
activeMemoryFileCount: number;
|
|
15
|
+
effortLevel: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Parse Claude Code configuration from ~/.claude/ directory.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseClaudeConfig(): ConfigSignals;
|
|
21
|
+
/**
|
|
22
|
+
* Build a setup checklist from config signals.
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildSetupChecklist(config: ConfigSignals): SetupChecklist;
|
|
25
|
+
//# sourceMappingURL=config-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-parser.d.ts","sourceRoot":"","sources":["../../src/parsers/config-parser.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,MAAM,WAAW,aAAa;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,wBAAwB,EAAE,OAAO,CAAC;IAClC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,aAAa,CAkOjD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,cAAc,CASzE"}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseClaudeConfig = parseClaudeConfig;
|
|
4
|
+
exports.buildSetupChecklist = buildSetupChecklist;
|
|
5
|
+
const node_fs_1 = require("node:fs");
|
|
6
|
+
const node_path_1 = require("node:path");
|
|
7
|
+
const node_os_1 = require("node:os");
|
|
8
|
+
const CLAUDE_DIR = (0, node_path_1.join)((0, node_os_1.homedir)(), ".claude");
|
|
9
|
+
/**
|
|
10
|
+
* Parse Claude Code configuration from ~/.claude/ directory.
|
|
11
|
+
*/
|
|
12
|
+
function parseClaudeConfig() {
|
|
13
|
+
const result = {
|
|
14
|
+
hasGlobalClaudeMd: false,
|
|
15
|
+
globalClaudeMdHasImports: false,
|
|
16
|
+
projectClaudeMdCount: 0,
|
|
17
|
+
hasCustomHooks: false,
|
|
18
|
+
hookWithMatcherCount: 0,
|
|
19
|
+
pluginCount: 0,
|
|
20
|
+
pluginNames: [],
|
|
21
|
+
hasRulesFiles: false,
|
|
22
|
+
hasMcpServers: false,
|
|
23
|
+
hasMemoryFiles: false,
|
|
24
|
+
memoryFileCount: 0,
|
|
25
|
+
activeMemoryFileCount: 0,
|
|
26
|
+
effortLevel: "",
|
|
27
|
+
};
|
|
28
|
+
// Global CLAUDE.md
|
|
29
|
+
const globalClaudeMd = (0, node_path_1.join)(CLAUDE_DIR, "CLAUDE.md");
|
|
30
|
+
if ((0, node_fs_1.existsSync)(globalClaudeMd)) {
|
|
31
|
+
result.hasGlobalClaudeMd = true;
|
|
32
|
+
try {
|
|
33
|
+
const content = (0, node_fs_1.readFileSync)(globalClaudeMd, "utf-8");
|
|
34
|
+
result.globalClaudeMdHasImports =
|
|
35
|
+
content.includes("@import") ||
|
|
36
|
+
content.includes("<!-- import") ||
|
|
37
|
+
content.includes("## ") && content.split("## ").length > 3;
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
// can't read — still counts as existing
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Settings
|
|
44
|
+
const settingsPath = (0, node_path_1.join)(CLAUDE_DIR, "settings.json");
|
|
45
|
+
if ((0, node_fs_1.existsSync)(settingsPath)) {
|
|
46
|
+
try {
|
|
47
|
+
const settings = JSON.parse((0, node_fs_1.readFileSync)(settingsPath, "utf-8"));
|
|
48
|
+
// Plugins
|
|
49
|
+
if (settings.enabledPlugins) {
|
|
50
|
+
const names = Object.keys(settings.enabledPlugins).filter((k) => settings.enabledPlugins[k] === true);
|
|
51
|
+
result.pluginCount = names.length;
|
|
52
|
+
result.pluginNames = names;
|
|
53
|
+
}
|
|
54
|
+
// Effort level
|
|
55
|
+
result.effortLevel = settings.effortLevel ?? "";
|
|
56
|
+
// Hooks from settings.json
|
|
57
|
+
if (settings.hooks) {
|
|
58
|
+
const allHooks = Object.values(settings.hooks);
|
|
59
|
+
let totalHooks = 0;
|
|
60
|
+
let matcherHooks = 0;
|
|
61
|
+
for (const eventHooks of allHooks) {
|
|
62
|
+
if (!Array.isArray(eventHooks))
|
|
63
|
+
continue;
|
|
64
|
+
for (const hookGroup of eventHooks) {
|
|
65
|
+
const group = hookGroup;
|
|
66
|
+
if (group.hooks) {
|
|
67
|
+
totalHooks += group.hooks.length;
|
|
68
|
+
if (group.matcher)
|
|
69
|
+
matcherHooks += group.hooks.length;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
result.hasCustomHooks = totalHooks > 0;
|
|
74
|
+
result.hookWithMatcherCount = matcherHooks;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
// settings unreadable
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// Also detect hooks from installed plugins (plugins/cache/*/hooks/hooks.json)
|
|
82
|
+
const pluginCacheDir = (0, node_path_1.join)(CLAUDE_DIR, "plugins", "cache");
|
|
83
|
+
if ((0, node_fs_1.existsSync)(pluginCacheDir)) {
|
|
84
|
+
try {
|
|
85
|
+
for (const marketplace of (0, node_fs_1.readdirSync)(pluginCacheDir)) {
|
|
86
|
+
const marketDir = (0, node_path_1.join)(pluginCacheDir, marketplace);
|
|
87
|
+
if (!(0, node_fs_1.statSync)(marketDir).isDirectory())
|
|
88
|
+
continue;
|
|
89
|
+
for (const plugin of (0, node_fs_1.readdirSync)(marketDir)) {
|
|
90
|
+
const pluginDir = (0, node_path_1.join)(marketDir, plugin);
|
|
91
|
+
if (!(0, node_fs_1.statSync)(pluginDir).isDirectory())
|
|
92
|
+
continue;
|
|
93
|
+
// Check versioned subdirs or direct hooks.json
|
|
94
|
+
const candidates = [(0, node_path_1.join)(pluginDir, "hooks", "hooks.json")];
|
|
95
|
+
try {
|
|
96
|
+
for (const sub of (0, node_fs_1.readdirSync)(pluginDir)) {
|
|
97
|
+
const subHooks = (0, node_path_1.join)(pluginDir, sub, "hooks", "hooks.json");
|
|
98
|
+
if ((0, node_fs_1.existsSync)(subHooks))
|
|
99
|
+
candidates.push(subHooks);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
catch { /* skip */ }
|
|
103
|
+
for (const hooksPath of candidates) {
|
|
104
|
+
if (!(0, node_fs_1.existsSync)(hooksPath))
|
|
105
|
+
continue;
|
|
106
|
+
try {
|
|
107
|
+
const hooksConfig = JSON.parse((0, node_fs_1.readFileSync)(hooksPath, "utf-8"));
|
|
108
|
+
if (hooksConfig.hooks) {
|
|
109
|
+
for (const eventHooks of Object.values(hooksConfig.hooks)) {
|
|
110
|
+
if (!Array.isArray(eventHooks))
|
|
111
|
+
continue;
|
|
112
|
+
for (const hookGroup of eventHooks) {
|
|
113
|
+
const group = hookGroup;
|
|
114
|
+
if (group.hooks) {
|
|
115
|
+
result.hasCustomHooks = true;
|
|
116
|
+
if (group.matcher)
|
|
117
|
+
result.hookWithMatcherCount += group.hooks.length;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch { /* skip */ }
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch { /* skip */ }
|
|
129
|
+
}
|
|
130
|
+
// Project CLAUDE.md files and memory
|
|
131
|
+
const projectsDir = (0, node_path_1.join)(CLAUDE_DIR, "projects");
|
|
132
|
+
if ((0, node_fs_1.existsSync)(projectsDir)) {
|
|
133
|
+
try {
|
|
134
|
+
const projects = (0, node_fs_1.readdirSync)(projectsDir);
|
|
135
|
+
for (const proj of projects) {
|
|
136
|
+
const projDir = (0, node_path_1.join)(projectsDir, proj);
|
|
137
|
+
if (!(0, node_fs_1.statSync)(projDir).isDirectory())
|
|
138
|
+
continue;
|
|
139
|
+
// Project CLAUDE.md
|
|
140
|
+
if ((0, node_fs_1.existsSync)((0, node_path_1.join)(projDir, "CLAUDE.md"))) {
|
|
141
|
+
result.projectClaudeMdCount++;
|
|
142
|
+
}
|
|
143
|
+
// Memory files
|
|
144
|
+
const memoryDir = (0, node_path_1.join)(projDir, "memory");
|
|
145
|
+
if ((0, node_fs_1.existsSync)(memoryDir) && (0, node_fs_1.statSync)(memoryDir).isDirectory()) {
|
|
146
|
+
try {
|
|
147
|
+
const memFiles = (0, node_fs_1.readdirSync)(memoryDir).filter((f) => f.endsWith(".md") && f !== "MEMORY.md");
|
|
148
|
+
result.memoryFileCount += memFiles.length;
|
|
149
|
+
if (memFiles.length > 0)
|
|
150
|
+
result.hasMemoryFiles = true;
|
|
151
|
+
// Active = modified in last 30 days
|
|
152
|
+
const thirtyDaysAgo = Date.now() - 30 * 24 * 60 * 60 * 1000;
|
|
153
|
+
for (const f of memFiles) {
|
|
154
|
+
try {
|
|
155
|
+
const stat = (0, node_fs_1.statSync)((0, node_path_1.join)(memoryDir, f));
|
|
156
|
+
if (stat.mtimeMs > thirtyDaysAgo) {
|
|
157
|
+
result.activeMemoryFileCount++;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
// skip
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
// can't read memory dir
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
// can't read projects dir
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// Rules files
|
|
176
|
+
const rulesDir = (0, node_path_1.join)(CLAUDE_DIR, "rules");
|
|
177
|
+
if ((0, node_fs_1.existsSync)(rulesDir)) {
|
|
178
|
+
try {
|
|
179
|
+
const rules = (0, node_fs_1.readdirSync)(rulesDir).filter((f) => f.endsWith(".md"));
|
|
180
|
+
result.hasRulesFiles = rules.length > 0;
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
// can't read
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// MCP servers — check multiple locations
|
|
187
|
+
const mcpPaths = [
|
|
188
|
+
(0, node_path_1.join)(CLAUDE_DIR, ".mcp.json"),
|
|
189
|
+
(0, node_path_1.join)(CLAUDE_DIR, "mcp.json"),
|
|
190
|
+
(0, node_path_1.join)(process.cwd(), ".mcp.json"),
|
|
191
|
+
(0, node_path_1.join)(process.cwd(), "mcp.json"),
|
|
192
|
+
];
|
|
193
|
+
for (const mcpPath of mcpPaths) {
|
|
194
|
+
if ((0, node_fs_1.existsSync)(mcpPath)) {
|
|
195
|
+
try {
|
|
196
|
+
const mcp = JSON.parse((0, node_fs_1.readFileSync)(mcpPath, "utf-8"));
|
|
197
|
+
if (mcp.mcpServers && Object.keys(mcp.mcpServers).length > 0) {
|
|
198
|
+
result.hasMcpServers = true;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
catch {
|
|
202
|
+
// invalid JSON
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
// Also check plugin .mcp.json files (plugins register MCP servers)
|
|
207
|
+
if ((0, node_fs_1.existsSync)(pluginCacheDir)) {
|
|
208
|
+
try {
|
|
209
|
+
for (const marketplace of (0, node_fs_1.readdirSync)(pluginCacheDir)) {
|
|
210
|
+
const marketDir = (0, node_path_1.join)(pluginCacheDir, marketplace);
|
|
211
|
+
if (!(0, node_fs_1.statSync)(marketDir).isDirectory())
|
|
212
|
+
continue;
|
|
213
|
+
for (const plugin of (0, node_fs_1.readdirSync)(marketDir)) {
|
|
214
|
+
const pluginDir = (0, node_path_1.join)(marketDir, plugin);
|
|
215
|
+
if (!(0, node_fs_1.statSync)(pluginDir).isDirectory())
|
|
216
|
+
continue;
|
|
217
|
+
// Check for .mcp.json in plugin dirs (including versioned subdirs)
|
|
218
|
+
const mcpCandidates = [(0, node_path_1.join)(pluginDir, ".mcp.json")];
|
|
219
|
+
try {
|
|
220
|
+
for (const sub of (0, node_fs_1.readdirSync)(pluginDir)) {
|
|
221
|
+
const subMcp = (0, node_path_1.join)(pluginDir, sub, ".mcp.json");
|
|
222
|
+
if ((0, node_fs_1.existsSync)(subMcp))
|
|
223
|
+
mcpCandidates.push(subMcp);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
catch { /* skip */ }
|
|
227
|
+
for (const mcpFile of mcpCandidates) {
|
|
228
|
+
if (!(0, node_fs_1.existsSync)(mcpFile))
|
|
229
|
+
continue;
|
|
230
|
+
try {
|
|
231
|
+
const mcp = JSON.parse((0, node_fs_1.readFileSync)(mcpFile, "utf-8"));
|
|
232
|
+
// MCP configs can have mcpServers key or be a flat map of server names
|
|
233
|
+
if (mcp.mcpServers && Object.keys(mcp.mcpServers).length > 0) {
|
|
234
|
+
result.hasMcpServers = true;
|
|
235
|
+
}
|
|
236
|
+
else if (Object.keys(mcp).some((k) => typeof mcp[k] === "object" && mcp[k]?.command)) {
|
|
237
|
+
result.hasMcpServers = true;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
catch { /* skip */ }
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
catch { /* skip */ }
|
|
246
|
+
}
|
|
247
|
+
return result;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Build a setup checklist from config signals.
|
|
251
|
+
*/
|
|
252
|
+
function buildSetupChecklist(config) {
|
|
253
|
+
return {
|
|
254
|
+
hasClaudeMd: config.hasGlobalClaudeMd,
|
|
255
|
+
hasHooks: config.hasCustomHooks,
|
|
256
|
+
hasPlugins: config.pluginCount > 0,
|
|
257
|
+
hasMcpServers: config.hasMcpServers,
|
|
258
|
+
hasMemory: config.hasMemoryFiles,
|
|
259
|
+
hasRules: config.hasRulesFiles,
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=config-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-parser.js","sourceRoot":"","sources":["../../src/parsers/config-parser.ts"],"names":[],"mappings":";;AA0BA,8CAkOC;AAKD,kDASC;AA1QD,qCAA0E;AAC1E,yCAAiC;AACjC,qCAAkC;AAGlC,MAAM,UAAU,GAAG,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,SAAS,CAAC,CAAC;AAkB9C;;GAEG;AACH,SAAgB,iBAAiB;IAC/B,MAAM,MAAM,GAAkB;QAC5B,iBAAiB,EAAE,KAAK;QACxB,wBAAwB,EAAE,KAAK;QAC/B,oBAAoB,EAAE,CAAC;QACvB,cAAc,EAAE,KAAK;QACrB,oBAAoB,EAAE,CAAC;QACvB,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,EAAE;QACf,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,CAAC;QAClB,qBAAqB,EAAE,CAAC;QACxB,WAAW,EAAE,EAAE;KAChB,CAAC;IAEF,m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