@jspm/local-mcp 0.1.0 → 0.1.3
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 +54 -76
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +20 -0
- package/dist/cli.js.map +1 -0
- package/dist/context.d.ts +39 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +254 -0
- package/dist/context.js.map +1 -0
- package/dist/generator-options.d.ts +64 -0
- package/dist/generator-options.d.ts.map +1 -0
- package/dist/generator-options.js +78 -0
- package/dist/generator-options.js.map +1 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -291
- package/dist/index.js.map +1 -1
- package/dist/tools/get-importmap.d.ts +4 -0
- package/dist/tools/get-importmap.d.ts.map +1 -0
- package/dist/tools/get-importmap.js +26 -0
- package/dist/tools/get-importmap.js.map +1 -0
- package/dist/tools/get-status.d.ts +4 -0
- package/dist/tools/get-status.d.ts.map +1 -0
- package/dist/tools/get-status.js +27 -0
- package/dist/tools/get-status.js.map +1 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +33 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/install-package.d.ts +4 -0
- package/dist/tools/install-package.d.ts.map +1 -0
- package/dist/tools/install-package.js +32 -0
- package/dist/tools/install-package.js.map +1 -0
- package/dist/tools/remove-provider-override.d.ts +4 -0
- package/dist/tools/remove-provider-override.d.ts.map +1 -0
- package/dist/tools/remove-provider-override.js +40 -0
- package/dist/tools/remove-provider-override.js.map +1 -0
- package/dist/tools/remove-resolution.d.ts +4 -0
- package/dist/tools/remove-resolution.d.ts.map +1 -0
- package/dist/tools/remove-resolution.js +40 -0
- package/dist/tools/remove-resolution.js.map +1 -0
- package/dist/tools/set-cache.d.ts +4 -0
- package/dist/tools/set-cache.d.ts.map +1 -0
- package/dist/tools/set-cache.js +40 -0
- package/dist/tools/set-cache.js.map +1 -0
- package/dist/tools/set-env.d.ts +4 -0
- package/dist/tools/set-env.d.ts.map +1 -0
- package/dist/tools/set-env.js +41 -0
- package/dist/tools/set-env.js.map +1 -0
- package/dist/tools/set-generator-options.d.ts +4 -0
- package/dist/tools/set-generator-options.d.ts.map +1 -0
- package/dist/tools/set-generator-options.js +43 -0
- package/dist/tools/set-generator-options.js.map +1 -0
- package/dist/tools/set-ignore.d.ts +4 -0
- package/dist/tools/set-ignore.d.ts.map +1 -0
- package/dist/tools/set-ignore.js +38 -0
- package/dist/tools/set-ignore.js.map +1 -0
- package/dist/tools/set-project.d.ts +4 -0
- package/dist/tools/set-project.d.ts.map +1 -0
- package/dist/tools/set-project.js +59 -0
- package/dist/tools/set-project.js.map +1 -0
- package/dist/tools/set-provider.d.ts +4 -0
- package/dist/tools/set-provider.d.ts.map +1 -0
- package/dist/tools/set-provider.js +57 -0
- package/dist/tools/set-provider.js.map +1 -0
- package/dist/tools/set-resolution.d.ts +4 -0
- package/dist/tools/set-resolution.d.ts.map +1 -0
- package/dist/tools/set-resolution.js +43 -0
- package/dist/tools/set-resolution.js.map +1 -0
- package/dist/tools/set-target.d.ts +4 -0
- package/dist/tools/set-target.d.ts.map +1 -0
- package/dist/tools/set-target.js +72 -0
- package/dist/tools/set-target.js.map +1 -0
- package/dist/tools/trace-file.d.ts +4 -0
- package/dist/tools/trace-file.d.ts.map +1 -0
- package/dist/tools/trace-file.js +48 -0
- package/dist/tools/trace-file.js.map +1 -0
- package/dist/tools/uninstall-package.d.ts +4 -0
- package/dist/tools/uninstall-package.d.ts.map +1 -0
- package/dist/tools/uninstall-package.js +32 -0
- package/dist/tools/uninstall-package.js.map +1 -0
- package/dist/utils.d.ts +3 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +59 -2
- package/dist/utils.js.map +1 -1
- package/package.json +7 -4
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const PROVIDER_SCHEMA = z.enum([
|
|
3
|
+
"jspm.io",
|
|
4
|
+
"jspm.io#system",
|
|
5
|
+
"nodemodules",
|
|
6
|
+
"skypack",
|
|
7
|
+
"jsdelivr",
|
|
8
|
+
"unpkg",
|
|
9
|
+
"esm.sh",
|
|
10
|
+
]);
|
|
11
|
+
export const PROJECT_GENERATOR_OPTION_KEYS = [
|
|
12
|
+
"commonJS",
|
|
13
|
+
"typeScript",
|
|
14
|
+
"system",
|
|
15
|
+
"integrity",
|
|
16
|
+
"fetchRetries",
|
|
17
|
+
"defaultProvider",
|
|
18
|
+
"cache",
|
|
19
|
+
"providers",
|
|
20
|
+
"resolutions",
|
|
21
|
+
"ignore",
|
|
22
|
+
];
|
|
23
|
+
export const DEFAULT_GENERATOR_OPTIONS = {
|
|
24
|
+
commonJS: false,
|
|
25
|
+
typeScript: false,
|
|
26
|
+
system: false,
|
|
27
|
+
integrity: false,
|
|
28
|
+
fetchRetries: 3,
|
|
29
|
+
defaultProvider: "jspm.io",
|
|
30
|
+
cache: true,
|
|
31
|
+
providers: {},
|
|
32
|
+
resolutions: {},
|
|
33
|
+
ignore: [],
|
|
34
|
+
};
|
|
35
|
+
export const PROJECT_GENERATOR_OPTION_FIELDS = {
|
|
36
|
+
commonJS: z
|
|
37
|
+
.boolean()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe('Enable tracing of CommonJS dependencies, useful with the "nodemodules" provider.'),
|
|
40
|
+
typeScript: z
|
|
41
|
+
.boolean()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe("Enable tracing of TypeScript dependencies."),
|
|
44
|
+
system: z
|
|
45
|
+
.boolean()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe("Enable tracing of SystemJS dependencies."),
|
|
48
|
+
integrity: z
|
|
49
|
+
.boolean()
|
|
50
|
+
.optional()
|
|
51
|
+
.describe('Include an "integrity" field in the generated import map.'),
|
|
52
|
+
fetchRetries: z
|
|
53
|
+
.number()
|
|
54
|
+
.int()
|
|
55
|
+
.min(0)
|
|
56
|
+
.max(10)
|
|
57
|
+
.optional()
|
|
58
|
+
.describe("Number of fetch retries for request failures."),
|
|
59
|
+
defaultProvider: PROVIDER_SCHEMA.optional().describe("Default provider for top-level installs."),
|
|
60
|
+
cache: z
|
|
61
|
+
.union([z.boolean(), z.literal("offline")])
|
|
62
|
+
.optional()
|
|
63
|
+
.describe('Use `true`, `false`, or `"offline"` for JSPM cache behavior.'),
|
|
64
|
+
providers: z
|
|
65
|
+
.record(PROVIDER_SCHEMA)
|
|
66
|
+
.optional()
|
|
67
|
+
.describe("Scoped provider overrides to merge into the project config."),
|
|
68
|
+
resolutions: z
|
|
69
|
+
.record(z.string())
|
|
70
|
+
.optional()
|
|
71
|
+
.describe("Dependency resolution overrides to merge into the project config."),
|
|
72
|
+
ignore: z
|
|
73
|
+
.array(z.string())
|
|
74
|
+
.optional()
|
|
75
|
+
.describe("Module specifiers to ignore while tracing dependencies."),
|
|
76
|
+
};
|
|
77
|
+
export const PROJECT_GENERATOR_OPTIONS_SCHEMA = z.object(PROJECT_GENERATOR_OPTION_FIELDS);
|
|
78
|
+
//# sourceMappingURL=generator-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-options.js","sourceRoot":"","sources":["../src/generator-options.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,SAAS;IACT,gBAAgB;IAChB,aAAa;IACb,SAAS;IACT,UAAU;IACV,OAAO;IACP,QAAQ;CACT,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,WAAW;IACX,cAAc;IACd,iBAAiB;IACjB,OAAO;IACP,WAAW;IACX,aAAa;IACb,QAAQ;CACA,CAAA;AAMV,MAAM,CAAC,MAAM,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,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SAClB,QAAQ,EAAE;SACV,QAAQ,CACP,mEAAmE,CACpE;IACH,MAAM,EAAE,CAAC;SACN,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,EAAE;SACV,QAAQ,CAAC,yDAAyD,CAAC;CAC9D,CAAA;AAEV,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CACtD,+BAA+B,CAChC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { createProjectContext, type ProjectContext } from "./context.js";
|
|
3
|
+
import { registerTools } from "./tools/index.js";
|
|
4
|
+
export { createProjectContext, registerTools };
|
|
5
|
+
export type { ProjectContext };
|
|
6
|
+
export type CreateServerResult = {
|
|
7
|
+
server: McpServer;
|
|
8
|
+
context: ProjectContext;
|
|
9
|
+
};
|
|
10
|
+
export declare function createServer(): CreateServerResult;
|
|
3
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAA;AAEjE,OAAO,EAAC,oBAAoB,EAAE,KAAK,cAAc,EAAC,MAAM,cAAc,CAAA;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAA;AAM9C,OAAO,EAAC,oBAAoB,EAAE,aAAa,EAAC,CAAA;AAC5C,YAAY,EAAC,cAAc,EAAC,CAAA;AAE5B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,SAAS,CAAA;IACjB,OAAO,EAAE,cAAc,CAAA;CACxB,CAAA;AAMD,wBAAgB,YAAY,IAAI,kBAAkB,CAajD"}
|
package/dist/index.js
CHANGED
|
@@ -1,294 +1,20 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { Generator } from "@jspm/generator";
|
|
3
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return {
|
|
21
|
-
content: [{ type: "text", text }],
|
|
22
|
-
isError: true,
|
|
23
|
-
};
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { createProjectContext } from "./context.js";
|
|
4
|
+
import { registerTools } from "./tools/index.js";
|
|
5
|
+
const { version } = createRequire(import.meta.url)("../package.json");
|
|
6
|
+
export { createProjectContext, registerTools };
|
|
7
|
+
// Build a fully wired JSPM MCP server without connecting it to any transport.
|
|
8
|
+
// Importing this module has no side effects; the caller chooses how (or
|
|
9
|
+
// whether) to connect the returned server. The CLI entry (cli.ts) connects it
|
|
10
|
+
// to a stdio transport.
|
|
11
|
+
export function createServer() {
|
|
12
|
+
const server = new McpServer({
|
|
13
|
+
name: "@jspm/local-mcp",
|
|
14
|
+
version,
|
|
15
|
+
}, { capabilities: { logging: {} } });
|
|
16
|
+
const context = createProjectContext();
|
|
17
|
+
registerTools(server, context);
|
|
18
|
+
return { server, context };
|
|
24
19
|
}
|
|
25
|
-
function trailingSlash(path) {
|
|
26
|
-
return path.endsWith("/") ? path : `${path}/`;
|
|
27
|
-
}
|
|
28
|
-
function ensureStateProjectPath() {
|
|
29
|
-
return ensureProjectDirectory(state.projectPath);
|
|
30
|
-
}
|
|
31
|
-
function assertInsideProject(projectPath, candidatePath) {
|
|
32
|
-
const normalizedProjectPath = trailingSlash(resolve(projectPath));
|
|
33
|
-
const normalizedCandidatePath = resolve(candidatePath);
|
|
34
|
-
if (normalizedCandidatePath !== resolve(projectPath) &&
|
|
35
|
-
!normalizedCandidatePath.startsWith(normalizedProjectPath)) {
|
|
36
|
-
throw new Error("Target file must stay inside the configured project");
|
|
37
|
-
}
|
|
38
|
-
return normalizedCandidatePath;
|
|
39
|
-
}
|
|
40
|
-
function resolveProjectFilePath(fileName) {
|
|
41
|
-
const projectPath = ensureStateProjectPath();
|
|
42
|
-
const filePath = getProjectFileLocation(projectPath, fileName);
|
|
43
|
-
return assertInsideProject(projectPath, filePath);
|
|
44
|
-
}
|
|
45
|
-
function getGenerator() {
|
|
46
|
-
if (!state.generator) {
|
|
47
|
-
throw new Error("Generator is not ready. Call set_project first and optionally set_target.");
|
|
48
|
-
}
|
|
49
|
-
return state.generator;
|
|
50
|
-
}
|
|
51
|
-
async function refreshGenerator() {
|
|
52
|
-
const projectPath = ensureStateProjectPath();
|
|
53
|
-
const projectUrl = pathToFileURL(trailingSlash(projectPath));
|
|
54
|
-
const mapPath = state.mapTarget === "html"
|
|
55
|
-
? resolveProjectFilePath(state.htmlFileName)
|
|
56
|
-
: getImportMapLocation(projectPath);
|
|
57
|
-
const mapUrl = pathToFileURL(mapPath);
|
|
58
|
-
const generator = new Generator({
|
|
59
|
-
mapUrl,
|
|
60
|
-
rootUrl: projectUrl,
|
|
61
|
-
defaultProvider: "jspm",
|
|
62
|
-
});
|
|
63
|
-
if (state.mapTarget === "importmap") {
|
|
64
|
-
if (existsSync(mapPath)) {
|
|
65
|
-
await generator.addMappings(readFileSync(mapPath, "utf-8"), mapUrl, projectUrl);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
const htmlSource = readFileSync(mapPath, "utf-8");
|
|
70
|
-
await generator.addMappings(htmlSource, mapUrl, projectUrl);
|
|
71
|
-
}
|
|
72
|
-
state.generator = generator;
|
|
73
|
-
}
|
|
74
|
-
async function saveImportMap() {
|
|
75
|
-
const projectPath = ensureStateProjectPath();
|
|
76
|
-
const generator = getGenerator();
|
|
77
|
-
const projectUrl = pathToFileURL(trailingSlash(projectPath));
|
|
78
|
-
try {
|
|
79
|
-
if (state.mapTarget === "importmap") {
|
|
80
|
-
const importMapPath = getImportMapLocation(projectPath);
|
|
81
|
-
const parentDirectory = dirname(importMapPath);
|
|
82
|
-
await ensureWritable(parentDirectory);
|
|
83
|
-
writeFileSync(importMapPath, `${JSON.stringify(generator.getMap(), null, 2)}\n`, "utf-8");
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
const htmlPath = resolveProjectFilePath(state.htmlFileName);
|
|
87
|
-
const htmlSource = readFileSync(htmlPath, "utf-8");
|
|
88
|
-
await ensureWritable(htmlPath);
|
|
89
|
-
const injectedHtml = await generator.htmlInject(htmlSource, {
|
|
90
|
-
trace: true,
|
|
91
|
-
htmlUrl: pathToFileURL(htmlPath),
|
|
92
|
-
rootUrl: projectUrl,
|
|
93
|
-
esModuleShims: true,
|
|
94
|
-
});
|
|
95
|
-
writeFileSync(htmlPath, injectedHtml, "utf-8");
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
if (error.code === "EACCES") {
|
|
99
|
-
throw new Error("Permission denied while updating the import map target");
|
|
100
|
-
}
|
|
101
|
-
throw error;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
server.registerTool("set_project", {
|
|
105
|
-
title: "Set current project",
|
|
106
|
-
description: "Sets the active project directory",
|
|
107
|
-
inputSchema: z.object({
|
|
108
|
-
path: z.string(),
|
|
109
|
-
}),
|
|
110
|
-
}, async ({ path }) => {
|
|
111
|
-
try {
|
|
112
|
-
const projectPath = ensureProjectDirectory(resolve(path));
|
|
113
|
-
state.projectPath = projectPath;
|
|
114
|
-
state.mapTarget = "importmap";
|
|
115
|
-
state.htmlFileName = undefined;
|
|
116
|
-
await refreshGenerator();
|
|
117
|
-
const importMapPath = getImportMapLocation(projectPath);
|
|
118
|
-
const existingMapMessage = existsSync(importMapPath)
|
|
119
|
-
? "Loaded the existing importmap.json from this project."
|
|
120
|
-
: "No importmap.json found yet. I will create one when you install packages.";
|
|
121
|
-
return {
|
|
122
|
-
content: [
|
|
123
|
-
{
|
|
124
|
-
type: "text",
|
|
125
|
-
text: [
|
|
126
|
-
`Project set to ${projectPath}.`,
|
|
127
|
-
existingMapMessage,
|
|
128
|
-
'The default target is "importmap". Call set_target with "html" and a fileName to manage an HTML file instead.',
|
|
129
|
-
].join("\n"),
|
|
130
|
-
},
|
|
131
|
-
],
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
catch (error) {
|
|
135
|
-
return failure(error.message);
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
server.registerTool("set_target", {
|
|
139
|
-
title: "Set how importmap is managed",
|
|
140
|
-
description: "Choose whether to store the importmap in a file or inject it into an HTML file.",
|
|
141
|
-
inputSchema: z.object({
|
|
142
|
-
target: z
|
|
143
|
-
.string()
|
|
144
|
-
.describe('Target type. Accepts flexible values like "importmap", "file", "json", "html", "inline".'),
|
|
145
|
-
fileName: z
|
|
146
|
-
.string()
|
|
147
|
-
.optional()
|
|
148
|
-
.describe("Required when using HTML target (e.g. index.html)"),
|
|
149
|
-
}),
|
|
150
|
-
}, async ({ target, fileName }) => {
|
|
151
|
-
try {
|
|
152
|
-
ensureStateProjectPath();
|
|
153
|
-
const normalizedTarget = normalizeMapTarget(target);
|
|
154
|
-
if (normalizedTarget === "html") {
|
|
155
|
-
if (!fileName) {
|
|
156
|
-
return failure('HTML target requires "fileName" (for example "index.html")');
|
|
157
|
-
}
|
|
158
|
-
const htmlPath = resolveProjectFilePath(fileName);
|
|
159
|
-
if (!existsSync(htmlPath)) {
|
|
160
|
-
return failure(`HTML file not found: ${fileName}`);
|
|
161
|
-
}
|
|
162
|
-
if (!statSync(htmlPath).isFile()) {
|
|
163
|
-
return failure(`Target is not a file: ${fileName}`);
|
|
164
|
-
}
|
|
165
|
-
state.mapTarget = "html";
|
|
166
|
-
state.htmlFileName = fileName;
|
|
167
|
-
await refreshGenerator();
|
|
168
|
-
return {
|
|
169
|
-
content: [
|
|
170
|
-
{
|
|
171
|
-
type: "text",
|
|
172
|
-
text: `Importmap target set to HTML: ${fileName}`,
|
|
173
|
-
},
|
|
174
|
-
],
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
state.mapTarget = "importmap";
|
|
178
|
-
state.htmlFileName = undefined;
|
|
179
|
-
await refreshGenerator();
|
|
180
|
-
return {
|
|
181
|
-
content: [
|
|
182
|
-
{
|
|
183
|
-
type: "text",
|
|
184
|
-
text: "Importmap target set to importmap.json",
|
|
185
|
-
},
|
|
186
|
-
],
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
catch (error) {
|
|
190
|
-
return failure(error.message);
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
server.registerTool("install_package", {
|
|
194
|
-
title: "Install a package / dependency",
|
|
195
|
-
description: "Installs one or more packages with @jspm/generator and updates the configured importmap target.",
|
|
196
|
-
inputSchema: z.object({
|
|
197
|
-
packages: z.array(z.object({
|
|
198
|
-
packageName: z.string(),
|
|
199
|
-
version: z.string().optional(),
|
|
200
|
-
})),
|
|
201
|
-
}),
|
|
202
|
-
}, async ({ packages }) => {
|
|
203
|
-
try {
|
|
204
|
-
const generator = getGenerator();
|
|
205
|
-
const content = [];
|
|
206
|
-
for (const input of packages) {
|
|
207
|
-
const specifier = input.version
|
|
208
|
-
? `${input.packageName}@${input.version}`
|
|
209
|
-
: input.packageName;
|
|
210
|
-
await generator.install(specifier);
|
|
211
|
-
content.push({ type: "text", text: `Installed ${specifier}` });
|
|
212
|
-
}
|
|
213
|
-
await saveImportMap();
|
|
214
|
-
return { content };
|
|
215
|
-
}
|
|
216
|
-
catch (error) {
|
|
217
|
-
return failure(error.message);
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
server.registerTool("uninstall_package", {
|
|
221
|
-
title: "Uninstall a package / dependency",
|
|
222
|
-
description: "Removes one or more packages from the importmap and saves the result.",
|
|
223
|
-
inputSchema: z.object({
|
|
224
|
-
packageName: z.union([z.string(), z.array(z.string())]),
|
|
225
|
-
}),
|
|
226
|
-
}, async ({ packageName }) => {
|
|
227
|
-
try {
|
|
228
|
-
const generator = getGenerator();
|
|
229
|
-
const packages = Array.isArray(packageName) ? packageName : [packageName];
|
|
230
|
-
await generator.uninstall(packages);
|
|
231
|
-
await saveImportMap();
|
|
232
|
-
return {
|
|
233
|
-
content: [
|
|
234
|
-
{
|
|
235
|
-
type: "text",
|
|
236
|
-
text: `Uninstalled ${packages.join(", ")}`,
|
|
237
|
-
},
|
|
238
|
-
],
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
catch (error) {
|
|
242
|
-
return failure(error.message);
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
server.registerTool("trace_file", {
|
|
246
|
-
title: "Trace file imports",
|
|
247
|
-
description: "Traces imports from one or more local source files and adds the required mappings to the importmap.",
|
|
248
|
-
inputSchema: z.object({
|
|
249
|
-
fileNames: z.array(z.string()),
|
|
250
|
-
}),
|
|
251
|
-
}, async ({ fileNames }) => {
|
|
252
|
-
try {
|
|
253
|
-
const generator = getGenerator();
|
|
254
|
-
const content = [];
|
|
255
|
-
for (const fileName of fileNames) {
|
|
256
|
-
const filePath = resolveProjectFilePath(fileName);
|
|
257
|
-
if (!existsSync(filePath)) {
|
|
258
|
-
return failure(`File not found: ${fileName}`);
|
|
259
|
-
}
|
|
260
|
-
await generator.link(pathToFileURL(filePath).href);
|
|
261
|
-
content.push({
|
|
262
|
-
type: "text",
|
|
263
|
-
text: `Scanned imports from ${fileName}`,
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
await saveImportMap();
|
|
267
|
-
return {
|
|
268
|
-
content: [
|
|
269
|
-
...content,
|
|
270
|
-
{
|
|
271
|
-
type: "text",
|
|
272
|
-
text: "Updated the importmap target with traced dependencies.",
|
|
273
|
-
},
|
|
274
|
-
],
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
catch (error) {
|
|
278
|
-
return failure(error.message);
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
async function main() {
|
|
282
|
-
const transport = new StdioServerTransport();
|
|
283
|
-
await server.connect(transport);
|
|
284
|
-
await server.sendLoggingMessage({
|
|
285
|
-
level: "info",
|
|
286
|
-
data: "JSPM MCP server started",
|
|
287
|
-
});
|
|
288
|
-
console.error(`JSPM MCP server running from ${fileURLToPath(import.meta.url)}`);
|
|
289
|
-
}
|
|
290
|
-
main().catch((error) => {
|
|
291
|
-
console.error("Fatal error:", error);
|
|
292
|
-
process.exit(1);
|
|
293
|
-
});
|
|
294
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAA;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAA;AACzC,OAAO,EAAC,oBAAoB,EAAsB,MAAM,cAAc,CAAA;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAA;AAE9C,MAAM,EAAC,OAAO,EAAC,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAEjE,CAAA;AAED,OAAO,EAAC,oBAAoB,EAAE,aAAa,EAAC,CAAA;AAQ5C,8EAA8E;AAC9E,wEAAwE;AACxE,8EAA8E;AAC9E,wBAAwB;AACxB,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B;QACE,IAAI,EAAE,iBAAiB;QACvB,OAAO;KACR,EACD,EAAC,YAAY,EAAE,EAAC,OAAO,EAAE,EAAE,EAAC,EAAC,CAC9B,CAAA;IAED,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAA;IACtC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE9B,OAAO,EAAC,MAAM,EAAE,OAAO,EAAC,CAAA;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-importmap.d.ts","sourceRoot":"","sources":["../../src/tools/get-importmap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAA;AAEjE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,eAAe,CAAA;AAEjD,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,cAAc,QA6BxB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export function registerGetImportmapTool(server, context) {
|
|
3
|
+
server.registerTool("get_importmap", {
|
|
4
|
+
title: "Get the current import map",
|
|
5
|
+
description: "Read-only. Returns the current import map as JSON along with the list of top-level import specifiers (the names accepted by uninstall_package). Requires set_project first.",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
}, async () => {
|
|
8
|
+
try {
|
|
9
|
+
const generator = context.getGenerator();
|
|
10
|
+
const map = generator.getMap();
|
|
11
|
+
const packages = Object.keys(map.imports ?? {});
|
|
12
|
+
return {
|
|
13
|
+
content: [
|
|
14
|
+
{
|
|
15
|
+
type: "text",
|
|
16
|
+
text: JSON.stringify({ packages, importMap: map }, null, 2),
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
return context.failure(error.message);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=get-importmap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-importmap.js","sourceRoot":"","sources":["../../src/tools/get-importmap.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAGrB,MAAM,UAAU,wBAAwB,CACtC,MAAiB,EACjB,OAAuB;IAEvB,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;QACE,KAAK,EAAE,4BAA4B;QACnC,WAAW,EACT,6KAA6K;QAC/K,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,EACD,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,EAAE,CAAA;YACxC,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,CAAA;YAC9B,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAA;YAE/C,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAC,EAAE,IAAI,EAAE,CAAC,CAAC;qBAC1D;iBACF;aACF,CAAA;QACH,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,OAAO,CAAC,OAAO,CAAE,KAAe,CAAC,OAAO,CAAC,CAAA;QAClD,CAAC;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-status.d.ts","sourceRoot":"","sources":["../../src/tools/get-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAA;AAEjE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,eAAe,CAAA;AAEjD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,cAAc,QA+BxB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export function registerGetStatusTool(server, context) {
|
|
3
|
+
server.registerTool("get_status", {
|
|
4
|
+
title: "Get current project status",
|
|
5
|
+
description: "Read-only. Returns the active project path, import map target, environment conditions, and generator options without changing any state.",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
}, async () => {
|
|
8
|
+
const { state } = context;
|
|
9
|
+
const status = {
|
|
10
|
+
projectPath: state.projectPath ?? null,
|
|
11
|
+
mapTarget: state.mapTarget,
|
|
12
|
+
htmlFileName: state.htmlFileName ?? null,
|
|
13
|
+
esModuleShims: state.esModuleShims,
|
|
14
|
+
env: state.env,
|
|
15
|
+
generatorOptions: state.generatorOptions,
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
content: [
|
|
19
|
+
{
|
|
20
|
+
type: "text",
|
|
21
|
+
text: JSON.stringify(status, null, 2),
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=get-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-status.js","sourceRoot":"","sources":["../../src/tools/get-status.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAGrB,MAAM,UAAU,qBAAqB,CACnC,MAAiB,EACjB,OAAuB;IAEvB,MAAM,CAAC,YAAY,CACjB,YAAY,EACZ;QACE,KAAK,EAAE,4BAA4B;QACnC,WAAW,EACT,0IAA0I;QAC5I,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,EACD,KAAK,IAAI,EAAE;QACT,MAAM,EAAC,KAAK,EAAC,GAAG,OAAO,CAAA;QACvB,MAAM,MAAM,GAAG;YACb,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,IAAI;YACtC,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,YAAY,EAAE,KAAK,CAAC,YAAY,IAAI,IAAI;YACxC,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;SACzC,CAAA;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;iBACtC;aACF;SACF,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAA;AACtE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,eAAe,CAAA;AAiBjD,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,QAgBvE"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { registerGetImportmapTool } from "./get-importmap.js";
|
|
2
|
+
import { registerGetStatusTool } from "./get-status.js";
|
|
3
|
+
import { registerInstallPackageTool } from "./install-package.js";
|
|
4
|
+
import { registerRemoveProviderOverrideTool } from "./remove-provider-override.js";
|
|
5
|
+
import { registerRemoveResolutionTool } from "./remove-resolution.js";
|
|
6
|
+
import { registerSetCacheTool } from "./set-cache.js";
|
|
7
|
+
import { registerSetEnvTool } from "./set-env.js";
|
|
8
|
+
import { registerSetGeneratorOptionsTool } from "./set-generator-options.js";
|
|
9
|
+
import { registerSetIgnoreTool } from "./set-ignore.js";
|
|
10
|
+
import { registerSetProjectTool } from "./set-project.js";
|
|
11
|
+
import { registerSetProviderTool } from "./set-provider.js";
|
|
12
|
+
import { registerSetResolutionTool } from "./set-resolution.js";
|
|
13
|
+
import { registerSetTargetTool } from "./set-target.js";
|
|
14
|
+
import { registerTraceFileTool } from "./trace-file.js";
|
|
15
|
+
import { registerUninstallPackageTool } from "./uninstall-package.js";
|
|
16
|
+
export function registerTools(server, context) {
|
|
17
|
+
registerGetStatusTool(server, context);
|
|
18
|
+
registerGetImportmapTool(server, context);
|
|
19
|
+
registerSetProjectTool(server, context);
|
|
20
|
+
registerSetTargetTool(server, context);
|
|
21
|
+
registerSetEnvTool(server, context);
|
|
22
|
+
registerSetGeneratorOptionsTool(server, context);
|
|
23
|
+
registerSetProviderTool(server, context);
|
|
24
|
+
registerRemoveProviderOverrideTool(server, context);
|
|
25
|
+
registerSetCacheTool(server, context);
|
|
26
|
+
registerSetResolutionTool(server, context);
|
|
27
|
+
registerRemoveResolutionTool(server, context);
|
|
28
|
+
registerSetIgnoreTool(server, context);
|
|
29
|
+
registerInstallPackageTool(server, context);
|
|
30
|
+
registerUninstallPackageTool(server, context);
|
|
31
|
+
registerTraceFileTool(server, context);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,wBAAwB,EAAC,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAC,qBAAqB,EAAC,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAC,0BAA0B,EAAC,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAC,kCAAkC,EAAC,MAAM,+BAA+B,CAAA;AAChF,OAAO,EAAC,4BAA4B,EAAC,MAAM,wBAAwB,CAAA;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAC,kBAAkB,EAAC,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAC,+BAA+B,EAAC,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAC,qBAAqB,EAAC,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAC,sBAAsB,EA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
|
3
|
+
export declare function registerInstallPackageTool(server: McpServer, context: ProjectContext): void;
|
|
4
|
+
//# sourceMappingURL=install-package.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-package.d.ts","sourceRoot":"","sources":["../../src/tools/install-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAA;AAGjE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,eAAe,CAAA;AAEjD,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,cAAc,QAyCxB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export function registerInstallPackageTool(server, context) {
|
|
3
|
+
server.registerTool("install_package", {
|
|
4
|
+
title: "Install a package / dependency from the provider that is configured.",
|
|
5
|
+
description: "Installs one or more packages with @jspm/generator and updates the configured importmap target.",
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
packages: z.array(z.object({
|
|
8
|
+
packageName: z.string(),
|
|
9
|
+
version: z.string().optional(),
|
|
10
|
+
})),
|
|
11
|
+
}),
|
|
12
|
+
}, async ({ packages }) => context.runExclusive(async () => {
|
|
13
|
+
try {
|
|
14
|
+
const generator = context.getGenerator();
|
|
15
|
+
const content = [];
|
|
16
|
+
for (const input of packages) {
|
|
17
|
+
const specifier = input.version
|
|
18
|
+
? `${input.packageName}@${input.version}`
|
|
19
|
+
: input.packageName;
|
|
20
|
+
await generator.install(specifier);
|
|
21
|
+
content.push({ type: "text", text: `Installed ${specifier}` });
|
|
22
|
+
}
|
|
23
|
+
await context.saveImportMap();
|
|
24
|
+
return { content };
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
await context.resyncFromDisk();
|
|
28
|
+
return context.failure(error.message);
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=install-package.js.map
|
|
@@ -0,0 +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AAc,EAAE,CAAC;YACxB,MAAM,OAAO,CAAC,cAAc,EAAE,CAAA;YAC9B,OAAO,OAAO,CAAC,OAAO,CAAE,KAAe,CAAC,OAAO,CAAC,CAAA;QAClD,CAAC;IACH,CAAC,CAAC,CACL,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { ProjectContext } from "../context.js";
|
|
3
|
+
export declare function registerRemoveProviderOverrideTool(server: McpServer, context: ProjectContext): void;
|
|
4
|
+
//# sourceMappingURL=remove-provider-override.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-provider-override.d.ts","sourceRoot":"","sources":["../../src/tools/remove-provider-override.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAA;AAEjE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,eAAe,CAAA;AAEjD,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,cAAc,QA8CxB"}
|