@lyupro/skillforge-mcp 1.1.1 → 1.2.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/marketplace.json +36 -0
- package/.claude-plugin/plugin.json +28 -0
- package/CHANGELOG.md +21 -0
- package/README.md +77 -9
- package/dist/cli/dispatcher.d.ts.map +1 -1
- package/dist/cli/dispatcher.js +24 -2
- package/dist/cli/dispatcher.js.map +1 -1
- package/dist/cli/folders.d.ts +36 -0
- package/dist/cli/folders.d.ts.map +1 -0
- package/dist/cli/folders.js +249 -0
- package/dist/cli/folders.js.map +1 -0
- package/dist/cli/install.d.ts +2 -0
- package/dist/cli/install.d.ts.map +1 -1
- package/dist/cli/install.js +47 -9
- package/dist/cli/install.js.map +1 -1
- package/dist/cli/tools.d.ts +49 -0
- package/dist/cli/tools.d.ts.map +1 -0
- package/dist/cli/tools.js +171 -0
- package/dist/cli/tools.js.map +1 -0
- package/dist/detect/skill-source-conflict.d.ts +47 -0
- package/dist/detect/skill-source-conflict.d.ts.map +1 -0
- package/dist/detect/skill-source-conflict.js +99 -0
- package/dist/detect/skill-source-conflict.js.map +1 -0
- package/dist/installers/cursor-installer.d.ts +6 -7
- package/dist/installers/cursor-installer.d.ts.map +1 -1
- package/dist/installers/cursor-installer.js +15 -20
- package/dist/installers/cursor-installer.js.map +1 -1
- package/dist/installers/paths.d.ts +28 -6
- package/dist/installers/paths.d.ts.map +1 -1
- package/dist/installers/paths.js +72 -20
- package/dist/installers/paths.js.map +1 -1
- package/dist/installers/registry.d.ts +8 -2
- package/dist/installers/registry.d.ts.map +1 -1
- package/dist/installers/registry.js +14 -7
- package/dist/installers/registry.js.map +1 -1
- package/dist/tools/configure.d.ts +6 -0
- package/dist/tools/configure.d.ts.map +1 -1
- package/dist/tools/configure.js +3 -0
- package/dist/tools/configure.js.map +1 -1
- package/manifest.json +3 -2
- package/package.json +3 -2
|
@@ -1,20 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Config path helpers for host tools.
|
|
3
3
|
*
|
|
4
4
|
* Per repo convention, all SkillForge config paths use `os.homedir()`
|
|
5
|
-
* exclusively — no platform branching.
|
|
6
|
-
*
|
|
7
|
-
* control, so the platform-specific dispatch here is rubric-exempt.
|
|
5
|
+
* exclusively — no platform branching. Every host (Claude Code, Codex CLI,
|
|
6
|
+
* Cursor) stores its MCP config in a homedir-rooted file uniform across OSes.
|
|
8
7
|
*/
|
|
9
8
|
export interface PathOverrides {
|
|
10
9
|
claudeConfigPath: string;
|
|
11
10
|
codexConfigPath: string;
|
|
12
|
-
|
|
11
|
+
cursorConfigPath: string;
|
|
13
12
|
defaultBinaryPath: string;
|
|
14
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Install scope. `global` edits the host's home-directory config (the
|
|
16
|
+
* historical default); `project` edits a config file rooted at the current
|
|
17
|
+
* working directory so a single repo can opt into SkillForge.
|
|
18
|
+
*/
|
|
19
|
+
export type Scope = 'global' | 'project';
|
|
20
|
+
export type HostName = 'claude' | 'codex' | 'cursor';
|
|
15
21
|
export declare function claudeConfigPath(): string;
|
|
16
22
|
export declare function codexConfigPath(): string;
|
|
17
|
-
export declare function
|
|
23
|
+
export declare function cursorConfigPath(): string;
|
|
18
24
|
export declare function defaultBinaryPath(): string;
|
|
19
25
|
export declare function defaultPaths(): PathOverrides;
|
|
26
|
+
export declare function claudeProjectConfigPath(projectRoot: string): string;
|
|
27
|
+
export declare function codexProjectConfigPath(projectRoot: string): string;
|
|
28
|
+
export declare function cursorProjectConfigPath(projectRoot: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Validate that `projectRoot` is a usable directory for `--scope project`.
|
|
31
|
+
* Throws a clear error otherwise (caller maps this to a non-zero exit).
|
|
32
|
+
*/
|
|
33
|
+
export declare function assertProjectRoot(projectRoot: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve the config path for a host under the given scope.
|
|
36
|
+
*
|
|
37
|
+
* - `global` → the host's home-directory config (historical default).
|
|
38
|
+
* - `project` → the host's repo-local config rooted at `projectRoot`
|
|
39
|
+
* (defaults to `process.cwd()`). Validates the root first.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolveConfigPath(host: HostName, scope: Scope, projectRoot?: string): string;
|
|
20
42
|
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/installers/paths.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/installers/paths.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,MAAM,WAAW,aAAa;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,MAAM,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzC,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAMD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAKD,wBAAgB,iBAAiB,IAAI,MAAM,CAK1C;AAED,wBAAgB,YAAY,IAAI,aAAa,CAO5C;AAWD,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEnE;AAID,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAElE;AAKD,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAc3D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,KAAK,EACZ,WAAW,GAAE,MAAsB,GAClC,MAAM,CAUR"}
|
package/dist/installers/paths.js
CHANGED
|
@@ -1,34 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Config path helpers for host tools.
|
|
3
3
|
*
|
|
4
4
|
* Per repo convention, all SkillForge config paths use `os.homedir()`
|
|
5
|
-
* exclusively — no platform branching.
|
|
6
|
-
*
|
|
7
|
-
* control, so the platform-specific dispatch here is rubric-exempt.
|
|
5
|
+
* exclusively — no platform branching. Every host (Claude Code, Codex CLI,
|
|
6
|
+
* Cursor) stores its MCP config in a homedir-rooted file uniform across OSes.
|
|
8
7
|
*/
|
|
9
8
|
import { join, resolve } from 'node:path';
|
|
10
|
-
import { homedir
|
|
9
|
+
import { homedir } from 'node:os';
|
|
11
10
|
import { fileURLToPath } from 'node:url';
|
|
11
|
+
import { statSync } from 'node:fs';
|
|
12
12
|
export function claudeConfigPath() {
|
|
13
13
|
return join(homedir(), '.claude.json');
|
|
14
14
|
}
|
|
15
15
|
export function codexConfigPath() {
|
|
16
16
|
return join(homedir(), '.codex', 'config.toml');
|
|
17
17
|
}
|
|
18
|
-
// Cursor
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
export function
|
|
23
|
-
|
|
24
|
-
if (os === 'win32') {
|
|
25
|
-
const appData = process.env.APPDATA ?? join(homedir(), 'AppData', 'Roaming');
|
|
26
|
-
return join(appData, 'Cursor', 'User', 'settings.json');
|
|
27
|
-
}
|
|
28
|
-
if (os === 'darwin') {
|
|
29
|
-
return join(homedir(), 'Library', 'Application Support', 'Cursor', 'User', 'settings.json');
|
|
30
|
-
}
|
|
31
|
-
return join(homedir(), '.config', 'Cursor', 'User', 'settings.json');
|
|
18
|
+
// Cursor reads its global MCP server registry from ~/.cursor/mcp.json on
|
|
19
|
+
// every OS — the same top-level `mcpServers` shape as ~/.claude.json. This
|
|
20
|
+
// is distinct from Cursor's VS Code-style `settings.json`, which Cursor
|
|
21
|
+
// does NOT read MCP servers from.
|
|
22
|
+
export function cursorConfigPath() {
|
|
23
|
+
return join(homedir(), '.cursor', 'mcp.json');
|
|
32
24
|
}
|
|
33
25
|
// Fallback `--entry local` target when --binary-path is not supplied.
|
|
34
26
|
// Resolves to <package root>/dist/server.js via import.meta.url so the
|
|
@@ -43,8 +35,68 @@ export function defaultPaths() {
|
|
|
43
35
|
return {
|
|
44
36
|
claudeConfigPath: claudeConfigPath(),
|
|
45
37
|
codexConfigPath: codexConfigPath(),
|
|
46
|
-
|
|
38
|
+
cursorConfigPath: cursorConfigPath(),
|
|
47
39
|
defaultBinaryPath: defaultBinaryPath(),
|
|
48
40
|
};
|
|
49
41
|
}
|
|
42
|
+
// --- Project-scoped config paths -------------------------------------------
|
|
43
|
+
//
|
|
44
|
+
// `--scope project` targets a config file rooted at the current working
|
|
45
|
+
// directory instead of the home directory. The internal file shapes are
|
|
46
|
+
// identical to the global counterparts, so the same installer + atomic-write
|
|
47
|
+
// + merge logic applies unchanged — only the resolved path differs.
|
|
48
|
+
// Claude Code reads project-local MCP servers from `.mcp.json` at the repo
|
|
49
|
+
// root, with the same top-level `mcpServers` map as `~/.claude.json`.
|
|
50
|
+
export function claudeProjectConfigPath(projectRoot) {
|
|
51
|
+
return join(projectRoot, '.mcp.json');
|
|
52
|
+
}
|
|
53
|
+
// Codex CLI reads project-local config from `.codex/config.toml`, same
|
|
54
|
+
// `[mcp_servers.<name>]` table shape as `~/.codex/config.toml`.
|
|
55
|
+
export function codexProjectConfigPath(projectRoot) {
|
|
56
|
+
return join(projectRoot, '.codex', 'config.toml');
|
|
57
|
+
}
|
|
58
|
+
// Cursor reads project-local MCP servers from `.cursor/mcp.json`, the same
|
|
59
|
+
// top-level `mcpServers` JSON shape as the global `~/.cursor/mcp.json`, so
|
|
60
|
+
// the existing merge logic is reused verbatim.
|
|
61
|
+
export function cursorProjectConfigPath(projectRoot) {
|
|
62
|
+
return join(projectRoot, '.cursor', 'mcp.json');
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Validate that `projectRoot` is a usable directory for `--scope project`.
|
|
66
|
+
* Throws a clear error otherwise (caller maps this to a non-zero exit).
|
|
67
|
+
*/
|
|
68
|
+
export function assertProjectRoot(projectRoot) {
|
|
69
|
+
let stat;
|
|
70
|
+
try {
|
|
71
|
+
stat = statSync(projectRoot);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
throw new Error(`--scope project: cannot resolve a project root at "${projectRoot}" (path does not exist)`);
|
|
75
|
+
}
|
|
76
|
+
if (!stat.isDirectory()) {
|
|
77
|
+
throw new Error(`--scope project: project root "${projectRoot}" is not a directory`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Resolve the config path for a host under the given scope.
|
|
82
|
+
*
|
|
83
|
+
* - `global` → the host's home-directory config (historical default).
|
|
84
|
+
* - `project` → the host's repo-local config rooted at `projectRoot`
|
|
85
|
+
* (defaults to `process.cwd()`). Validates the root first.
|
|
86
|
+
*/
|
|
87
|
+
export function resolveConfigPath(host, scope, projectRoot = process.cwd()) {
|
|
88
|
+
if (scope === 'global') {
|
|
89
|
+
if (host === 'claude')
|
|
90
|
+
return claudeConfigPath();
|
|
91
|
+
if (host === 'codex')
|
|
92
|
+
return codexConfigPath();
|
|
93
|
+
return cursorConfigPath();
|
|
94
|
+
}
|
|
95
|
+
assertProjectRoot(projectRoot);
|
|
96
|
+
if (host === 'claude')
|
|
97
|
+
return claudeProjectConfigPath(projectRoot);
|
|
98
|
+
if (host === 'codex')
|
|
99
|
+
return codexProjectConfigPath(projectRoot);
|
|
100
|
+
return cursorProjectConfigPath(projectRoot);
|
|
101
|
+
}
|
|
50
102
|
//# sourceMappingURL=paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/installers/paths.ts"],"names":[],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C/B,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,uBAAuB,CAAC,WAAW,CAAC,CAAC;IACnE,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,sBAAsB,CAAC,WAAW,CAAC,CAAC;IACjE,OAAO,uBAAuB,CAAC,WAAW,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
* Installer registry — stable enumeration of the three host installers
|
|
3
3
|
* consumed by the `--all` dispatcher and by --claude / --codex / --cursor.
|
|
4
4
|
*/
|
|
5
|
+
import { type HostName, type Scope } from './paths.js';
|
|
5
6
|
import type { Installer } from './types.js';
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Build a single installer for `host`, with its config path resolved for the
|
|
9
|
+
* given scope. The resolved path is threaded into the existing `configPath`
|
|
10
|
+
* constructor override — installer merge / atomic-write logic is unchanged.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getInstallerByName(name: HostName, scope?: Scope, projectRoot?: string): Installer;
|
|
13
|
+
export declare function getAllInstallers(scope?: Scope, projectRoot?: string): Installer[];
|
|
8
14
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/installers/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/installers/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAqB,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,EACd,KAAK,GAAE,KAAgB,EACvB,WAAW,CAAC,EAAE,MAAM,GACnB,SAAS,CAKX;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,GAAE,KAAgB,EACvB,WAAW,CAAC,EAAE,MAAM,GACnB,SAAS,EAAE,CAIb"}
|
|
@@ -5,14 +5,21 @@
|
|
|
5
5
|
import { ClaudeInstaller } from './claude-installer.js';
|
|
6
6
|
import { CodexInstaller } from './codex-installer.js';
|
|
7
7
|
import { CursorInstaller } from './cursor-installer.js';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { resolveConfigPath } from './paths.js';
|
|
9
|
+
/**
|
|
10
|
+
* Build a single installer for `host`, with its config path resolved for the
|
|
11
|
+
* given scope. The resolved path is threaded into the existing `configPath`
|
|
12
|
+
* constructor override — installer merge / atomic-write logic is unchanged.
|
|
13
|
+
*/
|
|
14
|
+
export function getInstallerByName(name, scope = 'global', projectRoot) {
|
|
15
|
+
const configPath = resolveConfigPath(name, scope, projectRoot);
|
|
12
16
|
if (name === 'claude')
|
|
13
|
-
return new ClaudeInstaller();
|
|
17
|
+
return new ClaudeInstaller({ configPath });
|
|
14
18
|
if (name === 'codex')
|
|
15
|
-
return new CodexInstaller();
|
|
16
|
-
return new CursorInstaller();
|
|
19
|
+
return new CodexInstaller({ configPath });
|
|
20
|
+
return new CursorInstaller({ configPath });
|
|
21
|
+
}
|
|
22
|
+
export function getAllInstallers(scope = 'global', projectRoot) {
|
|
23
|
+
return ['claude', 'codex', 'cursor'].map((name) => getInstallerByName(name, scope, projectRoot));
|
|
17
24
|
}
|
|
18
25
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/installers/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/installers/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAA6B,MAAM,YAAY,CAAC;AAG1E;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAAc,EACd,QAAe,QAAQ,EACvB,WAAoB;IAEpB,MAAM,UAAU,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAC/D,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;IAClE,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,IAAI,cAAc,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;IAChE,OAAO,IAAI,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,QAAe,QAAQ,EACvB,WAAoB;IAEpB,OAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAC3D,kBAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,CAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -13,6 +13,12 @@ export interface ConfigureResult {
|
|
|
13
13
|
blacklist: string[];
|
|
14
14
|
/** Skills visible in the registry after the action took effect. */
|
|
15
15
|
totalSkills: number;
|
|
16
|
+
/**
|
|
17
|
+
* Set by `add_folder` only, when the added folder is also served by a host
|
|
18
|
+
* CLI's native plugin/extension system (skills would load twice). It is an
|
|
19
|
+
* informational hint — the folder is still registered. Absent otherwise.
|
|
20
|
+
*/
|
|
21
|
+
conflictHint?: string;
|
|
16
22
|
}
|
|
17
23
|
export declare function handleConfigure(deps: ServerDeps, args: {
|
|
18
24
|
action: ConfigureAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../src/tools/configure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../src/tools/configure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAUpD,eAAO,MAAM,oBAAoB;;;;CAWvB,CAAC;AAEX,MAAM,MAAM,eAAe,GACvB,YAAY,GACZ,eAAe,GACf,cAAc,GACd,eAAe,GACf,eAAe,GACf,OAAO,CAAC;AAEZ,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,uDAAuD;IACvD,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAmBD,wBAAsB,eAAe,CACnC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GACvE,OAAO,CAAC,eAAe,CAAC,CAkG1B"}
|
package/dist/tools/configure.js
CHANGED
|
@@ -3,6 +3,7 @@ import { resolve } from 'node:path';
|
|
|
3
3
|
import { defaultConfig } from '../config/index.js';
|
|
4
4
|
import { loadResolvedConfig } from '../config.js';
|
|
5
5
|
import { ensureRegistryFresh } from './loader.js';
|
|
6
|
+
import { detectSkillSourceConflict, formatConflictHint, } from '../detect/skill-source-conflict.js';
|
|
6
7
|
export const configureInputSchema = {
|
|
7
8
|
action: z.enum([
|
|
8
9
|
'add_folder',
|
|
@@ -67,10 +68,12 @@ export async function handleConfigure(deps, args) {
|
|
|
67
68
|
// Why: always save even on no-op — simpler than branching, atomic write is cheap.
|
|
68
69
|
await deps.configStore.save(persisted);
|
|
69
70
|
const finalPersisted = await reconcileFolders(deps);
|
|
71
|
+
const conflict = detectSkillSourceConflict(absPath);
|
|
70
72
|
return {
|
|
71
73
|
folders: [...deps.folders],
|
|
72
74
|
blacklist: finalPersisted.blacklist,
|
|
73
75
|
totalSkills: deps.registry.size,
|
|
76
|
+
...(conflict !== null ? { conflictHint: formatConflictHint(conflict) } : {}),
|
|
74
77
|
};
|
|
75
78
|
}
|
|
76
79
|
if (action === 'remove_folder') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../src/tools/configure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../src/tools/configure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,M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nC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI;aAChC,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAgB,GAAG,CAAC,CAAC;IACrE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,iEAAiE;QACjE,IAAI,GAAG,CAAC,UAAU,CAAC,aAAa,MAAM,IAAI,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;YAC7E,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,aAAa,MAAM,MAAM,GAAG,EAAE,CAAC,CAAC;IAClD,CAAC;AACH,CAAC"}
|
package/manifest.json
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
"$schema": "https://modelcontextprotocol.io/schemas/manifest.json",
|
|
3
3
|
"name": "@lyupro/skillforge-mcp",
|
|
4
4
|
"displayName": "SkillForge MCP",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.2.0",
|
|
6
6
|
"description": "Universal Skills MCP server — load Markdown skills from arbitrary folders, lazy-by-design, cross-tool (Claude Code / Codex CLI / any MCP client).",
|
|
7
7
|
"author": {
|
|
8
|
-
"name": "
|
|
8
|
+
"name": "Lyu Pro",
|
|
9
|
+
"email": "lyupro.dev@gmail.com",
|
|
9
10
|
"url": "https://lyupro.com"
|
|
10
11
|
},
|
|
11
12
|
"license": "MIT",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyupro/skillforge-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Universal Skills MCP Server — load Markdown skills from arbitrary folders, lazy-by-design, cross-tool (Claude Code / Codex CLI / any MCP client).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"prompt-engineering"
|
|
13
13
|
],
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"author": "lyupro (https://lyupro.com)",
|
|
15
|
+
"author": "Lyu Pro <lyupro.dev@gmail.com> (https://lyupro.com)",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "git+https://github.com/lyupro/skillforge-mcp.git"
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|
|
36
|
+
".claude-plugin",
|
|
36
37
|
"manifest.json",
|
|
37
38
|
"README.md",
|
|
38
39
|
"LICENSE",
|