promptgraph-mcp 2.9.55 → 2.9.57
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/api.js +2 -2
- package/commands/add-dir.js +1 -1
- package/commands/marketplace.js +157 -157
- package/config.js +8 -1
- package/github-import.js +934 -923
- package/indexer.js +2 -2
- package/marketplace.js +889 -889
- package/package.json +1 -1
- package/src/filter/hard-filter.js +13 -3
- package/src/filter/train.js +1 -1
package/package.json
CHANGED
|
@@ -29,6 +29,10 @@ const SKIP_DIRS = new Set([
|
|
|
29
29
|
const BADGE_RE = /!\[.*\]\(https?:\/\/(img\.shields\.io|badge\.fury|travis-ci|github\.com\/[^)]+\/badge)/i;
|
|
30
30
|
const README_HEADER_RE = /^#\s*readme\b/i;
|
|
31
31
|
|
|
32
|
+
// GitHub Copilot / agent convention keeps real skills under .github/{skills,prompts,
|
|
33
|
+
// agents,commands} (e.g. microsoft/skills). Allow those even though .github is a skip dir.
|
|
34
|
+
const COPILOT_SKILL_DIRS = new Set(['skills', 'prompts', 'agents', 'commands']);
|
|
35
|
+
|
|
32
36
|
export function hardFilter(filePath, raw) {
|
|
33
37
|
const parts = filePath.replace(/\\/g, '/').split('/');
|
|
34
38
|
const filename = parts[parts.length - 1];
|
|
@@ -42,9 +46,15 @@ export function hardFilter(filePath, raw) {
|
|
|
42
46
|
return { pass: false, reason: `skip filename pattern: ${base}` };
|
|
43
47
|
}
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
const dirSegs = parts.slice(0, -1);
|
|
50
|
+
for (let i = 0; i < dirSegs.length; i++) {
|
|
51
|
+
const seg = dirSegs[i].toLowerCase();
|
|
52
|
+
if (SKIP_DIRS.has(seg)) {
|
|
53
|
+
// .github/{skills,prompts,agents,commands}/… is a valid skill location
|
|
54
|
+
if (seg === '.github' && COPILOT_SKILL_DIRS.has((dirSegs[i + 1] || '').toLowerCase())) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
return { pass: false, reason: `skip dir: ${dirSegs[i]}` };
|
|
48
58
|
}
|
|
49
59
|
}
|
|
50
60
|
|
package/src/filter/train.js
CHANGED
|
@@ -10,7 +10,7 @@ const TRAINING_DIR = path.resolve(__dirname, '../../registry/training');
|
|
|
10
10
|
const MODEL_PATH = path.join(os.homedir(), '.claude', '.promptgraph', 'model.json');
|
|
11
11
|
|
|
12
12
|
function readAllMd(dir) {
|
|
13
|
-
const files = globSync(`${dir}/**/*.md
|
|
13
|
+
const files = globSync(`${dir}/**/*.md`, { dot: true });
|
|
14
14
|
return files.map(f => fs.readFileSync(f, 'utf8'));
|
|
15
15
|
}
|
|
16
16
|
|